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