Skip to content
Buy 10+ on select items — save 10% auto-applied
Free US shipping on orders $35+
Order by 3pm ET — ships same-day from the US
Skip to main content

Raspberry Pi Pico W Rshell: Use REPL to Blink LED | ShillehTek

October 23, 2023 113 views

Raspberry Pi Pico W Rshell: Use REPL to Blink LED | ShillehTek
Project

Set up rshell REPL on a Raspberry Pi Pico W to run live MicroPython commands and quickly verify your workflow by blinking the onboard LED with ShillehTek.

10 min Beginner1 parts

Video Tutorial

Watch first if you want to follow along with rshell setup and using REPL on the Raspberry Pi Pico W.

Project Overview

Raspberry Pi Pico W + rshell: You will install rshell and use its REPL mode to run live MicroPython code, ending with a quick on-board LED blink to confirm everything works.

rshell is a remote MicroPython shell tool that helps you communicate with a microcontroller, manage files, and run commands without friction. It is useful for quick prototyping, learning, and repeatable workflows.

Subscribe: Youtube

Support: https://www.buymeacoffee.com/mmshilleh

  • Time: 10 to 20 minutes
  • Skill level: Beginner
  • What you will build: A working rshell REPL session that can execute MicroPython live on a Raspberry Pi Pico or Pico W

Parts List

From ShillehTek

External

  • Computer with Python 3 installed
  • MicroPython firmware installed on the Pico or Pico W
  • USB cable to connect the Pico or Pico W to your computer

Note: The steps below assume your Pico (or Pico W) is connected to your computer and already running MicroPython.

Step-by-Step Guide

Step 1 - Install rshell with pip

Goal: Install rshell on your computer so you can connect to the Pico from your terminal.

What to do: Run the following command in your terminal or command prompt:

Code:

pip install rshell

Expected result: rshell installs successfully as a Python package.

Step 2 - Start rshell and enter REPL

Goal: Connect to your Raspberry Pi Pico W and open an interactive REPL session for live MicroPython commands.

What to do: Plug in your Raspberry Pi Pico W, then start rshell from your terminal:

Code:

rshell

Inside rshell, you can type help to see available commands. To run live interactive code on your device, enter:

Code:

repl

Expected result: You see the Python prompt with three right arrows (>>>), indicating you can start scripting.

Step 3 - Blink the on-board LED from REPL

Goal: Confirm REPL is working by toggling the Pico W on-board LED using MicroPython.

What to do: Type the following line by line at the REPL prompt:

Code:

from machine import Pin
led = Pin("LED", Pin.OUT)
led.toggle()

Expected result: The on-board LED turns on or off (toggles state), confirming the connection and REPL execution work.

Conclusion

You installed rshell, opened a REPL session on the Raspberry Pi Pico W, and ran live MicroPython code to toggle the on-board LED. This workflow is convenient for quick prototyping and for interacting with your device without constantly editing and re-uploading files.

Want parts and tools for your next Pico build? Grab what you need from ShillehTek.com. If you want help customizing this workflow for your project or product, check out our consulting: https://shillehtek.com/pages/iot-consulting.