Sending a textstring in morsecode speed to a LCD display

Hello. I’m a Ham radio operator and totaly new with Arduino
I just started to learn and wants to combine Arduino hardware and programming with my Ham Radio hobby in the future.

I’ve found a sketch thats sends a text string in morsecode to a buzzer
I wants the textstring to appear in the same speed of the morsecode also on a LCD display

I’ve added the code for the LCD display already and can put the whole textstring at once on the display
But now i’m struggeling with how to change the code so that the textstring will appear at the same time on the display as the morse code is send
Ï’ve put the sketch in the attachement

Help is wanted. Thanks…

Morse02_cq_pa0gtb_tone_and_lcd_display.ino (8.25 KB)

But now i'm struggeling with how to change the code so that the textstring will appear at the same time on the display as the morse code is send

So, you don't want the String splatted on the LCD all at once. Why does the code then do that?

It doesn't seem that difficult to determine where a given character is output.

That code is horrid, though. get_mbyte() should NOT be diddling with a global variable. It should return a value. morseout() should not be outputting the value in a global variable. It should take a value.

The code should NOT be using Strings AT ALL.

If your morseout() function just produces a single character then why not call a function at the end of it to output the same character to the LCD?

...R

I've seen numerous mentions of Morse code senders over the years. You should be able to find a better example than the one you've chosen. Try this search page.

Robin2:
If your morseout() function just produces a single character then why not call a function at the end of it to output the same character to the LCD?

...R

Ok, as i said, is all new for me....
can you give me an example of this function you mentioned ?

Arctic_Eddie:
I’ve seen numerous mentions of Morse code senders over the years. You should be able to find a better example than the one you’ve chosen. Try this search page.

Thanks for your comments
This code is not intended for a complete morse encoder, Just to practice te translation of text to morsecode, audio to buzzer and putting the same on display

i’m looking for the function how to determine the character which is send out to the buzzer and put on on the LCD ?

i'm looking for the function how to determine the character which is send out to the buzzer

You HAVE a function, morseout(), that deals with the data in the global variable mbyte (a stupid name for a variables whose type is NOT byte). YOU have the responsibility for determining what is in that variable when the function is called.

pa0gtb:
Ok, as i said, is all new for me....
can you give me an example of this function you mentioned ?

void charToLcd( char inChar) {
    lcd.print(inchar);
}

I may not have the details perfect but you should get the idea.

...R