Author Topic: Help on $50 dollar robot...it only goes on a straight line  (Read 2078 times)

0 Members and 1 Guest are viewing this topic.

Offline squall0312Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Help on $50 dollar robot...it only goes on a straight line
« on: October 30, 2009, 08:04:01 AM »
Need your help on my $50 dollar robot...

I followed everything in the tutorial and it is almost finished but when i
programmed it, it just run on a straight line...

*I think its not the program because i received no error when i burn it and i can read from the MCU.

*I checked the photoresistor and found out that it has a very large resistance value...do you think this is the problem?

I am using an ATMEGA8L instead of the ATMEGA8 in the tutorial, i can't find an ATMEGA8 here in the Philippines.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Help on $50 dollar robot...it only goes on a straight line
« Reply #1 on: October 30, 2009, 03:55:41 PM »
The photoresistor is most likely the problem, the robot is probably thinking both are seeing light so go forward.
Are you able to get your hands on lower value photoresistors to test this with?
Howdy

Offline Joker94

  • Supreme Robot
  • *****
  • Posts: 1,119
  • Helpful? 26
Re: Help on $50 dollar robot...it only goes on a straight line
« Reply #2 on: October 30, 2009, 04:01:29 PM »
well for now to test your bot before you go out and buy some more photoresistors you might be able to test it in a dark room with a torch that way there is only one light source for it to follow.

Offline squall0312Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Help on $50 dollar robot...it only goes on a straight line
« Reply #3 on: October 30, 2009, 07:58:46 PM »
I finally made the robot work... :D!

My robots function is to follow a certain line on a black background(i used black to make it easier...).

i changed the photoresistor connection so that the voltage increases as the light increases
then i modified the code...on the direction control i removed some code:

servo_left(25)
servo_right(44)

i just remove one of the servo when it needs to turn to a certain direction... :D!

i also modified the a2dconvert8bit procedure, i just copied the one on the a2dconvert10bit and then i pasted it to the 10bit then it worked perfectly... :D!

I'll post some pictures when the robot is 100% done...

"SOCIETY OF ROBOTS ROCKS!" 8)!

Thanks guys... ;)!

Offline Joker94

  • Supreme Robot
  • *****
  • Posts: 1,119
  • Helpful? 26
Re: Help on $50 dollar robot...it only goes on a straight line
« Reply #4 on: October 31, 2009, 06:16:27 PM »
very well done on fixing the problem.

can't wait to see the pictures.

 


Get Your Ad Here