Let's Make Robots!

Robot Problem(s) (SOLVED)

I am having an issue with both my sensors and my potentiometer, that's why I labeled as "problem(s)" because I'm thinking they may be inner twined.  You can check my robot post for connections and some more information: http://letsmakerobots.com/node/30291.  If you need anymore information I will gladly post.

My sensors are reading:

 

sensor 1:  124  -  Adj 1:  0  -  sensor 2:  0  -  Adj 2:  0  -  sensor 3:  10  -  Adj 3:  0  -  sensor 4:  0  -  Adj 4:  0  -  sensor 5:  0  -  Adj 5:  0 speed:  25 

sensor 1:  109  -  Adj 1:  0  -  sensor 2:  0  -  Adj 2:  0  -  sensor 3:  9  -  Adj 3:  0  -  sensor 4:  0  -  Adj 4:  0  -  sensor 5:  0  -  Adj 5:  0 speed:  25 

sensor 1:  84  -  Adj 1:  0  -  sensor 2:  0  -  Adj 2:  0  -  sensor 3:  9  -  Adj 3:  0  -  sensor 4:  0  -  Adj 4:  0  -  sensor 5:  0  -  Adj 5:  0 speed:  25 

sensor 1:  79  -  Adj 1:  0  -  sensor 2:  0  -  Adj 2:  0  -  sensor 3:  9  -  Adj 3:  0  -  sensor 4:  0  -  Adj 4:  0  -  sensor 5:  0  -  Adj 5:  0 speed:  26 

 

 

The serial reading is supposed to show what the sensors are seeing and show the adjustments they're making.  My problem is they're either not reading anything or they're trying to adjust, but the wheels continue(When they are trying to adjust, the numbers are outrageous.)  This reading was taken with a piece of white cardboard with black electrical tape under the bot.  When i use the potentiometer, the wheels are not slowing down.  The serial output shows the adjustment of the potentiometer, but the wheels continue full throttle.  I'll greatly appreciate any ideas or nudges in the right direction.  Thanks in advanced!

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Some tips

1. Check the sensor values without the motors. Plug them out.

2. Check the IR LEDs of the sensors with a Digi cam. They should be glowing pink or purple.

3. The card board should be placed as close as possible to the sensors, between 1..5mm

Your code looks ok at first sight.

I wasn't going to post all of the code...but then I couldn't figure out which would be the most important.

http://letsmakerobots.com/files/Linus_v1.pde

 

 

 

the problem could be in the code itself. can you post that?