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@2:12ca7ca1b80c, 2020-01-13 (annotated)
- Committer:
- Ursukar
- Date:
- Mon Jan 13 17:26:41 2020 +0000
- Revision:
- 2:12ca7ca1b80c
- Parent:
- 1:02f0f5d98031
- Child:
- 3:fa690e648ff7
nibbleLeds
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 | 2:12ca7ca1b80c | 11 | int anzahl, anz; |
Ursukar | 1:02f0f5d98031 | 12 | uint8_t value = INIT; |
Ursukar | 2:12ca7ca1b80c | 13 | |
Ursukar | 2:12ca7ca1b80c | 14 | nibbleLeds(value); |
Ursukar | 2:12ca7ca1b80c | 15 | wait(0.1); |
Ursukar | 0:b9a45f0c6467 | 16 | } |
Ursukar | 2:12ca7ca1b80c | 17 | |
Ursukar | 2:12ca7ca1b80c | 18 | void nibbleLeds(int value) |
Ursukar | 2:12ca7ca1b80c | 19 | { |
Ursukar | 2:12ca7ca1b80c | 20 | myleds = value%16; |
Ursukar | 2:12ca7ca1b80c | 21 | } |