![](/media/cache/group/mehmet_akif_arvas.jpg.50x50_q85.jpg)
thread ile servo motor, harici led ve kart ledi calistirma
Dependencies: mbed servo_motor mbed-rtos
Diff: main.cpp
- Revision:
- 0:dc00763ac8a7
- Child:
- 1:d3dedfc5deda
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Dec 21 06:50:03 2019 +0000 @@ -0,0 +1,23 @@ +#include "mbed.h" +#include "rtos.h" + +DigitalOut kart_led(PA_5); +DigitalOut led(PD_2); + +Thread calisma1; + +void led_metodu() +{ + while(true) { + led=!led; + wait_ms(100); + } +} +int main() +{ + calisma1.start(led_metodu); + while(true) { + kart_led=!kart_led; + wait(2); + } +} \ No newline at end of file