Wiring Guide - Flockbot
This is the current wiring for the prototype Flockbot with the Arduino Mega 2560 board.
Digital Arduino Connections
Digital 0 | V, TX, GND on Bitwizard BoB |
Digital 1 | RX on Bitwizard BoB |
Digital 3 | Interrupt (Pin A) on Left Wheel Watcher |
Digital 4 | +, M, (B,-) on Left Wheel Watcher (B and - are tied together with a < 10kOhm Pulldown |
Digital 21 | Interrupt (Pin A) on Right Wheel Watcher |
Digital 22 | +, M, (B,-) on Right Wheel Watcher (B and - are tied together with a < 10kOhm Pulldown |
Digital 44 | PWM to Gripper |
Digital 46 | PWM to PiCam Servo |
Digital 45 | PWM to Right Wheel Servo |
Digital 6 | PWM to Left Wheel Servo |
Digital 12 | High Bump |
Analog Arduino Connections
Analog 1 | Right-Front Facing IR Sensor |
Analog 2 | Left Facing IR Sensor |
Analog 3 | Center IR Sensor |
Analog 4 | Right Facing IR Sensor |
Analog 5 | Left-Front Facing IR Sensor |
Battery Indicator
The circuit consists of VCC portion of PWR_IN on the Arduino connected to a 51kOhm resistor and the GND connected to a 39kOhm resistor. The individual values should be 50kOhm and 40kOhm.
Connect the 51kOhm resistor to the 39kOhm resistor to form a loop. At the center, between the two resistors, solder in a wire. This wire will connect to Analog 5 on the Arduino. Cover all exposed wires with electrical tape and shrink wrap the entire line. This should appear to be a thick arch connecting PWR_IN with Analog 5.
Arduino Mega Pinout
The following is an exhaustive listing of all pins on the Arduino Mega 2560, and their attributes.
Digital Arduino Connections
Pin | Special | Use | Pin | Special | Use |
Digital 0 | Serial 0 RX, USB-TTL | V, TX, GND on Bitwizard BoB | Digital 30 | | |
Digital 1 | Serial 0 TX, USB-TTL | RX on Bitwizard BoB | Digital 31 | | |
Digital 2 | Interrupt 0, PWM | | Digital 32 | | |
Digital 3 | Interrupt 1, PWM | Interrupt (Pin A) on Left Wheel Watcher | Digital 33 | | |
Digital 4 | PWM | +, M, (B,-) on Left Wheel Watcher (B and - are tied together with a < 10kOhm Pulldown | Digital 34 | | |
Digital 5 | PWM | | Digital 35 | | |
Digital 6 | PWM | PWM to Left Wheel Servo | Digital 36 | | |
Digital 7 | PWM | LCD12864 Shield | Digital 37 | | |
Digital 8 | PWM | LCD12864 Shield | Digital 38 | | |
Digital 9 | PWM | LCD12864 Shield | Digital 39 | | |
Digital 10 | PWM | LCD12864 Shield | Digital 40 | | |
Digital 11 | PWM | LCD12864 Shield | Digital 41 | | |
Digital 12 | PWM | High Bump | Digital 42 | | |
Digital 13 | PWM, Top LED | LCD12864 Shield | Digital 43 | | |
Digital 14 | Serial 3 TX | | Digital 44 | PWM | PWM to Gripper |
Digital 15 | Serial 3 RX | | Digital 45 | PWM | PWM to Right Wheel Servo |
Digital 16 | Serial 2 TX | | Digital 46 | PWM | PWM to PiCam Servo |
Digital 17 | Serial 2 RX | | Digital 47 | | |
Digital 18 | Serial 1 TX, Interrupt 5 | | Digital 48 | | |
Digital 19 | Serial 1 RX, Interrupt 4 | | Digital 49 | | |
Digital 20 | Interrupt 3, SDA | | Digital 50 | SPI: MISO | |
Digital 21 | Interrupt 2, SCL | Interrupt (Pin A) on Right Wheel Watcher | Digital 51 | SPI: MOSI | |
Digital 22 | | +, M, (B,-) on Right Wheel Watcher (B and - are tied together with a < 10kOhm Pulldown | Digital 52 | SPI: SCK | |
Digital 23 | | | Digital 53 | SPI: SS | |
Digital 24 | | | Digital 54 | | |
Digital 25 | | | Digital 55 | | |
Digital 26 | | | Digital 56 | | |
Digital 27 | | | Digital 57 | | |
Digital 28 | | | Digital 58 | | |
Digital 29 | | | Digital 59 | | |
Analog Arduino Connections
Pin | Special | Use | Pin | Special | Use |
Analog 0 | | LCD12864 Shield | Analog 8 | | |
Analog 1 | | Right-Front Facing IR Sensor | Analog 9 | | |
Analog 2 | | Left Facing IR Sensor | Analog 10 | | |
Analog 3 | | Center IR Sensor | Analog 11 | | |
Analog 4 | | Right Facing IR Sensor | Analog 12 | | |
Analog 5 | | Left-Front Facing IR Sensor | Analog 13 | | |
Analog 6 | | | Analog 14 | | |
Analog 7 | | | Analog 15 | | |