Tatsuki Fukuda
/
eic_blinky_interrupt
fork 1
Fork of eic_blinky_interrupt by
Diff: main.cpp
- Revision:
- 3:50d8d4dc9ad6
- Parent:
- 2:ab5ef3f84cd5
- Child:
- 4:2b12ce3ec6b0
diff -r ab5ef3f84cd5 -r 50d8d4dc9ad6 main.cpp --- a/main.cpp Tue May 20 11:20:10 2014 +0000 +++ b/main.cpp Tue May 20 11:28:18 2014 +0000 @@ -22,8 +22,11 @@ pc.putc(buff+0x20); } else if('a'<=buff&&buff<='z') { pc.putc(buff-0x20); + } else if('0'<=buff&&buff<='9') { + float a=(buff-'0'+1)*0.1;//buff=='0'->a=0.1 buff=='9'->a=1.0 + led_y=a; + pc.printf("led_y=%f\r\n",a); } - pc.printf("\r\n"); }