fork of Official_mBuino
Dependencies: mbed
Fork of Official_mBuino by
main.cpp
- Committer:
- Experiment626
- Date:
- 2014-09-13
- Revision:
- 0:c72235e68f52
- Child:
- 1:f89a6b63eae7
File content as of revision 0:c72235e68f52:
#include "mbed.h" DigitalOut LED[] = {(LED1), (LED2), (LED3), (LED4), (LED5), (LED6), (LED7)};// declare 7 LEDs float delayTime = .05; int main() { while(1) { delayTime = 0.05; for(int x = 0; x < 7; x++) { LED[x] = 1; // turn on wait(.2); // delay LED[x] = 0; // turn off wait(delayTime); // delay } for(int x = 6; x >= 0; x--) { LED[x] = 1; // turn on wait(.2); // delay LED[x] = 0; // turn off wait(delayTime); // delay } for(int x = 0; x < 7; x++) { LED[x] = 1; // turn on wait(delayTime); // delay } for(int x = 6; x >= 0; x--) { LED[x] = 0; // turn off wait(delayTime); // delay } } }