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
00001 // Knight Riger Pattern Generator - by Boseji 00002 // http://m8051.blogspot.com 00003 #include "mbed.h" 00004 #define WAIT_time 0.04 00005 #define D() wait(WAIT_time) 00006 DigitalOut mled0(LED1); 00007 DigitalOut mled1(LED2); 00008 DigitalOut mled2(LED3); 00009 DigitalOut mled3(LED4); 00010 int main() { 00011 while(1) { 00012 mled0 = 1;D();mled1 = 1;D();mled2 = 1;D(); 00013 mled3 = 1;mled0=0;D(); 00014 mled1 = 0;D();mled2 = 0;D();mled3 = 0;D();D();D(); 00015 00016 mled3 = 1;D();mled2 = 1;D();mled1 = 1;D(); 00017 mled0 = 1;mled3=0;D(); 00018 mled2 = 0;D();mled1 = 0;D();mled0 = 0;D();D();D(); 00019 } 00020 }
Generated on Wed Sep 6 2023 20:13:27 by
1.7.2