Allen Smith
/
firstTest
somme dumb test
Diff: main.cpp
- Revision:
- 1:ea80f6d915c1
- Parent:
- 0:a180484467e1
--- a/main.cpp Mon Jul 22 14:38:47 2013 +0000 +++ b/main.cpp Wed Sep 04 14:05:52 2013 +0000 @@ -5,8 +5,20 @@ 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;