Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Revision 3:5e21003ab77c, committed 2017-11-03
- Comitter:
- toiy01344
- Date:
- Fri Nov 03 10:06:14 2017 +0000
- Parent:
- 2:15f86dcaa5bf
- Commit message:
- update
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 02 19:21:48 2017 +0000
+++ b/main.cpp Fri Nov 03 10:06:14 2017 +0000
@@ -48,8 +48,8 @@
pc.printf("\n"); //ให้เว้นบรรทัด
state_menu=0; //ให้ state_menu = 0 เพื่อให้สามารถกลับไปโชว์คำสั่งในเมนู
t.start(); //ให้ timer เริ่มทำงาน
- while(1){ //ให้เข้าลูปเมื่อมีไฟเข้ามา ทำให้สามารถสั่งงาน led ได้
-
+
+ while(state_exit == 0){ //ให้เข้าลูปเมื่อ state_exit=0 ทำให้สามารถสั่งงาน led ได้
switch(data) { //ใช้คำสั่ง switch โดยอ่านค่าจากตัวแปร data เพื่อให้เป็น switch
case 'a': //ถ้าให้คำสั่ง a มาให้ลงไปทำข้างล่าง