Extension Code Morse


#1

Hi Group,

I had started an mBlock 5 extension for Arduino in 2020 to create a complete tutorial that anyone could follow. But I had some blockages and I put that aside. I could use LED, LASER, BEEPER at the same time.

My extension had to be done in several stages.
Here are some blocks:
Goo

Morse(PIN, NUMBER_SPEED): Initialization
SOS: Send an SOS
MESSAGE(STRING): Send a message in Morse
MESSAGE_ENCRYPT(STRING, NUMBER_KEY): Send message with encryption key
SPEED(NUMBER): Modify the speed
KEY(NUMBER): Change speed

Note: My problem is that I want to be able to call the Morse block several times to send the instruction to several components: (Example: An LED, plus a LASER and a BEEPER)

2nd step

Morse_Decrypt(PIN, NUMBER_SPEED)
LookedMessage (PIN): Receive the message speaks LASER to a sensor
ListenMessage(PIN): Listen to the message by sound
DisplayMessage: Displays the received message
SPEED_DECRYPT(NUMBER): Change speed
KEY_DECRYPT(NUMBER): Change speed

Note: I was not at this stage.

If you could send me example .mexts I will try to continue my example…


#2

I don’t exactly understand how this extension is supposed to work. Can you please give further detail?


#3

NNNNNNNOOOOOOOOOOOONNNNNNNNN
I destroyed the previous message… it will be difficult to follow for the other members of the forum. So I’m going to close the discussion ;(


Hi Best-Code,

I use some for what is static like my Morse character array and others but how to make a GLOBAL variable to declare and play with my objects (I don’t know).

However, I put this extension on hold and mainly use LASER. Maybe I’ll work on it later…

Thanks


#4

You should probably use an include file of some sort (It would be a .ccp or .h).


Important things to remember about .h and .ccp files