Software > Software

50$ Robot> GO FORWARD!!!

(1/2) > >>

razvanc_roro:
Hi there!

I finnaly programmed it, modified servos and turned on! By magic, it worked!!! :D BUT :D It detects the left or right direction from which light is comming, it turn that direction, fronts the light and then, when it should go towards the source of light, it stops and doesn't do anything. And also noticed that servos doesnt work both in the same time (like for going straight). If I move the light, it's coming alive and "eye" follows the light and turn left or right corectly, but again, doesn't go towards the light... Hope I maked myself understandfull...
I don't know what to do next... I should modify some values in the program? What values should I "play" with?!?
Thank you!

Greetings from Romania,
              Razvan.

Admin:
lol thats odd . . . you should see this in your source code:


--- Code: ---//light is about equal on both sides
else
{//go straight
servo_left(25);
servo_right(44);
}

--- End code ---

Did you change any of the code?

(dont forget to post video/pics of your robot!)

razvanc_roro:
Yes, John! I left the same source code you offered. I don't know why those 2 servos doesn't work together. ???
I should modify the code or what?!?

I will soon post pics and videos with my robot, although you saw the pictures. :P

Admin:
hmmm this is odd . . .

so the servos dont budge at all when it tries to go straight - like any servo vibrations? are your batteries fully charged?

in the go straight section, try changing the 25 and 44 to different numbers and see what happens . . .

if still nothing, then try changing this line
int threshold=8;

to this
int threshold=30;

If none of this works, let me know . . .

razvanc_roro:
So, the battery are full charged (just a few times testing). When it must go straight (in darkness or in light) it just stay parallized :) , not moving at all. It may be the threshold?!? I will try everything you said. Hope it will work... somehow... :) Keep'n touch.
Thank you!

Navigation

[0] Message Index

[#] Next page

Go to full version