The Arduino code and processing sketches to run InstructiBlocks
For this kit, I used an Arduino Mega as I needed two serial connections, however it is possible to use an Uno but the code must be changed to use Software Serial
Wiring: RFID -> Arduino Mega
Vcc -> 5v
GND -> GND
D0 -> RX1
TIR -> digital pin 3
The tags were just blue-tacked into the LEGO bricks. The bricks must be 2x2s or larger to fit the tags in.
- Tag values need to be hardcoded into the arduino file. (Not great, I know, but the more flexible method threw up issues with processing)
- Upload and you're good to go.
- Leave the Arduino plugged into the computer's USB port and close any serial monitors.
- The database2.csv file needs to be updated with the relevant RFID tags (and any rules that you might want to change)
- In Config.pde, line 131 may need to be changed to match your USB port number
- Click run.