Blink Module Serial Interface
Description
Blinks the Arduino board LED (pin 13) to indicate the values of bytes arriving from the Bpod state machine.
The blink module is intended for educational and debugging purposes.
Requires an Arduino with BlinkModule firmware loaded from:
Command Interface
- Byte 255 (reserved): Returns module info to state machine
- All other bytes: blinks LED to indicate byte value (byte 1 = 1 blink, byte 4 = 4 blinks, etc.)
Example
This code creates, sends and runs a state machine with 1 state. The single state causes the Arduino board to blink 5 times. Set nBlinks to customize blink number.