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.
Dependencies: mbed
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut myled(LED_GREEN); 00004 DigitalIn s(PTC9); 00005 Serial pc(USBTX, USBRX); 00006 00007 int c; 00008 float t=1.0f; 00009 int main() 00010 { 00011 00012 while (1) 00013 { 00014 for(c=0;c<=100;c++) 00015 { 00016 pc.printf("%d \n", c); 00017 if(s==0 && c%10==0) 00018 { 00019 myled=0; 00020 t=t-0.3; 00021 wait(4); 00022 00023 } 00024 else 00025 { 00026 myled=1; 00027 wait(t); 00028 00029 } 00030 } 00031 } 00032 }
Generated on Tue Jul 12 2022 21:24:05 by
