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: main.cpp
- Revision:
- 4:62c590826ddb
- Parent:
- 3:6e52b66c5a0c
- Child:
- 5:5b86521e418c
--- a/main.cpp Wed Apr 18 01:16:06 2018 +0000 +++ b/main.cpp Sat Apr 28 16:04:28 2018 +0000 @@ -1,16 +1,28 @@ #include "mbed.h" +#include "Header_file.h" +#include <iostream> +#include <string> + //Part 1 //Main takes in string text input from bluetooth module. Store in string variable //call text_to_morse function on each character from input string variable -DigitalOut myled(LED1); - int main() { + + string newString = "YYZ"; + + for (int i = 0; i < newString.length(); i++){ + Text_to_morse(newString[i]); + } + + char schar = 's'; + char ochar = 'o'; while(1) { - myled = 1; - wait(0.2); - myled = 0; - wait(0.2);//repository + uLCD.printf("do this\n"); + Text_to_morse(schar); + Text_to_morse(ochar); + Text_to_morse(schar); + wait(0.5); } }