Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-STM32F103C8T6 mbed
main.cpp
00001 #include "mbed.h" 00002 #include "stm32f103c8t6.h" 00003 #define position 0.05 00004 00005 PwmOut Servo(PA_8); 00006 00007 int main() { 00008 confSysClock(); 00009 Servo.period_ms(20); 00010 00011 while(1) { 00012 Servo = position * 0.545; // max right 00013 wait_ms(1000); 00014 Servo = position * 1.5; //center 00015 wait_ms(1000); 00016 Servo = position * 2.6; //max left 00017 wait_ms(1000); 00018 } 00019 }
Generated on Sat Aug 6 2022 18:38:25 by
1.7.2