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 //This is my solution, using C functions 00004 //to avoid repetition. 00005 00006 DigitalOut myled(D7); 00007 00008 void flash(double t); 00009 void dash(); 00010 void dot(); 00011 void symbGap() ; 00012 00013 int main() { 00014 while(1) { 00015 dot(); 00016 dot(); 00017 dot(); 00018 symbGap(); 00019 dash(); 00020 dash(); 00021 dash(); 00022 symbGap(); 00023 dot(); 00024 dot(); 00025 dot(); 00026 wait(5.0); 00027 } 00028 } 00029 00030 void dot() { 00031 flash(0.15); 00032 } 00033 00034 void symbGap() { 00035 wait(0.15); 00036 } 00037 00038 void dash() { 00039 flash(0.45); 00040 } 00041 00042 void flash(double t) { 00043 myled = 1; 00044 wait(t); 00045 myled=0; 00046 wait(0.15); 00047 }
Generated on Tue Aug 23 2022 07:17:03 by
1.7.2