Lehrer Busch
/
080_LED_SOS_UP_Strukturen_UserButton_PWM
080_LED_SOS_UP_Strukturen_UserButton_PWM
Diff: main.cpp
- Revision:
- 0:ebd8e92b9d80
- Child:
- 1:2d785f9b9879
diff -r 000000000000 -r ebd8e92b9d80 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Jan 31 16:59:13 2022 +0000 @@ -0,0 +1,23 @@ +/* mbed BuschA + */ + +#include "mbed.h" + +AnalogOut Boardled(LED1); //PWM! +DigitalIn CableSwitch(D2); //PullUp auf Board, PA_10 + +int main() +{ + + while (1) + { + if (CableSwitch == false) + { + Boardled = 8; + } + else + { + Boardled = 255; + } + } +} \ No newline at end of file