LED
Dependencies: mbed-os-lychee DisplayApp_Base
Revision 5:ef1191cf8372, committed 2018-12-05
- Comitter:
- kobukai0415
- Date:
- Wed Dec 05 02:01:14 2018 +0000
- Parent:
- 4:b75d4cd51099
- Commit message:
- LED
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b75d4cd51099 -r ef1191cf8372 main.cpp --- a/main.cpp Wed Nov 21 02:29:46 2018 +0000 +++ b/main.cpp Wed Dec 05 02:01:14 2018 +0000 @@ -66,12 +66,52 @@ static void WaitGetCommand(void) { - char command; + int flag; + bool blink_on = 0; + bool blink_flag = 0; + char command; + DigitalOut led1(LED1); + DigitalOut led2(LED2); + DigitalOut led3(LED3); + DigitalOut led4(LED4); command = display_app.Getgetc(); - if(command=='c'){ - snapshot(); + if(command=='1'){ + snapshot(); //撮影処理 + } + + else if(command == '4' or command == '5') + { + flag = 1; //走行処理 + blink_on = true; } + + /*走行処理*/ + if(command == '4'){ + led1 = 1; + }else if (command == '5'){ + blink_flag = !blink_flag; + led1 = 0; + if(blink_on == true and blink_flag == true){ + led2 = !led2; + } + wait(1); + } + + /*if (PcApp.readable()) { + command = PcApp.getc();*/ + + + /* + + } else if (data == '3') { + flag = 4; //音声出力処理 + + } else if (data == '2') { + flag = 5; //ライト点灯処理 + } + */ + }