-
Connect the Microbit via USB to the computer.
-
Run the following command to determine the USB device path.
ls /dev/cu.usbmodem*The output should be similar to this.
/dev/cu.usbmodem102 -
Run the following command to output data to the Microbit.
echo 'Hello, world!' > /dev/cu.usbmodem102
The 'Hello, world!' string will not be displayed in the terminal, but the orange light on the Microbit will flash each time you run the command.
-
Run the Tio program to establish a serial connection to the Microbit. The default settings for Tio are sufficient.
tio /dev/cu.usbmodem102
-
Open a new terminal window, and change into the
projects/06_microbit_send_stringfolder. Run the following command to flash the program to the Microbit.cargo embed
-
Review the
tioconsole and the text "The quick brown fox jumps over the lazy dog." should appear. Push the reset button on the Microbit and the text should be outputted to the Tio console again and again. -
To exit Tio, in the Tio terminal window, type
ctrl+t, followed byq. -
To exit the Rust embedded program, type
ctrl+c.