Christopher Peirs
/
nightrider
A simple, "Hello World" type of program, which uses all 4 leds.
Revision 0:3afccafa6090, committed 2012-10-24
- Comitter:
- cpeirs
- Date:
- Wed Oct 24 13:55:05 2012 +0000
- Commit message:
- NightRider is a simple "Hello World" type of program.; First build
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 3afccafa6090 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Oct 24 13:55:05 2012 +0000 @@ -0,0 +1,47 @@ +#include "mbed.h" + +DigitalOut myled1(LED1); +DigitalOut myled2(LED2); +DigitalOut myled3(LED3); +DigitalOut myled4(LED4); + +//LocalFileSystem local("local"); + +long i = 0; + +int main() +{ + + + while (1) + { + //FILE *fp = fopen("/local/test.txt", "a"); + myled1 = 1; + wait(0.05); + myled1 = 0; + myled2 = 1; + wait(0.05); + myled2 = 0; + myled3 = 1; + wait(0.05); + myled3 = 0; + myled4 = 1; + wait(0.2); + myled4 = 0; + myled3 = 1; + wait(0.05); + myled3 = 0; + myled2 = 1; + wait(0.05); + myled2 = 0; + myled1 = 1; + wait(0.05); + myled1 = 0; + wait(0.5); + printf("nightrider loop %i\n\r", i); + i++; + //fclose(fp); + //wait(5); + + } +}
diff -r 000000000000 -r 3afccafa6090 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Oct 24 13:55:05 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0 \ No newline at end of file