I have the 4WD Robot and have hooked up the reflection sensors. It did not works so i I used MyRobotDebug and the data I get looks odd..
Below is the data with average output. I tested this on both the left and right sensor and the results where similar.
The results go up on all three sensors even though I only plug in one sensor.
If I put black in front of it--- about 1/4" -- the results only move a little --
1 2 3 4 5
Nothing Hooked up NHU 449 448 439 10 0
Sensor pluged in the #0 position 880 855 831 49 0
Sensor plugged in the #1 position 831 812 878 -48 0
#1 875 845 823 52 0
#2 815 797 874 -59 0
Help get this topic noticed by sharing it on Twitter, Facebook, or email.
Sorry you're having trouble. Could you post a photo of the object you're putting in front of the sensor as well as an "action shot" of the object placed in front of the robot? The closer you can get to the actual lighting you're using, the better. Can you also take a photo of how it's all wired up?
I just tried matt black plastic... not much difference.. here is the data.
There is only one sensor plugged in and Data 1,2 and 3 go up... when I plug in the one.. BTW - I only have the power on from USB... but turning on the robot power does not seem to change any of the data.
No Connect - unplugged the cable
White paper further away... 1.5” with bright light on it.
Hmm... So I moved on and tried the Ping sensor.. It seems to work - Flashing green light on the sensor and the sever work.. but I get "No front sensor"... the one thing i did when i built the Shield was that I accidentally swapped the two chips -- the one in back and center and powered it up.. I have swapped them back.. any chance I did some long term damage?
The other odd thing I have noticed is when I unplug the USB the Ardrino light goes off and if the motors are running they stop. I would think that the robot batteries keep the Ardrino powered and the LED should stay on..
Thanks for the help. This is not working out how I was hoping.. :(
When you swapped the chips, did you need to desolder them before you could swap them, or were they socketed? Desoldering is messy business, and it's possible to damage the chips when you do this.
This is the Adafruit motor shield, right? I'd suggest that you check with their support team to see if it's possible to damage something (either the Arduino or the chips) when you connect things the way you did.
Also, you may want to disconnect your Arduino from the shield, and run some test sketches on it that use the various pins that are used; you could start with the Arduino's built in examples for digitalWrite and analogRead. That way you could determine whether any of the Arduino's pins are fried.
I got lucky and had use the sockets.. so the swap was easy.
I tested the digitalWrite and analogRead... they both gave me back results.. not sure what the number should be but it it did reply with a number.
I did check with the Adafruit and they did not help other than to say my board should be ok, "Even if it were possible to cause damage to the Arduino with a misplaced chip, that damage would be directed to the Arduino IO pin it was connected to. Since the motors are all working, that means that all the pins connected to the shield are working. viewtopic.php?f=31&t=13173
Since the shield does not use any of the analog pins, I do not believe it is possible it to cause them damage without sending the whole processor up in smoke."
Any more ideas?
Thanks, Bill. One more thing to try: can you connect the IR sensors directly to their assigned Arduino pins and test the reflectance that way? You'll bypass the motor shield and be able to eliminate the possibility that the motor shield has a problem. You may need to use jumper wires to make the connections (signal, power, ground).
Also, if you can get some construction paper to test with for the dark object, that may be helpful.
I checked with the author, and he didn't have anything to add, other than that we're essentially on the right track with our research here!