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 1:6de41d7e14b5, committed 2017-04-20
- Comitter:
- jcm931213
- Date:
- Thu Apr 20 02:17:28 2017 +0000
- Parent:
- 0:7ee88984a52b
- Child:
- 2:8b2466c9dce3
- Commit message:
- create led control example
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Apr 19 09:31:05 2017 +0000
+++ b/main.cpp Thu Apr 20 02:17:28 2017 +0000
@@ -10,10 +10,10 @@
int i;
while(1){
- for(i=100; i>0; i=i-1) {
- pwm0.write(i*0.01);
- pwm1.pulsewidth_ms(i*0.01);
- wait(0.5);
+ for(i=1000; i>0; i=i-1) {
+ pwm0.write(i*0.001);
+ pwm1.pulsewidth_us(i*100);
+ wait(0.005);
}
}
}