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.
Diff: main.cpp
- Revision:
- 1:02f0f5d98031
- Parent:
- 0:b9a45f0c6467
- Child:
- 2:12ca7ca1b80c
diff -r b9a45f0c6467 -r 02f0f5d98031 main.cpp --- a/main.cpp Mon Jan 13 17:06:01 2020 +0000 +++ b/main.cpp Mon Jan 13 17:12:34 2020 +0000 @@ -1,16 +1,18 @@ #include "mbed.h" #define Button1 p14 +void nibbleLeds(int value); BusOut myleds(LED1, LED2, LED3, LED4); -//DigitalIn button(Button1); +//DigitalIn button(BUTTON1); const int INIT = 0x03; int main() { + uint8_t value = INIT; while(1) { myleds = 0x05; - wait(0.2); - myleds = 0x0A; - wait(1.0); + if(button) + myleds = 0x0A; + wait(0.1); } }