эээм
Dependencies: mbed-STM32F103C8T6 mbed
Diff: main.cpp
- Revision:
- 0:2d3da2f0f265
- Child:
- 1:c86ffbbf8803
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Apr 07 08:18:51 2018 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" +#include "stm32f103c8t6.h" +#define position (100 / 20) + +PwmOut Servo(PB_6); + +int main() { + confSysClock(); + Servo.period_ms(20); + + while(1) { + Servo = position * 1.5; + wait(1000); + Servo = position * 1.0; + wait(1000); + Servo = position * 2.0; + wait(1000); + + } +}