Allen Smith
/
firstTest
somme dumb test
main.cpp
- Committer:
- asmithmd1
- Date:
- 2013-09-04
- Revision:
- 1:ea80f6d915c1
- Parent:
- 0:a180484467e1
File content as of revision 1:ea80f6d915c1:
#include "mbed.h" DigitalOut myled0(LED1); DigitalOut myled1(LED2); DigitalOut myled2(LED3); DigitalOut myled3(LED4); Serial pc(USBTX, USBRX); // tx, rx int main() { int i = 0; char d; char buffer[128]; while(1) { pc.printf("Hello World! %d \n\r", i); ++i; pc.gets(buffer, 4); pc.printf("I got '%s'\n", buffer); myled0 = 1; wait(0.1); myled0 = 0; wait(0.4); myled1 = 1; wait(0.1); myled1 = 0; wait(0.4); myled2 = 1; wait(0.1); myled2 = 0; wait(0.4); myled3 = 1; wait(0.1); myled3 = 0; wait(0.4); } }