4180 Morse / Mbed 2 deprecated morseCode_1_1

Dependencies:   mbed 4DGL-uLCD-SE

Fork of morseCode_1 by 4180 Morse

main.cpp

Committer:
colson
Date:
2018-04-28
Revision:
4:62c590826ddb
Parent:
3:6e52b66c5a0c
Child:
5:5b86521e418c

File content as of revision 4:62c590826ddb:

#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

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) {
        uLCD.printf("do this\n");
        Text_to_morse(schar);
        Text_to_morse(ochar);
        Text_to_morse(schar);
        wait(0.5);
    }
}