What You'll Need

SETUP
Participants

Participants: 1

Devices

Devices: 1

BLOCKS
Start Trail Block Forward Block Turn Right Block Repeat Block

1. Planning

Morse code is a method used in telecommunications to encode text characters as standardized sequences of two different signal durations, called dots and dashes.

SOS is a Morse code signal used internationally meaning "Save Our Souls."

Here's a chart where you can see all the letters and numbers in morse code.

Morse code chart

2. Starting the Message

Let's first write a dot.

Dot blocks
Dot capybara

3. Writing the First Letter

Now let's write three dots for the first "S".

Dot

Idea Hint: Remember to add an empty space between each dot.

Capybara writing 'S'

4. Optimizing the First Letter

Now let’s optimize the code, making it more efficient, getting the same outcome with less blocks.

How can we do it? What blocks seems to be repeated? How many times are they repeated?

Capybara writing 'S'

The four blocks grouped in the bracket are repeated three times. So let's put them inside a repeat block, to get the same behavior with less blocks.

Capybara writing 'S' with repeat block

5. Writing the Second Letter

Now let’s add the 3 dashes for the “O”.

Capybara writing 'O'

Idea Hint: Remember that the dash length is 3 times the dot length.

6. Writing the Third Letter

And add the last 3 dots for the last "S".

Capybara writing 'SOS'
Capybara writing 'SOS'

Take it Further

Now take the Morse Code chart and write your own secret word/message.

IdeaHint: Start with pen & paper first!

...and beyond!

Now create your own secret code!

Start with pen & paper. Create a unique code for all the letters in the alphabet, using dots and dashes. And then code your Capybara to write your secret message!

Block Inventory

EVENTS

When character is touched

MOTION

Forward 10 Turn Right 120 Turn Left -200

LOOKS

Start Trail End Trail

CONTROL

Forever Repeat