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.
Diff: main.cpp
- Revision:
- 0:53d3866c8733
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Nov 02 12:46:17 2018 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+
+PwmOut mypwm(D5);//il led d5
+
+DigitalOut myled(LED1);
+
+int main() {
+
+ while(1){
+ for(int i=1;i<10;i++){
+ mypwm.period_ms(10); //definisco il periodo
+ mypwm.pulsewidth_ms(1);
+ wait(1);//aspetto un secondo prima di cambiare colore
+ }}
+}
\ No newline at end of file