Riad_ Bajraktarevic
/
Joystick_Led
Aufgabe 1. BusOut Programm
main.cpp
- Committer:
- riad
- Date:
- 2020-01-12
- Revision:
- 2:ae17974ea4a6
- Parent:
- 1:15d8fa68d1ab
- Child:
- 3:e090a9b08c31
File content as of revision 2:ae17974ea4a6:
#include "mbed.h" BusOut lb(LED1,LED2,LED3,LED4); DigitalIn joy(BUTTON1); void lb1 () { lb = 1; wait_ms(100); for(int i = 0; i<=7; i++) { lb = lb << 1; lb = lb | 1; wait_ms(100); } lb = 15; wait_ms(100); for(int i = 0; i<=7; i++) { lb = lb >> 1; lb = lb | 1; wait_ms(100); } }