for demo only

Dependencies:   mbed

Committer:
aaronxu
Date:
Wed Oct 29 06:57:03 2014 +0000
Revision:
1:916545824f61
Parent:
0:fb8d3cec05ec
second

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hemddabral 0:fb8d3cec05ec 1 #include "mbed.h"
hemddabral 0:fb8d3cec05ec 2
hemddabral 0:fb8d3cec05ec 3 DigitalOut myled(LED1);
hemddabral 0:fb8d3cec05ec 4
hemddabral 0:fb8d3cec05ec 5 int main() {
hemddabral 0:fb8d3cec05ec 6 while(1) {
hemddabral 0:fb8d3cec05ec 7 myled = 1; // LED is ON
hemddabral 0:fb8d3cec05ec 8 wait(0.2); // 200 ms
hemddabral 0:fb8d3cec05ec 9 myled = 0; // LED is OFF
hemddabral 0:fb8d3cec05ec 10 wait(1.0); // 1 sec
hemddabral 0:fb8d3cec05ec 11 }
hemddabral 0:fb8d3cec05ec 12 }