Robotics Python
Expert
60 mins
Teacher/Student led
+110 XP
What you need:
Chromebook/Laptop/PC
USB Cable
Raspberry Pi PICO W
iPad/iPhone USB adapter

PICO Web Server

In this hands-on lesson, students will learn how to set up a basic web server using the Raspberry Pi PICO W with CircuitPython. The server will serve a webpage that can be accessed from any device on the same network.

Learning Goals Learning Outcomes Teacher Notes

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - What is a Web Server?

    Imagine you're at a library, and you request a specific book. The librarian goes and fetches the book for you from the shelves. In the world of the internet, a web server acts like the librarian. When you type a website address into your browser, you're essentially asking the web server (our digital librarian) for a specific "book" or webpage. The server then "fetches" this page and sends it to your browser for you to view.

    In this lesson, you will transform your Raspberry Pi PICO W into such a librarian! It will hold a webpage and deliver it to anyone who asks (or any device that connects to it). Just like a big server serving websites like Google or this website, but on a much smaller and simpler scale.

    The Raspberry Pi PICO W is a tiny computer, not much larger than a coin, but powerful enough for our task. This version of the Pico comes with wireless capabilities, which means it can connect to WiFi. By the end of this lesson, your PICO W will be part of your WiFi network, and any device connected to the same network, like your phone or laptop, can ask it for the webpage and view it in their browser.

    Let's dive in and set up our own mini-librarian!



    2 - Connect your PICO W

    First connect your Raspberry Pi Pico W to either:

    • your computer using a micro USB cable.
    • your iPad using a micro USB cable and a iPhone/iPad to USB adapter.

    3 - Choose Your Editor

    Depending on the device you are using, you will need to use a different editor:

    • If you are using a PC or laptop, open your web browser and go to code.circuitpython.org.
    • If you are using an iPad, download and install the Koder app from the App Store.

    4 - Connect the Editor to Your Pico

    If you are using the CircuitPython editor (code.circuitpython.org) then we need to connect the editor to your PICO W so that we can transfer code to it.

    You can skip this step if you're using an iPad.

    5 - Create a New File

    Create a new file in your chosen editor and with the name 'code.py'.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more