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.
main.cpp@1:02f0f5d98031, 2020-01-13 (annotated)
- Committer:
- Ursukar
- Date:
- Mon Jan 13 17:12:34 2020 +0000
- Revision:
- 1:02f0f5d98031
- Parent:
- 0:b9a45f0c6467
- Child:
- 2:12ca7ca1b80c
Main
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ursukar | 0:b9a45f0c6467 | 1 | #include "mbed.h" |
Ursukar | 0:b9a45f0c6467 | 2 | #define Button1 p14 |
Ursukar | 0:b9a45f0c6467 | 3 | |
Ursukar | 1:02f0f5d98031 | 4 | void nibbleLeds(int value); |
Ursukar | 0:b9a45f0c6467 | 5 | BusOut myleds(LED1, LED2, LED3, LED4); |
Ursukar | 1:02f0f5d98031 | 6 | //DigitalIn button(BUTTON1); |
Ursukar | 0:b9a45f0c6467 | 7 | |
Ursukar | 0:b9a45f0c6467 | 8 | const int INIT = 0x03; |
Ursukar | 0:b9a45f0c6467 | 9 | |
Ursukar | 0:b9a45f0c6467 | 10 | int main() { |
Ursukar | 1:02f0f5d98031 | 11 | uint8_t value = INIT; |
Ursukar | 0:b9a45f0c6467 | 12 | while(1) { |
Ursukar | 0:b9a45f0c6467 | 13 | myleds = 0x05; |
Ursukar | 1:02f0f5d98031 | 14 | if(button) |
Ursukar | 1:02f0f5d98031 | 15 | myleds = 0x0A; |
Ursukar | 1:02f0f5d98031 | 16 | wait(0.1); |
Ursukar | 0:b9a45f0c6467 | 17 | } |
Ursukar | 0:b9a45f0c6467 | 18 | } |