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.
Revision 0:5164f61b0c9e, committed 2017-09-20
- Comitter:
- mdidrich
- Date:
- Wed Sep 20 05:49:12 2017 +0000
- Commit message:
- Martin
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 |
diff -r 000000000000 -r 5164f61b0c9e main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Sep 20 05:49:12 2017 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" +PwmOut led(LED1); +AnalogIn potmeter(p20); + +float v; + +int main() +{ + led.period(0.02); // f = 1/0.02 = 50 Hz + while(1) { + v = potmeter; + led.write(v); // 50% duty cycle + wait(1.0); + } +} \ No newline at end of file
diff -r 000000000000 -r 5164f61b0c9e mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Sep 20 05:49:12 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/675da3299148 \ No newline at end of file