Mouse code for the MacroRat
Revision 0:a03c771ab78e, committed 2017-04-25
- Comitter:
- sahilmgandhi
- Date:
- Tue Apr 25 23:30:40 2017 +0000
- Child:
- 1:8a4b2f573923
- Commit message:
- init MacroRat
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-dev.lib | Show annotated file Show diff for this revision Revisions of this file |
--- /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); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-dev.lib Tue Apr 25 23:30:40 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed-dev/#e13f6fdb2ac4