Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Cybersecurity: Radio Basics

Cybersecurity: Radio Basics

Unidirectional Texts

Time to choose your hardware setup!

  • Complete one of these:
    • Option 1: Connect each micro:bit to a different computer.
      • Use USB cables to connect a micro:bit to each computer.
      • In each computer, open the python.microbit.org editor, click the Connect button, and set up the connection.
    • Option 2: Connect the micro:bit modules to different USB ports on the same computer.
      • Use USB cables to connect two micro:bits to two USB ports on your computer.
      • Open two separate chrome browsers, and take each one to python.microbit.org.
      • Click the Connect button in one browser, choose one micro:bit from the list, and confirm by clicking Connect in the dialog.
      • Click the Connect button in the other browser, choose the other micro:bit from the list, and confirm by clicking Connect in the dialog.

If you accidentally connect both browsers to the same micro:bit, you might need to unplug/replug their UB cables and repeat the browser connecting steps.

It is time to decide which micro:bit you want to be the sender and which one you want to be the receiver. You will start with the browser connected to the receiver micro:bit

  • Open the receive_radio_test_message in the receiver micro:bit.
  • Update the script to your assigned channel if you are working in a classroom setting. (Each pair of students should share a channel.  Channels should be evenly spaced in the 0…83 range.)
  • Flash the script.
  • Click the Open Serial button, and make sure the terminal displays the micro:bit radio receiver message.  

Now, you will use the browser connected to the sender micro:bit.

  • Enter, save, and flash the text_terminal_to_radio script to the sender micro:bit.
# text_terminal_to_radio

from microbit import *
import radio

radio.on()
radio.config(channel = 7)

sleep(1000)

print("micro:bit radio sender")

while True:
    message = input("Send: ")
    radio.send(message)
  • Click the Open Serial button.
  • Verify that the “micro:bit radio sender” messages is printed.
  • Click in the transmitter terminal next to the Send: prompt and type a message like  Hello! And press Enter.
  • Verify that the receiver micro:bit’s terminal displays Receive:  Hello!
  • Try typing some more messages and verify that the receiver micro:bit is receiving them.
  • Try sending longer messages. Do all the characters make it through? How many can go through in one message?

Sender terminal

Receiver terminal

 


Printer-friendly version
Texting with Terminals
Prev
Bidirectional Texts
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress