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 Serial pc(USBTX, USBRX); 00003 DigitalOut myled(LED1); 00004 class LED { 00005 private: 00006 float time; 00007 public: 00008 LED(float t){time=t;}; 00009 void action(); 00010 }; 00011 void LED::action() 00012 { 00013 wait(time); 00014 myled=!myled; 00015 } 00016 int main() { 00017 LED *s; 00018 s=new LED(0.5); 00019 while(1) 00020 { 00021 s->action(); 00022 } 00023 delete s; 00024 }
Generated on Wed Jul 13 2022 04:27:07 by
1.7.2