Rocket Morse Code: Part Three

Use all of the tools at your disposal to send a Morse code SOS message with lights and sounds. When times get desperate in deep space, you want any possible audience to receive your message!

Code

The code in the editor below already works. Just plug in your Code Rocket and press upload to see what it does! Tinker with it and make changes to see what each line of code controls.

Walkthrough Videos

Watch the videos for line-by-line explanation of how the example program works. Then you'll be ready to make some changes of your own!

Challenges

Can you complete the challenges? Change the code in the editor above, then upload it to your Code Rocket and see if you got the result. Don't stop here, keep experimenting with the code!


Concepts

These are the new code concepts covered in this example program. To become a great coder, read through these concepts to learn new vocabulary.

New Concept: Speed, revisited

You’ve already experienced the power of speed in your programs. Here, you can see how a program can allow you to basically do two things at once: play your message on the speaker and the LED light at one time. If you do the challenge, you’ll see that as long as you don’t add any extra delays to the program, you can add in more functionality and make the program still look like everything is happening at the same time.

New Concept: Combining programs

Combining programs is not always an easy task. With so many details, there is more to combining two programs than simply ‘copy, paste’. If you want to combine programs, we recommend that you upload the partially completed project a few times to Code Rocket to ensure you’re not creating errors that will overwhelm you later. It’s no fun to try an upload and find 50 errors!

Quiz

If you're having trouble, try to run an experimental program or look at the example code to help you find the answer.

1. How many code commands can be added to a program before it freezes?