A simple program to Toggle the 2 OnBoard LEDs.
Fork of Blinky_Led2 by
main.cpp
- Committer:
- RGurav
- Date:
- 2018-07-22
- Revision:
- 1:c8bf330e87ba
- Parent:
- 0:889636b54b07
File content as of revision 1:c8bf330e87ba:
/* Created on: 12/05/2018 Source: (Self) Code: This code toggles the status of the onboard leds with a count-down */ #include "mbed.h" DigitalOut led2(P2_10); DigitalOut led1(LED1); Serial pc(USBTX, USBRX); int16_t i = 3; // main() runs in its own thread in the OS int main() { led1 = 1; led2 = 0; while (true) { led2 = !led2; led1 = !led1; wait(0.5); pc.printf("Toggle in : \r\n"); for (i = 1; i <= 3; i++) { pc.printf("%d\n",(i)); } } }