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 4DGL-uLCD-SE
Fork of morseCode_1 by
Diff: Header_file.h
- Revision:
- 9:3c1acc87b80c
- Parent:
- 8:78b057dd6da4
--- a/Header_file.h Tue May 01 16:42:40 2018 +0000 +++ b/Header_file.h Tue May 01 17:32:44 2018 +0000 @@ -5,9 +5,9 @@ AnalogOut speaker(p18); DigitalOut led(p8); -DigitalOut myled(LED1); -DigitalOut testled(LED2); -DigitalOut otherled(LED3); +DigitalOut led3(LED3); //blinks for Dash() +DigitalOut led2(LED2); //blinks for Dot() +DigitalOut otherled(LED4); uLCD_4DGL uLCD(p28, p27, p29); // create a global uLCD object @@ -15,9 +15,9 @@ //turn on speaker for 0.5s. //turn on led for 0.5s. //turn off speaker & led. - testled = 1; + led2 = 1; wait(0.5); - testled = 0; + led2 = 0; wait(0.5); } @@ -25,9 +25,9 @@ //turn on speaker for 1s. //turn on led for 1s. //turn off speaker & led. - myled = 1; + led3 = 1; wait(1.0); - myled = 0; + led3 = 0; wait(0.5); } @@ -162,14 +162,14 @@ } else if(input_char == 'o'|| input_char == 'O'){ //uLCD.printf("o\n"); - //testled = 1; + //led2 = 1; dash(); //wait(2); dash(); //wait(w); dash(); //wait(w); - //testled = 0; + //led2 = 0; } else if(input_char == 'p'||input_char == 'P'){ //uLCD.printf("p\n"); @@ -387,7 +387,7 @@ return * rootNode; } else{ - cout << returnvalue(rootNode) << "return root \n" << returnvalue(rootNode->dot) << " return dot" << endl; + //cout << returnvalue(rootNode) << "return root \n" << returnvalue(rootNode->dot) << " return dot" << endl; rootNode = rootNode->dot; return *rootNode; } @@ -399,7 +399,7 @@ return * rootNode; } else{ - cout << returnvalue(rootNode) << "return root \n" << returnvalue(rootNode->dash) << " return dash" << endl; + //cout << returnvalue(rootNode) << "return root \n" << returnvalue(rootNode->dash) << " return dash" << endl; rootNode = rootNode->dash; return * rootNode; }