ABELI19_Stefan Schwarz
/
Lauftest
main
main.cpp@1:e15f803c8fe9, 2020-01-13 (annotated)
- Committer:
- stefanblack
- Date:
- Mon Jan 13 17:28:08 2020 +0000
- Revision:
- 1:e15f803c8fe9
- Parent:
- 0:c05b0b112054
- Child:
- 2:966a09f3c106
nibbleLEds()
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 | 1:e15f803c8fe9 | 3 | void nibbleLeds(int value); |
stefanblack | 1:e15f803c8fe9 | 4 | |
stefanblack | 0:c05b0b112054 | 5 | BusOut myleds(LED1,LED2,LED3,LED4); |
stefanblack | 0:c05b0b112054 | 6 | DigitalIn button(BUTTON1); |
stefanblack | 0:c05b0b112054 | 7 | |
stefanblack | 0:c05b0b112054 | 8 | const int INIT=0x03; |
stefanblack | 0:c05b0b112054 | 9 | |
stefanblack | 0:c05b0b112054 | 10 | int main() { |
stefanblack | 1:e15f803c8fe9 | 11 | |
stefanblack | 1:e15f803c8fe9 | 12 | int anzahl, anz; |
stefanblack | 1:e15f803c8fe9 | 13 | uint8_t value=INIT; |
stefanblack | 1:e15f803c8fe9 | 14 | |
stefanblack | 1:e15f803c8fe9 | 15 | nibbleLeds(value); |
stefanblack | 1:e15f803c8fe9 | 16 | wait(0.1); |
stefanblack | 1:e15f803c8fe9 | 17 | |
stefanblack | 0:c05b0b112054 | 18 | } |
stefanblack | 1:e15f803c8fe9 | 19 | |
stefanblack | 1:e15f803c8fe9 | 20 | void nibbleLeds(int value) |
stefanblack | 1:e15f803c8fe9 | 21 | { |
stefanblack | 1:e15f803c8fe9 | 22 | myleds=value%16; |
stefanblack | 1:e15f803c8fe9 | 23 | } |