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
Revision 0:9df24d9c5f46, committed 2019-03-26
- Comitter:
- khalish18
- Date:
- Tue Mar 26 10:38:54 2019 +0000
- Commit message:
- brighness
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Mar 26 10:38:54 2019 +0000 @@ -0,0 +1,14 @@ +/*Program Example 5.2: Uses analog input to control PWM duty cycle, fixed period + */ +#include "mbed.h" +PwmOut PWM1(p21); +AnalogIn Ain(p20); //defines analog input on Pin 20 + +int main() { + while(1) { + PWM1.period(Ain/1000 + 0.001); + PWM1=Ain; + wait(0.5); + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Mar 26 10:38:54 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file