Stefan Kiegerl
/
run_test
run test
main.cpp@0:c9cfffb3a319, 2020-01-13 (annotated)
- Committer:
- stkiegerl
- Date:
- Mon Jan 13 17:14:39 2020 +0000
- Revision:
- 0:c9cfffb3a319
- Child:
- 1:f92ffd7d6a00
initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
stkiegerl | 0:c9cfffb3a319 | 1 | #include "mbed.h" |
stkiegerl | 0:c9cfffb3a319 | 2 | #define BUTTON1 p14 |
stkiegerl | 0:c9cfffb3a319 | 3 | //#define BUTTON1 A1 |
stkiegerl | 0:c9cfffb3a319 | 4 | |
stkiegerl | 0:c9cfffb3a319 | 5 | BusOut myleds(LED1, LED2, LED3, LED4); |
stkiegerl | 0:c9cfffb3a319 | 6 | DigitalIn button(BUTTON1); |
stkiegerl | 0:c9cfffb3a319 | 7 | |
stkiegerl | 0:c9cfffb3a319 | 8 | const int INIT = 0x03; |
stkiegerl | 0:c9cfffb3a319 | 9 | |
stkiegerl | 0:c9cfffb3a319 | 10 | int main () { |
stkiegerl | 0:c9cfffb3a319 | 11 | while(1) { |
stkiegerl | 0:c9cfffb3a319 | 12 | myleds = 0x05; |
stkiegerl | 0:c9cfffb3a319 | 13 | if(button){ |
stkiegerl | 0:c9cfffb3a319 | 14 | myleds = 0x0A; |
stkiegerl | 0:c9cfffb3a319 | 15 | } |
stkiegerl | 0:c9cfffb3a319 | 16 | wait(0.1); |
stkiegerl | 0:c9cfffb3a319 | 17 | } |
stkiegerl | 0:c9cfffb3a319 | 18 | } |