Mirza Mesic
/
mbed_laufshift
laushift
main.cpp@0:874de0b957ec, 2019-12-02 (annotated)
- Committer:
- mirzamesic
- Date:
- Mon Dec 02 18:27:25 2019 +0000
- Revision:
- 0:874de0b957ec
laufshift
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mirzamesic | 0:874de0b957ec | 1 | |
mirzamesic | 0:874de0b957ec | 2 | #include "mbed.h" |
mirzamesic | 0:874de0b957ec | 3 | |
mirzamesic | 0:874de0b957ec | 4 | BusOut myleds(LED1, LED2, LED3, LED4); |
mirzamesic | 0:874de0b957ec | 5 | |
mirzamesic | 0:874de0b957ec | 6 | int main() { |
mirzamesic | 0:874de0b957ec | 7 | |
mirzamesic | 0:874de0b957ec | 8 | |
mirzamesic | 0:874de0b957ec | 9 | |
mirzamesic | 0:874de0b957ec | 10 | while(1) { |
mirzamesic | 0:874de0b957ec | 11 | |
mirzamesic | 0:874de0b957ec | 12 | |
mirzamesic | 0:874de0b957ec | 13 | uint8_t i=0b00010000; |
mirzamesic | 0:874de0b957ec | 14 | |
mirzamesic | 0:874de0b957ec | 15 | for(int a=0;a<5;a++) |
mirzamesic | 0:874de0b957ec | 16 | { |
mirzamesic | 0:874de0b957ec | 17 | i=i>>1; |
mirzamesic | 0:874de0b957ec | 18 | myleds = i; |
mirzamesic | 0:874de0b957ec | 19 | wait(0.25); |
mirzamesic | 0:874de0b957ec | 20 | } |
mirzamesic | 0:874de0b957ec | 21 | |
mirzamesic | 0:874de0b957ec | 22 | |
mirzamesic | 0:874de0b957ec | 23 | |
mirzamesic | 0:874de0b957ec | 24 | |
mirzamesic | 0:874de0b957ec | 25 | } |
mirzamesic | 0:874de0b957ec | 26 | } |