30 mins - 1hour

Morse Code

30-60 min

Ages 8+

What Will You Make?

We will create a communicator with Micro:bit, which sends, receives and translates morse code. To experiment and learn morse code.

What Will You Learn?

We will learn to program our micro:bit to send information by radio frequency, specifically Morse code, learning how it works by making a translator for letters and numbers.

Grab your materials....let's start making!

Step 1

Let’s go to make code, and create a new project.

Step 2

In the blocks menu we go to “Radio” and take the “radio set group (1)” block and put it inside the “on start” block, we return to “Radio” and enter the “more” menu We drag the “radio set trasmit power (7)” block after the previous one.

Step 3

First I eliminate the “forever” block.  Then go to the “input” section where we are going to drag out the first block “on button [A] pressed” and put it in our work area. Next we go to “Basic” for the “show leds” block” and we put it inside the previous one and draw our point.

Send info between two Micro:bits

Step 4

To send information between the micro:bits, we go to the menu in the “Radio” section, we take the second block “radio sin number (0)” and we put it below our leds, for the pause we go to “Basic” , we take the “pause ms (100) ” block and we put it after the previous block and we change 100 by 200, then we go to “Basic” we take the “show leds”.

Step 5

Select the “on Button [A] pressed” block, we copy and paste our blocks, we change the “A” to “B”, in the “show leds” block we draw a line and the value 0 of ”radio send number ” we change it to 1.

Step 6

We select our “on Button [B] pressed” block, we copy and paste it, to duplicate it, we change the “B” of the purple block for “A + B”, we continue with “show leds” and we change the line for a arrow, the next thing is to change the 1 of “radio send number” by 2.

Adding conditions

Step 7

For the next word we go to “Input”, to the section that says “micro:bit (v2)”, we take the first block “on logo [pressed]” we place it in our work area, we go to “Basic ” we take the “show leds”, we place it inside the block that we just added and we draw a diagonal. We return to “Radio” we take the “radio send number (0) we place it under our “show leds” we change the 1 to 2, we return to “Basic” for our pause that we will place next, we write 200 ms, we go to “ Basic” and then place the “show leds” block.

Step 8

We can now send information, now we are going to add the blocks to receive information. We go to “Radio”, we select “on radio received (receivedNumber)” we place it in our work area. We go to “logic” we select our second condition and we place it after the previous one, we return to “logic”, we take the first comparison, we will place it in the place of “<true>” of if. We select the “receivedNumber” and place it in the position of the first 0, it will check if we receive the number 0 we want…, we will go to “Basic” and place the “Show leds” block inside the condition and draw the point.

Step 9

We are going to add more conditions, by clicking on the plus symbol at the bottom of our green block, we are going to add 3 more. We go to “logic” you select the first condition, we put it between the “if < > then ” we do the same for the other conditions, we take the “receivedNumber” and we put it in the first 0 of our second condition, we repeat for the other two conditions. The second condition we change the 0 for a 1 because it is to detect the line, we go to “Basic” for the “show leds” we put in the condition and we draw a line.

Step 10

We go to our next condition, we change the 0 to 2, we do the same as our previous step, we place the “show leds” block inside the condition and we draw an arrow

Step 11

For the last condition change the 0 to 3, we place another “show leds” with the drawing of a diagonal. We are going to delete “else” since we will not use it, next to the word we have a button with a “-” we click on it.

Clear Screen & Enjoy!

Step 12

Since we display this information on the screen, we want to wait a while and then clear the screen. For that we go to “Basic” we take the pause, we place it after the green block of conditions, we change the “100” by “200”, we return to “Basic” we drag a “show leds” block, after our previous block so that wipe the screen.

Step 13

Done! This is the code to send and receive morse code among other micro:bits.

Finished Project Samples

Resources

Media

What Is Happening Here?

Radio frequency, encryption, mnemonic methods

We program our Micro:bit to send and receive information by radio frequency, in this way we can experiment with encryption together with many more people by sending messages and then using mnemonic methods.

What Is Next?

Additional Resources

You can experiment with more blocks and develop a translator from morse code to letters or numbers, link to morse translator:

https://github.com/Diego-Luna/Maker-Camp-2022/tree/main/Microbit%20-%20morse

You can also create your own system of symbols and rules that allows you to compose and decrypt messages.

Don’t forget to check out the “Crochet bracelet” project from MoonMakers to experiment with crochet and yarn to finish your project.

About MoonMakers

MoonMakers — led by Camila and Diego Luna —  are a community of creators passionate about knowledge. A Makerspace, an open space with different digital manufacturing machines. And a YouTube channel where we promote science, technology and the maker movement.

MoonMakers have collaborated with companies such as: Sesame Street, Make Community and in Mexico with Educational Television and Fundación Televisa, creating educational content.

We have given workshops throughout the Mexican Republic with: Talent Land, Secretary of Education in Jalisco, Conacyt, Centro Cultural España.

MoonMakers

Materials:

  • 2 Micro:bit.
  • 2 battery bases
  • 2 Batteries
  • 2 micro usb to usb cable

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK