Mirza Mesic
/
tinf_test_mesic_mirza_fertig
vollProgramm
main.cpp@0:2263bfee9a45, 2020-01-13 (annotated)
- Committer:
- mirzamesic
- Date:
- Mon Jan 13 17:07:35 2020 +0000
- Revision:
- 0:2263bfee9a45
- Child:
- 1:b9fbf5790ee0
main funktion1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mirzamesic | 0:2263bfee9a45 | 1 | #include "mbed.h" |
mirzamesic | 0:2263bfee9a45 | 2 | #define BUTTON1 p14 |
mirzamesic | 0:2263bfee9a45 | 3 | |
mirzamesic | 0:2263bfee9a45 | 4 | BusOut myleds(LED1,LED2,LED3,LED4); |
mirzamesic | 0:2263bfee9a45 | 5 | DigitalIn button(BUTTON1); |
mirzamesic | 0:2263bfee9a45 | 6 | |
mirzamesic | 0:2263bfee9a45 | 7 | int main() |
mirzamesic | 0:2263bfee9a45 | 8 | { |
mirzamesic | 0:2263bfee9a45 | 9 | while(1) { |
mirzamesic | 0:2263bfee9a45 | 10 | |
mirzamesic | 0:2263bfee9a45 | 11 | myleds = 0x05; |
mirzamesic | 0:2263bfee9a45 | 12 | if(button) |
mirzamesic | 0:2263bfee9a45 | 13 | myleds = 0x0A; |
mirzamesic | 0:2263bfee9a45 | 14 | wait(0.1); |
mirzamesic | 0:2263bfee9a45 | 15 | |
mirzamesic | 0:2263bfee9a45 | 16 | |
mirzamesic | 0:2263bfee9a45 | 17 | |
mirzamesic | 0:2263bfee9a45 | 18 | } |
mirzamesic | 0:2263bfee9a45 | 19 | } |