User Avatar
Uncategorized

Computer – micro:bit Talk

Lifetime
All levels
5 lessons
0 quizzes
1 student

What it’s about

This tutorial is the first prerequisite in the Cybersecurity Series. It is not needed in order to build and use the cyber:bot robot, but it builds useful skills!

This tutorial introduces some ways to communicate with your micro:bit module through a computer.  It’s a lot like texting, but you’ll be exchanging messages with your micro:bit instead of another person.  The app for this is called the serial monitor, and you already experimented with it in Use the Serial Monitor. The serial monitor is a kind of terminal application, and it’s part of both the python.microbit.org online editor, and Mu. 

You will use a terminal to communicate with the micro:bit in two ways: REPL, and Serial.  REPL is an interactive programming mode that allows you to make the micro:bit execute MicroPython statements you type into the terminal.  Serial is a mode where a script can make the micro:bit send you messages, ask questions, process your answers, and display results.

Before you start

You will need:

  • A micro:bit module, alone or on a cyber:bot
    • IMPORTANT: For terminal activities with the python.microbit.org editor, the micro:bit modules’s firmware MUST BE UP-TO-DATE.  Go to https://microbit.org/guide/firmware/ and follow the instructions.  It’s quick and easy, just follow the four steps.
  • USB A to MicroB cable
  • Computer with at least one USB A port (or a C to A adapter)
  • An up-to-date Chrome or Microsoft Edge browser.

Complete these tutorials first:

After you finish

You will be able to write MicroPython scripts that make your micro:bit receive, process and respond to text and numeric values you type into a serial monitor  Along the way, you will build basic skills for tutorials on these subjects: