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@0:53d3866c8733, 2018-11-02 (annotated)
- Committer:
- kekkok
- Date:
- Fri Nov 02 12:46:17 2018 +0000
- Revision:
- 0:53d3866c8733
r
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| kekkok | 0:53d3866c8733 | 1 | #include "mbed.h" |
| kekkok | 0:53d3866c8733 | 2 | |
| kekkok | 0:53d3866c8733 | 3 | PwmOut mypwm(D5);//il led d5 |
| kekkok | 0:53d3866c8733 | 4 | |
| kekkok | 0:53d3866c8733 | 5 | DigitalOut myled(LED1); |
| kekkok | 0:53d3866c8733 | 6 | |
| kekkok | 0:53d3866c8733 | 7 | int main() { |
| kekkok | 0:53d3866c8733 | 8 | |
| kekkok | 0:53d3866c8733 | 9 | while(1){ |
| kekkok | 0:53d3866c8733 | 10 | for(int i=1;i<10;i++){ |
| kekkok | 0:53d3866c8733 | 11 | mypwm.period_ms(10); //definisco il periodo |
| kekkok | 0:53d3866c8733 | 12 | mypwm.pulsewidth_ms(1); |
| kekkok | 0:53d3866c8733 | 13 | wait(1);//aspetto un secondo prima di cambiare colore |
| kekkok | 0:53d3866c8733 | 14 | }} |
| kekkok | 0:53d3866c8733 | 15 | } |