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:af8bf6fc6a0f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat Oct 03 18:09:11 2015 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+PwmOut myled(dp1);
+
+int main()
+{
+ int i,j;
+ while(1)
+ {
+ for (j=0;j<2;j++)
+ for (i=0;i<1000;i+=10)
+ {
+ float pwm=i/1000.0;
+ myled=j?1.0-pwm:pwm;
+ wait(0.01);
+ }
+ }
+}