RSGC ACES: TCRT5000L Sensor Simulation |
In preparation for Linus, our line-following bot, the animation below depicts sensor readings from 5 TCRT5000 IR Sensors (black). Column heights range from 0 to 255, representing the lightest to darkest analog readings from each sensor, respectively. I moved my hand from left to right over the sensors and then back again. To approximate the appropriate response of the left and right gear motors, a weighted average was determined to crudely suggest a reaction to attempt force the bot back to the center. Sample code: Arduino, Processing (TCRT5000Test.pde).