ABELI19_Stefan Schwarz
/
Lauftest
main
main.cpp@0:c05b0b112054, 2020-01-13 (annotated)
- Committer:
- stefanblack
- Date:
- Mon Jan 13 17:15:36 2020 +0000
- Revision:
- 0:c05b0b112054
- Child:
- 1:e15f803c8fe9
main
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
stefanblack | 0:c05b0b112054 | 1 | #include "mbed.h" |
stefanblack | 0:c05b0b112054 | 2 | |
stefanblack | 0:c05b0b112054 | 3 | BusOut myleds(LED1,LED2,LED3,LED4); |
stefanblack | 0:c05b0b112054 | 4 | DigitalIn button(BUTTON1); |
stefanblack | 0:c05b0b112054 | 5 | |
stefanblack | 0:c05b0b112054 | 6 | const int INIT=0x03; |
stefanblack | 0:c05b0b112054 | 7 | |
stefanblack | 0:c05b0b112054 | 8 | int main() { |
stefanblack | 0:c05b0b112054 | 9 | while(1) { |
stefanblack | 0:c05b0b112054 | 10 | myleds = 0x05; //Leds 2 und 4 leuchten |
stefanblack | 0:c05b0b112054 | 11 | if(button) |
stefanblack | 0:c05b0b112054 | 12 | myleds=0x0A; //Leds 1 und 3 leuchten |
stefanblack | 0:c05b0b112054 | 13 | wait(0.1); |
stefanblack | 0:c05b0b112054 | 14 | } |
stefanblack | 0:c05b0b112054 | 15 | } |