- Translator
- micro:bit
Morse code on a micro:bit
The micro:bit Foundation and MakeCode have Morse code projects you can build today: Morse Chat in the simulator or on two V2 boards with sound, a radio activity for two boards, and a decoder extension. This guide says what each one does and what it leaves out.
In short: start with Morse Chat in the simulator, or use two micro:bit V2 boards for physical radio chat. The button-based radio activity also uses two boards. Both send a dot or a dash by radio and show it on the other board. For a decoder that turns keyed signals into letters, use the pxt-morse extension that MakeCode lists. The two radio projects send dots and dashes, not letters: you key the signals, and you add the pauses.
Which micro:bit Morse code project should you start with?
Two of the pages are MakeCode lessons, one is a Foundation project with a Morse idea at the end, and one is a decoding extension. Pick by the hardware on your desk.

| Project | Published by | What you use | What it does |
|---|---|---|---|
| Morse Chat (MakeCode, Morse Chat) | MakeCode tutorial for the micro:bit V2 | The logo: press and long press. A micro:bit with sound | Sends a dot or a dash by radio and shows and plays it on the receiving board |
| Coding Activity 2: Morse Code (MakeCode, CS Intro radio activity) | MakeCode CS Intro course, Radio unit | Buttons A, B and A+B on two micro:bits | Shows a dot, a dash or a space-or-stop image on the receiving board |
| Tell me a secret (micro:bit Foundation, Tell me a secret) | Micro:bit Educational Foundation | Buttons A and B on two micro:bits, or the simulator | Sends yes or no by radio; the last step suggests changing them to dot and dash |
| The pxt-morse extension (MakeCode, pxt-morse) | Partner-provided content on the MakeCode site | Buttons or a key, plus the extension | Turns keyed signals into letters, and text into signals |
MakeCode is the editor Microsoft publishes for the micro:bit. Its extensions are code modules installed from outside the editor that add new blocks to the toolbox (MakeCode, Extensions). Morse Chat tests in a simulator inside the editor, and Tell me a secret lists the simulator as an alternative to a second board.
How does the Morse Chat tutorial work?
Sky, a pig, can only communicate in Morse code, and you talk to Sky with a micro:bit that has sound (MakeCode, Morse Chat). The logo is the key. A press sends one number by radio, and a long press sends another. The page's instruction is “Long press (count to 3!) to send a dash.” (MakeCode, Morse Chat). The logo events need micro:bit V2 hardware; the reference page warns that a V1 board shows an error code (MakeCode, on Logo Event).
The tutorial builds the program in this order (MakeCode, Morse Chat):
- Set a radio group. The page compares the group ID to a channel number.
- Make a logo press send the number 0, and a logo long press send the number 1.
- On the receiving side, check which number arrived. For 0, show a single LED and play a short tone for a quarter of a beat. For anything else, show three LEDs in a row and play a tone for a whole beat.
- Clear the screen at the end of the receiving handler.
- Test in the simulator: touching the gold logo opens a second micro:bit for Sky. On real hardware, use more than one board with sound.
Two things the page does not do are worth knowing. It explains Morse code with the example “Hi there!” but never sends letters: you press and hold the logo yourself, one signal at a time. It also does not cover the pauses between letters and words, so you add them by counting. The International Morse standard sets a dash at three dots, a letter gap at three dots and a word gap at seven (ITU-R M.1677-1). The tutorial's tones differ from that: a whole-beat dash against a quarter-beat dot makes the dash 4 times as long as the dot (MakeCode, Morse Chat). Treat it as a teaching shortcut, not as Morse timing.
What does the two-board radio activity add?
Coding Activity 2 in the MakeCode CS Intro course uses buttons instead of the logo and three signals instead of two. It starts a project called Morse code, sets the radio group to 1 and shows the words Morse Code when the program starts (MakeCode, CS Intro radio activity). Then:
- Button A sends the number 0, button B sends 1, and A+B sends 2 (MakeCode, CS Intro radio activity).
- The receiving board compares the number it gets. The page maps one number to a dot, one to a dash and one to a space or stop, and shows a different image for each (MakeCode, CS Intro radio activity).
- A pause and a clear-screen block after each image let the same signal repeat. The page notes that a second press of A shows nothing new on the receiving board until a pause and a clear-screen block are added (MakeCode, CS Intro radio activity).
The optional mods add a catch-all branch that shows an X icon for any number the program does not expect, and move the pause and clear steps out of the branches so the code is not repeated (MakeCode, CS Intro radio activity). The page says the activity focuses on radio blocks that send and receive numbers, so the signals are numbers, not letters.
Is there a micro:bit Morse code decoder?
Yes, as an extension. The MakeCode site lists pxt-morse (named bsiever/pxt-morse on GitHub) as approved content provided by a partner, so Microsoft did not write the extension. The page describes three parts: detecting keying, decoding a sequence of signals into a letter or number, and encoding text into signals (MakeCode, pxt-morse). Add it from the Extensions category of the toolbox (MakeCode, Extensions).
The page includes a Morse code trainer. You press button A for a dot and button B for a dash, then A+B when the symbol is done, and the screen shows the letter you made. The page's own example is U: press A twice, then B, then A+B (MakeCode, pxt-morse). That is , spoken di-di-dah. The extension reports an invalid code as a question mark (MakeCode, pxt-morse).
A second example, the key timing trainer, uses button A as the key. Its start block sets limits in milliseconds: a press of up to 200 is a dot and up to 1000 a dash, and a silence over 500 ends a letter while one over 2000 ends a word (MakeCode, pxt-morse). The page describes the defaults as comparable to a dit of about 160 ms with an extra long gap between words, and a block sets them (MakeCode, pxt-morse). They are not the standard's proportions. This example needs a second extension for button down and button up events, which the page names (MakeCode, pxt-morse).
If you only want to read a message that someone sent as sound or light, decoding Morse code from audio is faster than building a decoder.
Can you turn the Foundation's radio project into Morse?
That is exactly the improvement the Foundation suggests. In Tell me a secret, two micro:bits send yes or no by radio: button A sends yes, button B sends no, and a tick or a cross shows for half a second. Its radio group number can be anything from 0 to 255 (micro:bit Foundation, Tell me a secret). The last step lists ideas to improve it, including this one: “Change ‘yes’ and ‘no’ to ‘dot’ and ‘dash’ and send Morse code messages.” (micro:bit Foundation, Tell me a secret). The page offers the program in MakeCode and in Python and states a Creative Commons Attribution-ShareAlike 4.0 license (micro:bit Foundation, Tell me a secret).
How do you learn the code you are sending?
The projects move signals, not meaning, so learn the letters separately. The Morse code alphabet lists every code, learning Morse by ear teaches them in order, and the translator plays any text so you can compare your keying with the real rhythm. Morse code timing explains the proportions the tutorials skip.
Other ways to build a Morse code machine
For other hardware, see Morse code with Arduino and Morse code with Raspberry Pi. For the encoder and decoder in software, see Morse code in Python. Make a Morse code machine is the wider guide.
Sources
- Morse Chat, a MakeCode tutorial for the new micro:bit (V2). Microsoft MakeCode for micro:bit, checked 11 November 2026.
- Coding Activity 1: Marco Polo, and Coding Activity 2: Morse Code, CS Intro Radio unit. Microsoft MakeCode for micro:bit, checked 11 November 2026.
- Tell me a secret, Make it: code it. Micro:bit Educational Foundation, checked 11 November 2026.
- pxt-morse 2.0.1 (bsiever/pxt-morse), approved content provided by a partner. Microsoft MakeCode for micro:bit, checked 11 November 2026.
- on Logo Event, Reference. Microsoft MakeCode for micro:bit, checked 11 November 2026.
- Extensions, MakeCode documentation. Microsoft MakeCode for micro:bit, checked 11 November 2026.
- Recommendation ITU-R M.1677-1, International Morse code. ITU Radiocommunication Sector, October 2009.