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:e8d2ba19dde6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Jan 03 03:55:35 2011 +0000
@@ -0,0 +1,20 @@
+// Knight Riger Pattern Generator - by Boseji
+// http://m8051.blogspot.com
+#include "mbed.h"
+#define WAIT_time 0.04
+#define D() wait(WAIT_time)
+DigitalOut mled0(LED1);
+DigitalOut mled1(LED2);
+DigitalOut mled2(LED3);
+DigitalOut mled3(LED4);
+int main() {
+ while(1) {
+ mled0 = 1;D();mled1 = 1;D();mled2 = 1;D();
+ mled3 = 1;mled0=0;D();
+ mled1 = 0;D();mled2 = 0;D();mled3 = 0;D();D();D();
+
+ mled3 = 1;D();mled2 = 1;D();mled1 = 1;D();
+ mled0 = 1;mled3=0;D();
+ mled2 = 0;D();mled1 = 0;D();mled0 = 0;D();D();D();
+ }
+}