SDchain C Plus Plus Team
/
DigitalOut_HelloWorld
hello world
Fork of DigitalOut_HelloWorld by
main.cpp
- Committer:
- mbedAustin
- Date:
- 2015-03-27
- Revision:
- 3:29debdbea629
- Parent:
- 2:b4e2eee99a28
- Child:
- 4:340f9fb00d71
File content as of revision 3:29debdbea629:
#include "mbed.h" DigitalOut myled(LED1); int main() { int connected = myled.is_connected(); // check that myled object is initialized and connected to a pin printf("myleD connection stattus = %d", connected); while(1) { myled = 1; // set LED1 pin to high printf("\n\r myled = %d",myled); wait(0.5); myled.write(0); // set LED1 pin to low printf("\n\r myled = %d",myled.read() ); wait(0.5); } }