Mouse code for the MacroRat
Diff: main.cpp
- Revision:
- 0:a03c771ab78e
- Child:
- 1:8a4b2f573923
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Apr 25 23:30:40 2017 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" +#include <stdlib.h> + + +DigitalOut redLed(PC_0); +DigitalOut blueLed(PC_1); +DigitalOut greenLed(PC_2); + +DigitalOut IR_1(PB_0); +DigitalOut IR_2(PB_1); +DigitalOut IR_3(PB_13); +DigitalOut IR_4(PB_14); + +Serial serial(SERIAL_TX, SERIAL_RX); + +int main() +{ + while (1) { + redLed.write(0); + wait_ms(1000); + redLed.write(1); + greenLed.write(0); + wait_ms(1000); + greenLed.write(1); + blueLed.write(0); + wait_ms(1000); + blueLed.write(1); + } +}