Robin Handy
/
test1
main lauflicht test
main.cpp@3:f82a2b7fb723, 2020-01-13 (annotated)
- Committer:
- rob117
- Date:
- Mon Jan 13 17:25:57 2020 +0000
- Revision:
- 3:f82a2b7fb723
- Parent:
- 2:54c01dcbfbc8
- Child:
- 4:8d806106dbb0
1 funktion korrigiert
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rob117 | 0:696d6bf92662 | 1 | #include "mbed.h" |
rob117 | 1:5756521122a8 | 2 | #define BUTTON1 p14 |
rob117 | 0:696d6bf92662 | 3 | |
rob117 | 0:696d6bf92662 | 4 | |
rob117 | 2:54c01dcbfbc8 | 5 | void nibbleLeds(int value); |
rob117 | 2:54c01dcbfbc8 | 6 | |
rob117 | 3:f82a2b7fb723 | 7 | |
rob117 | 0:696d6bf92662 | 8 | BusOut myleds(LED1, LED2, LED3, LED4); |
rob117 | 0:696d6bf92662 | 9 | DigitalIn button(BUTTON1); |
rob117 | 0:696d6bf92662 | 10 | |
rob117 | 2:54c01dcbfbc8 | 11 | |
rob117 | 2:54c01dcbfbc8 | 12 | |
rob117 | 2:54c01dcbfbc8 | 13 | |
rob117 | 2:54c01dcbfbc8 | 14 | |
rob117 | 0:696d6bf92662 | 15 | const int INIT = 0x03; |
rob117 | 0:696d6bf92662 | 16 | |
rob117 | 0:696d6bf92662 | 17 | int main() { |
rob117 | 3:f82a2b7fb723 | 18 | int anzahl, anz; |
rob117 | 3:f82a2b7fb723 | 19 | uint8_t value = INIT; |
rob117 | 3:f82a2b7fb723 | 20 | |
rob117 | 3:f82a2b7fb723 | 21 | nibbleLeds(value); |
rob117 | 3:f82a2b7fb723 | 22 | wait(0.1); |
rob117 | 0:696d6bf92662 | 23 | |
rob117 | 0:696d6bf92662 | 24 | |
rob117 | 2:54c01dcbfbc8 | 25 | } |
rob117 | 1:5756521122a8 | 26 | |
rob117 | 2:54c01dcbfbc8 | 27 | void nibbleLeds(int value){ |
rob117 | 2:54c01dcbfbc8 | 28 | myleds = value%16; |
rob117 | 2:54c01dcbfbc8 | 29 | } |
rob117 | 2:54c01dcbfbc8 | 30 |