Firstly, ensure that your Raspberry Pi Pico is connected to your computer via a MicroUSB cable.
00:23
If you don't have screen installed you can install it on Raspbian (or any Linux distro based on Debian) using sudo apt install screen .

If you're on macOS screen should already be installed.
00:29
To open the serial port on Linux use the command screen /dev/ttyACM0 115200 .
00:43
The serial port naming conventions are a little different on macOS. To open the serial port on macOS use the command screen /dev/tty.usbmodem0000000000001 115200 .

Note: If it is not showing up as /dev/tty.usbmodem0000000000001 115200 , enter the command ls /dev/tty.usb* to list serial ports derived by a USB device. If you are unsure, unplug the micro USB connector and see which one disappears.
00:58
Enter screen /dev/tty.usbmodem0000000000001 115200 and press the return key.
01:23
If your terminal window is blank (like this one), press the return key for a prompt.
01:38
Your prompt will look like this with >>>
01:43
We can enter the command help() for instructions on what we can do on the prompt. 
01:47
... and this will print out example commands that we can use.
01:53
The REPL can execute valid Python code and return the output to us. 

Let's create two variables and add them together.
01:56
Type into the REPL a = 2 and then hit the return key.
02:03
Now type into the REPL b = 3 and then hit the return key.
02:08
We can add the two variables together by typing a + b and then hitting return.
02:13
This will output the answer of 5 .
02:18
To disconnect from your screen session first press the shortcut control + a.
02:25
And then press the shortcut control + \ (backslash).
02:32
You'll be asked if you really want to exit, and to do so we'll press the Y key.
02:37
We're now back in our regular terminal.
02:42
main.py
xxx
Terminal
screen /dev/tty.usbmodem0000000000001 115200
>>> led = Pin(25, Pin.OUT)
>>> from machine import Pin
Breadboard
Breadboard
Mark
© 2022 Chick Commerce Pty Ltd