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
Diff: main.cpp
- Revision:
- 4:a5b5809ee14f
- Parent:
- 3:7ae2366ce74c
- Child:
- 5:851e7afdc4fe
--- a/main.cpp Tue Dec 11 15:37:47 2018 +0000 +++ b/main.cpp Wed Dec 12 09:26:53 2018 +0000 @@ -3,6 +3,7 @@ Serial pc(USBTX, USBRX); // tx, rx DigitalIn mybutton(USER_BUTTON); + DigitalOut myled(LED2); DigitalOut Porta0_7 (PA_0); @@ -284,6 +285,8 @@ while(1) { + + myled = mybutton; if(mybutton == 0 & btts ==0) { Porta0_7 = bit0[0]; @@ -323,7 +326,7 @@ Porta3_0 = bit3[7]; btts = 1; - } else if (mybutton == 0 & btts == 1) { + } else if (mybutton == 1 & btts == 1) { Porta0_7 = bit0[8]; Porta0_6 = bit0[9]; @@ -401,7 +404,7 @@ Porta3_0 = bit3[23]; btts = 3; - } else if (mybutton == 0 & btts == 3) { + } else if (mybutton == 1 & btts == 3) { Porta0_7 = bit0[24]; Porta0_6 = bit0[25];