Robin Handy
/
test1
main lauflicht test
main.cpp@1:5756521122a8, 2020-01-13 (annotated)
- Committer:
- rob117
- Date:
- Mon Jan 13 17:12:28 2020 +0000
- Revision:
- 1:5756521122a8
- Parent:
- 0:696d6bf92662
- Child:
- 2:54c01dcbfbc8
main lauflicht ohne fehler
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 | 0:696d6bf92662 | 5 | BusOut myleds(LED1, LED2, LED3, LED4); |
rob117 | 0:696d6bf92662 | 6 | DigitalIn button(BUTTON1); |
rob117 | 0:696d6bf92662 | 7 | |
rob117 | 0:696d6bf92662 | 8 | const int INIT = 0x03; |
rob117 | 0:696d6bf92662 | 9 | |
rob117 | 0:696d6bf92662 | 10 | int main() { |
rob117 | 0:696d6bf92662 | 11 | while(1){ |
rob117 | 0:696d6bf92662 | 12 | myleds = 0x05; |
rob117 | 0:696d6bf92662 | 13 | if(button) |
rob117 | 0:696d6bf92662 | 14 | myleds = 0x0A; |
rob117 | 0:696d6bf92662 | 15 | wait(0.1); |
rob117 | 0:696d6bf92662 | 16 | } |
rob117 | 0:696d6bf92662 | 17 | |
rob117 | 0:696d6bf92662 | 18 | |
rob117 | 0:696d6bf92662 | 19 | } |
rob117 | 1:5756521122a8 | 20 |