A microbit device displays S E N D I N G and a second microbit displays R E C I E V E D.


In this activity, students use their knowledge of coding to create a system that can send and receive radio signals. Students then encode a message into the signal that can be decoded by other students.



  • Depending on student abilities, students can code in a text-based language, such as Python or JavaScript, or a visual-based language, such as MakeCode, Blockly, or Scratch.
  • Some devices, such as Micro:bits, have built-in radio receivers, transmitters, LEDs, etc.. Other devices will need to have them attached and will require additional coding to function.
  • When working with a limited number of devices, check to see if the microcontroller you are using has an online emulator that students can use to test their code before loading it to the device(s).
  • Depending on availability of devices, consider splitting students into groups that write code for receiving devices or transmitting devices exclusively.
  • Students should run and debug their code throughout the programming process rather than waiting to test everything at the end.


NASA has been sending robotic spacecraft into the solar system for more than five decades. These mechanical explorers have ventured out to study every planet in the solar system and more, serving as our eyes and ears on their journeys to these far-off worlds by sending wondrous images and fascinating information back to Earth.

As Earth rotates on its axis, the locations of each of the DSN stations is identified with a parabolic grid extending from the location out into space.

The Deep Space Network is made up of three complexes of antennas located approximately 120 degrees apart so we never lose touch with spacecraft even as Earth rotates. Image credit: NASA/JPL-Caltech | + Expand image

But none of these missions of discovery would have been possible without NASA’s Deep Space Network, or DSN – a worldwide system of sensitive antennas that communicates with interplanetary spacecraft. The Deep Space Network is made up of complexes of antennas at three locations around the globe: one complex in Goldstone, California (in the Mojave Desert), one near Canberra, Australia, and one near Madrid, Spain. This arrangement allows for any one station to have a line of sight with a spacecraft as Earth rotates. When a spacecraft “sets” below the horizon (like the Sun does at the end of each day) as viewed from one antenna station, another antenna station can track the spacecraft as it rises above the horizon at that location. This repeats as Earth rotates and the spacecraft moves out of view of the second station and into view of the third, and so on.

Watch this video to find out how NASA uses giant antennas stationed around Earth to navigate faraway spacecraft. | Video Transcript

A large parabolic dish with its antenna suspended above the center by three metal supports, like legs on a stool, faces the 9 o'clock position in the image. The dish is surrounded by a desert landscape and pictured during sunset.

A 34-meter antenna at the Goldstone Deep Space Communications Complex in Goldstone, California. Image credit: NASA/JPL-Caltech | + Expand image

Signals sent between the Deep Space Network and spacecraft travel millions, even billions, of kilometers, yet these signals are transmitted at very low power, usually at about the same wattage as a refrigerator light bulb (20 watts). As the signal travels to Earth, it weakens. Signals arriving at DSN antennas on Earth can be as weak as a billionth of a billionth of a watt. That is 20 billion times less than the power required for a digital wristwatch.

To hear the low-power spacecraft signal, receiving antennas on Earth must be very large, with extremely sensitive receivers. The signal from the spacecraft travels in a straight line, and it can be focused by a curved reflector dish (parabolic antenna). For this reason, it’s crucial to have large antenna dishes with precisely shaped surfaces. The Deep Space Network’s parabolic dishes, which range from 26 to 70 meters (85 to 230 feet) in diameter, are focusing mechanisms that concentrate power when receiving data and also when transmitting commands. The antennas must point very accurately toward the spacecraft because an antenna can “see” only a tiny portion of the sky – as though it's looking at the sky through a soda straw.

NASA experts talk about the system of antennas that make up the Deep Space Network and how it's used to communicate with distant spacecraft and collect science. | Watch on YouTube

A giant antenna dish is shown in a desert landscape at dusk. At the center of the dish is a donut-shaped structure filled with honeycomb shapes topped by shapes that look like slices of pie.

