September 25, 2009
about a year ago
For those of you who purchased a RedBot and are thinking of upgrading it with some of the new gadgets for it like the Wheel Encoder, they changed the “standard” layout of the line-follower sensors. The old setup for the (left, center, right) sensors was (A2, A3, A6) and it changed to (A7, A6, A3), probably because they were running out of digital pins and they wanted to move one of the line-following sensors to A7 which is analog-only. This is not a big deal as long as you realize the issue exists.
Making your bot match whatever version of the library and demo code you have is easy - just move some wires if needed.
Marking the library match however your bot is wired is also easy: find the 3 lines in a header file or code:
RedBotSensor lSen = RedBotSensor(NN);
RedBotSensor cSen = RedBotSensor(NN);
RedBotSensor rSen = RedBotSensor(NN);
where NN represents 3 different numbers, and change them to match your setup wiring, if needed. These are normally the only references to the pin numbers.
With the new gadgets, RedBot is using all available pins (which doesn’t rule out adding a port expander on the I2C bus):
Left Motor: D2, D4, D5
Right Motor: D7, D8, D6
Line Sensors (l, c, r): A7, A6, A3
Wheel Encoders (l, r): A2/D16, D3
Bumper Sensors (l, r): D10 D11
Serial port: D0, D1
XBEE serial port: A0/D14, A1/D15
Accelerometer: A4/D18, A5/D19, although I2C can handle a practically unlimited number of devices on the bus.
User LED: D13
User Button: D12 on newer mainboards. D12 is brought out at the ICSP header so adding a button isn’t hard.
The old setup sometimes used up to 4 unspecified “servo” devices on PWM pins D3, D9, D10, and D11. If you want that now, you’ll need to choose what devices you want to connect.
No public wish lists :(
Forgot your password?
No account? Register one!