Windows requires you to download a terminal program. Check out the Advanced
Serial Console on Windows page for more details.()
MacOS has Terminal built in, though there are other options available for download. C
heck the Advanced Serial Console on Mac page for more details.()
Linux has a terminal program built in, though other options are available for
download. Check the Advanced Serial Console on Linux page for more details.()
Once connected, you'll see something like the following.
Interacting with the Serial Console
Once you've successfully connected to the serial console, it's time to start using it.
The code you wrote earlier has no output to the serial console. So, you're going to
edit it to create some output.
Open your code.py file into your editor, and include a print statement. You can print
anything you like! Just include your phrase between the quotation marks inside the
parentheses. For example:
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
while True:
print("Hello, CircuitPython!")
led.value = True
time.sleep(1)
led.value = False
time.sleep(1)
Save your file.
Now, let's go take a look at the window with our connection to the serial console.
©Adafruit Industries Page 54 of 263