mbed workshop intro + cansat examples
MyLed7.cpp
- Committer:
- yamaguch
- Date:
- 2012-05-10
- Revision:
- 0:f309f06aeec7
File content as of revision 0:f309f06aeec7:
#include "mbed.h" DigitalOut myleds[] = {LED1, LED2, LED3, LED4}; void setMyLeds(bool arg) { for (int i = 0; i < 4; i++) { myleds[i] = arg; } } int main() { while(1) { setMyLeds(1); wait(0.2); setMyLeds(0); wait(0.2); } }