Author
Topic: Meet Tuppie!! He needs help with his brains. (Read 1261 times)

Hi, I am new to the robot world and I have built my very first robot "Tuppie". Now after days and days of trying to figure out why the code I am trying isn't working. I decided to break down and ask for help. I am trying to build a object follower. I am using the axon 2 with a sharp ir and 3 hitec HS-311. Two for the drive wheels and one for the scanning servo. I can't seem to get the scanning servo to "scan" and I also believe the sensor isn't working and was hoping someone could take a look at the code and tell me whats wrong with it. I have tryed to copy other programs but no success has come from it. The code itself comes from both webbotlib and some of admins code for the 50 dollar IR upgrade --servo scan(scan_angle)--- when added in at the proper place causes a compiler error. I've read through webbotlib multiple times and have tried different coding but to no improvement. Thank you in advance

Yup after I let my brain rest for a few hrs I noticed the mistake which I corrected. I am however still having an error when i try to add servo_scan(scan_angle); into the program. I might be wrong but servo_scan is calling on the servo i declared in the beginning and telling it to go to scan_angle correct?

Can you attach the rest of the header files you are using? I don't see the servo_scan() function anywhere, so it probably is on the servos.h file. I'm not really sure since I don't have an Axon, that's why I need to take a look at the whole code.

The program is using webbotlib, right? That acts like Arduino -- there is no main() in your code, Arduino (webbotlib) handles all of that for you. It took me a little while to get used to as well...So probably the problem is in the rest of the code.