Activity Board Question
Hi All...
I'm having a problem getting my Activity Board to behave with my Boe Bot Chassis. I'm trying to run this code:
When I load the code into EEPROM, the right servo only turns a couple of seconds and stops suddenly. The left keeps spinning a while longer and then slowly comes to a stop. I thought a bad servo, but if I reverse the leads, the left servo stops short and the right keeps spinning.
Something odd with the servo headers? I get the same results on pairs 12/13, 14/15 and 16/17.
Something wonky with my Activity Board? I get the same results with my Prop BOE.
Activity Board is new as are the high speed servos. Batteries are new and voltages are good. I can run a test program from spin and everything is fine.
I can only think it's something in the code that doesn't like not having encoder feedback, but I have no idea where to look! I would like to get the thing running without the encoders at first... if possible.
I'd appreciate any guidance!!! (Yeah... I'm getting the encoders when finances permit. Been off work a while waiting for knee surgery. BLEAH!)
Amanda
I'm having a problem getting my Activity Board to behave with my Boe Bot Chassis. I'm trying to run this code:
#include "simpletools.h" #include "abdrive.h" int main() { drive_servoPins(12, 13); drive_speed(128, 128); pause(5000); }
When I load the code into EEPROM, the right servo only turns a couple of seconds and stops suddenly. The left keeps spinning a while longer and then slowly comes to a stop. I thought a bad servo, but if I reverse the leads, the left servo stops short and the right keeps spinning.
Something odd with the servo headers? I get the same results on pairs 12/13, 14/15 and 16/17.
Something wonky with my Activity Board? I get the same results with my Prop BOE.
Activity Board is new as are the high speed servos. Batteries are new and voltages are good. I can run a test program from spin and everything is fine.
I can only think it's something in the code that doesn't like not having encoder feedback, but I have no idea where to look! I would like to get the thing running without the encoders at first... if possible.
I'd appreciate any guidance!!! (Yeah... I'm getting the encoders when finances permit. Been off work a while waiting for knee surgery. BLEAH!)
Amanda
Comments
I'm far from an expert on the ActivityBot but I'm pretty sure many of the functions in "abdrive.h" require encoder feedback. You'll want to find example code to just control a normal servo and control your CR servos with position commands.
Hopefully that solves your issue; if not, let us know.
Ah... That seems to have done the job!
I'd noticed that in the header file, but by then I'd made so many changes I didn't want to muck up something else. I did a complete re-install of SimpleIDE thinking I'd =really= hosed something.
Many thanks,
Amanda
I am back to using my Prop BOE, but I don't "think" that could be the problem... could it?
I'm using SimpleIDE and coding in C... I find C easier that I thought it would be and, at the same time, quite maddening.
Again, asking for guidance!
Amanda
Also are you using the high speed servo's? If your using regular cont. rot. servos the speed in the code I posted needs to be bumped up a bit.
With the high speed servo's positive #'s go forward and negative #'s in reverse for both sides.
I'm using the Prop BOE and the servos are connected to pins 14/15. I'm using HS servos. Running your code, the servos run forward and stop four times. Never backward!?
Amanda
Edit You can change the pin#'s I can't remember where the PropBOE servo's are connected.
So I didn't realize (though I probably should have) that you were using a robot that hadn't been calibrated before, and that would definitely be the cause of the issue you're having.
The abdrive library works by assuming you have initial calibration data, even if your encoders are not providing feedback. Without being able to calibrate your robot you'll need to use the servodiffdrive library instead, and its functions are similar but not exactly the same as abdrive.
Andy Lindsay provided a little program to test my theory here (below):
Try that and let us know how it goes.
So far that seems to work! I didn't realize how much abdrive depended on the encoders.
I'm working on the "Detect and Turn From Obstacle" lesson. Still doesn't do quite what I expect, but I no longer think the servos are munging things up.
Burning the midnight oil! :-)
Amanda
Edit: Actually, it does do what it should. My expectations were different than what the code was supposed to do.
Many thanks to Courtney and Dave for their prompt responses and assistance!!!!!!!!!!!