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.
main.cpp
00001 #include "mbed.h" 00002 Timer timer1; // define timer object 00003 DigitalOut output1(p5); // digital output 00004 void task1(void); // task function prototype 00005 //*** main code 00006 int main() 00007 { 00008 timer1.start(); // start timer counting 00009 while(1) { 00010 if (timer1.read_ms()>=200) { // read time in ms 00011 task1(); // call task function 00012 timer1.reset(); // reset timer 00013 } 00014 } 00015 } 00016 void task1(void) // task function 00017 { 00018 output1=!output1; // toggle output 00019 }
Generated on Wed Aug 3 2022 19:02:30 by
1.7.2