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
- Committer:
- fldgoblo
- Date:
- 2011-01-03
- Revision:
- 0:e8d2ba19dde6
File content as of revision 0:e8d2ba19dde6:
// 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();
}
}