Nicolas Borla
/
Bluetooth_Nukleon
dc
Revision 1:aecce7b83157, committed 2018-03-28
- Comitter:
- borlanic
- Date:
- Wed Mar 28 11:18:36 2018 +0000
- Parent:
- 0:e97dc3733638
- Commit message:
- buongiorno lorenzo
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Mar 20 07:58:24 2018 +0000 +++ b/main.cpp Wed Mar 28 11:18:36 2018 +0000 @@ -18,22 +18,19 @@ myled = 0; while(1) { - if(pc.readable()) { - device.putc(pc.getc()); - char a = pc.getc(); + char a = device.getc(); - if(a == "1") { - myled = 0; - } else { - myled = 1; - } + int i = (int)a; + if(i == 0) { + myled = 0; } - if(device.readable()) { - pc.putc(device.getc()); + if(i == 1) { + myled = 1; } - device.printf("cazzo %d\r\n",i); - i++; - wait(1); + pc.printf("%d\r\n",i); + //device.printf("cazzo %d\r\n",i); + //i++; + wait(0.1); } }