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:f92cc048fef2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Jan 21 15:19:43 2016 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+
+
+BusOut Led(P1_8,P1_9,P1_10,P1_11,P1_0,P1_1,P1_3,P1_4,P1_6,P1_7,P1_12,P1_13);
+int main()
+{
+ while(1)
+ {
+ Led = 0;
+ wait_ms(100);
+
+ for (char j = 0b0000;j<0b1100;j++)
+ {
+ Led = 0b1<<j | Led ;
+
+ wait_ms(80);
+ }
+ for (char j = 0b0;j<0b1100;j++)
+ {
+ Led = Led & 0b1111111111111 >> j ;
+ wait_ms(80);
+ }
+ for (char j = 0b0;j<0b1010;j++)
+ { Led = Led & 0b0;
+ wait(0.07);
+ Led = 0b111111111111;
+ wait(0.25);
+
+ }}
+ }