Andreas Koller
/
Bert_Sensoren
Sensoren Test
main.cpp@1:6fb229756f2a, 2015-04-16 (annotated)
- Committer:
- asdfmaker333
- Date:
- Thu Apr 16 11:47:31 2015 +0000
- Revision:
- 1:6fb229756f2a
- Parent:
- 0:23efacfc4c60
Test der Sensoren.(einfach)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
asdfmaker333 | 0:23efacfc4c60 | 1 | #include "mbed.h" |
asdfmaker333 | 0:23efacfc4c60 | 2 | #include "const.h" |
asdfmaker333 | 0:23efacfc4c60 | 3 | #include "ur_Bertl.h" |
asdfmaker333 | 0:23efacfc4c60 | 4 | DigitalOut myled(LED1); |
asdfmaker333 | 0:23efacfc4c60 | 5 | |
asdfmaker333 | 0:23efacfc4c60 | 6 | int main() |
asdfmaker333 | 0:23efacfc4c60 | 7 | { |
asdfmaker333 | 0:23efacfc4c60 | 8 | ur_Bertl karel; |
asdfmaker333 | 0:23efacfc4c60 | 9 | |
asdfmaker333 | 0:23efacfc4c60 | 10 | while(1) |
asdfmaker333 | 0:23efacfc4c60 | 11 | { |
asdfmaker333 | 0:23efacfc4c60 | 12 | |
asdfmaker333 | 0:23efacfc4c60 | 13 | if( karel.IsButtonPressed(BTN_FL)) |
asdfmaker333 | 0:23efacfc4c60 | 14 | karel.NibbleLeds(0x0B); |
asdfmaker333 | 0:23efacfc4c60 | 15 | if( karel.IsButtonPressed(BTN_FLL)) |
asdfmaker333 | 0:23efacfc4c60 | 16 | karel.NibbleLeds(0x0A); |
asdfmaker333 | 0:23efacfc4c60 | 17 | if( karel.IsButtonPressed(BTN_FM)) |
asdfmaker333 | 0:23efacfc4c60 | 18 | karel.NibbleLeds(0x0C); |
asdfmaker333 | 0:23efacfc4c60 | 19 | else |
asdfmaker333 | 0:23efacfc4c60 | 20 | karel.NibbleLeds(0x00); |
asdfmaker333 | 0:23efacfc4c60 | 21 | } |
asdfmaker333 | 0:23efacfc4c60 | 22 | } |