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
main.cpp
00001 /* 00002 Created on: 12/05/2018 00003 Source: (Self) 00004 Code: This code toggles the status of the onboard leds with a count-down 00005 */ 00006 00007 #include "mbed.h" 00008 00009 DigitalOut led2(P2_10); 00010 DigitalOut led1(LED1); 00011 Serial pc(USBTX, USBRX); 00012 int16_t i = 3; 00013 00014 // main() runs in its own thread in the OS 00015 int main() 00016 { 00017 led1 = 1; 00018 led2 = 0; 00019 00020 while (true) { 00021 led2 = !led2; 00022 led1 = !led1; 00023 wait(0.5); 00024 pc.printf("Toggle in : \r\n"); 00025 for (i = 1; i <= 3; i++) 00026 { 00027 pc.printf("%d\n",(i)); 00028 } 00029 } 00030 } 00031
Generated on Thu Jul 14 2022 20:56:26 by
1.7.2