This artist's concept shows what a new antenna dish capable of supporting both radio wave and laser communications, will look like when completed at the Deep Space Network's complex in Goldstone, California. Image credit: NASA/JPL-Caltech | + Expand image

To hear the spacecraft’s faint signal, the antennas are equipped with amplifiers, but that presents two challenges. First, the signal becomes degraded by background radio noise (static) emitted naturally by nearly all objects in the universe, including the Sun and Earth. The background noise gets amplified along with the signal. Second, the powerful electronic equipment amplifying the signal adds noise of its own. The Deep Space Network uses highly sophisticated technology and techniques, including cooling the amplifiers to a few degrees above absolute zero and employing special coding techniques so the receiving system can distinguish the signal from the unwanted noise.

The long wavelengths of radio waves mean that signals can better resist distortion, but radio waves are not very efficient when it comes to transmitting a lot of information in a short amount of time. As more and more complex data is being sent across space, NASA is exploring higher frequency (and therefore shorter wavelength) light sources to be able to beam messages more efficiently.

This new form of spacecraft communication, called Deep Space Optical Communications, will use a focused beam of infrared light to transmit information. Switching from the longer wavelengths of radio to the shorter wavelengths of infrared light could result in 100 times more data being transmitted.

Learn more about the Deep Space Network and see which spacecraft we are communicating with at this very moment on the DSN Now interactive.


  1. Ask students how humans communicate with spacecraft. If necessary, share with students that radio signals are used to send commands to and receive information from spacecraft, such as photos and measurements.
  2. Tell students their challenge is to program a microcontroller to send a signal, receive a signal, or both, and include code that instructs an output device, such as an LED or speaker, to indicate that a signal has been sent or received.
  3. Screengrab of Makecode script with 'radio set group (2)' inside the 'on start' code block followed by 'radio send number 42' inside the 'on button A pressed' code block.

    Example send-signal script in Makecode. | + Expand image

  4. Sending a signal: Students will code their device to send a radio signal on command. This should be a signal triggered by an input rather than a constant radio signal.

    Students should consider:
    • What will be sent? A single digit? A string of characters? Something else?
    • What type of input will trigger the sending of the signal?
    • How will the device confirm the signal has been sent?
    • Can the output power level be adjusted?
    • How far can the signal travel?
    • How can a receiving device identify the source of this signal?

    Example send-signal script in JavaScript.

    Example send-signal script in Python.

  5. Screengrab of Makecode script with 'radio set group (2)' inside the 'on start' code block followed by 'show string [receivedNumber]' inside the 'on radio received [receivedNumber]' code block.

    Example receive-signal script in Makecode. | + Expand image

  6. Receiving a signal: Students will develop code that will allow a device to receive a radio signal from another device. The device should indicate, in some way, that a signal has been received.

    Students should consider:
    • How will the device display the received signal? Characters on an LED grid? Blinking lights or a buzzing sound in Morse code? Something else?
    • How will the device distinguish the signal from one transmitter over another?
    • How far from the transmitting device can the receiving device be and still receive a signal?
    • Can the device send a return signal to the transmitting device?

    Example receive-signal script in JavaScript.

    Example receive-signal script in Python.

  7. If students are working in groups to write code for receiving or transmitting devices exclusively, be sure they work together to ensure their devices can communicate with each other.
  8. Testing devices: Students should test and debug their code throughout the development process. When students have a working version of the code for sending and receiving signals, they should practice sending signals between their devices to make sure their code works “in the real world” and is not affected by other devices. Students should also test what materials block or reflect signals and what materials allow signals to pass through.


  • What do spacecraft operators need to consider when planning communications between Earth and spacecraft? Other spacecraft communicating with Earth, confirmation that signals have been sent and received, lost signals
  • What do spacecraft designers have to consider when building spacecraft? Signal frequency, signal strength, distance from Earth


  • Students can explain what their code is supposed to do.
  • Devices send and/or receive signals as designed.


Explore More

Educator Guides & Resources

Student Activities

Explore More