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.
main.cpp
00001 /*Sets PWM source to fixed frequency and duty cycle. Observe output on oscilloscope. 00002 */ 00003 #include "mbed.h" 00004 PwmOut PWM1(p21); //create a PWM output called PWM1 on pin 21 00005 int main() 00006 { 00007 PWM1.period(0.010); // set PWM period to 10 ms 00008 PWM1=0.5; // set duty cycle to 50% 00009 } 00010
Generated on Sun Jul 17 2022 00:39:52 by
1.7.2