Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Blinky_Led2 by
Revision 1:c8bf330e87ba, committed 2018-07-22
- Comitter:
- RGurav
- Date:
- Sun Jul 22 19:50:46 2018 +0000
- Parent:
- 0:889636b54b07
- Commit message:
- Simple LED blinking program
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue May 15 14:43:30 2018 +0000
+++ b/main.cpp Sun Jul 22 19:50:46 2018 +0000
@@ -1,19 +1,31 @@
+/*
+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(LED2);
+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()
+int main()
{
led1 = 1;
led2 = 0;
-
- while (true)
- {
+
+ 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));
+ }
}
}
