Outputting the REPL to the Reader

Now that the reader is properly connected to your computer, it's time to get the CircuitPython REPL up and running.

Please note: the Mu editor's REPL doesn't yet work with the screen reader so we will have to use the advanced serial console.

Follow the directions in the following pages to get your REPL up and running.

The following program is the example code for this project but you can use any program you'd like!

Download: file
import time
import random

helloWorldList = ["hi earth!",
                  "hello world",
                  "howdy, partner.",
                  "hey there",
                  "ahoy maties!",
                  "hola terra!",
                  "sup.",
                  "hi ya",
                  "what's happenning???",
                  "hi hello hey there whats good?",
                  "twenty char phrasee"
                  ]

while True:
    helloNum = random.randint(0, len(helloWorldList)-1)
    print(helloWorldList[helloNum])
    time.sleep(2)

To use, copy the code into a text editor or Mu. Save as code.py. Copy the code.py file to the CIRCUITPY drive that appears when the board is connected to your computer with a known, good USB data plus power cable. The code will run once the file transfer completes.

This guide was first published on Aug 28, 2019. It was last updated on Aug 28, 2019.
This page (Outputting the REPL to the Reader) was last updated on Jan 11, 2020.