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.
Nico.cpp@11:5e955cf303ab, 2018-10-31 (annotated)
- Committer:
- Nicolaemf
- Date:
- Wed Oct 31 14:21:58 2018 +0000
- Revision:
- 11:5e955cf303ab
- Parent:
- 8:9dcb41672315
PWM on both sides;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Nicolaemf | 11:5e955cf303ab | 1 | #include "mbed.h" |
Nicolaemf | 11:5e955cf303ab | 2 | |
Nicolaemf | 11:5e955cf303ab | 3 | PwmOut led(LED1) |
Nicolaemf | 8:9dcb41672315 | 4 | |
Nicolaemf | 11:5e955cf303ab | 5 | int main(){ |
Nicolaemf | 11:5e955cf303ab | 6 | while(1){ |
Nicolaemf | 11:5e955cf303ab | 7 | led = led + 0.01; |
Nicolaemf | 11:5e955cf303ab | 8 | wait(0.2); |
Nicolaemf | 11:5e955cf303ab | 9 | if(led == 1.0){ |
Nicolaemf | 11:5e955cf303ab | 10 | led = 0; |
Nicolaemf | 11:5e955cf303ab | 11 | } |
Nicolaemf | 11:5e955cf303ab | 12 | } |
Nicolaemf | 11:5e955cf303ab | 13 | |
Nicolaemf | 11:5e955cf303ab | 14 | } |