How to Use Raspberry Pi Pico W With Node-RED

Node-Red Pico W
(Image credit: Tom's Hardware)
1

In a previous how to, we introduced MQTT (Message Query Telemetry Transport) with the $6 Raspberry Pi Pico W. In that tutorial we kept things relatively simple. Publishing and subscribing to messages using a little MicroPython and an MQTT broker. We then used an online MQTT service to interact with the Pico W. This proved that everything worked, but in this how-to, we are going to kick things up a notch and build a web application using very little code.

In this how to, we will use Node-RED, an event driven programming language that uses nodes (blocks) to create flows (algorithms) that will subscribe to a live MQTT data feed from our Raspberry Pi Pico W and use that data to create real-time charts and gauges in a web application.

Latest Videos FromTom's Hardware
Les Pounder
Associate Editor

Les Pounder is an associate editor at Tom's Hardware. He is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training program "Picademy".

  • TerryYoung2003
    Do you HAVE to send the data to the cloud if the devices are both on the same local WiFi network?
    I wanted to use this type of thing to have Pico Ws read various boat sensors (tank levels, temps and stuff) and send that data to a central Raspberry Pi 4. The issue with how you have this is that when we're out sailing, we're often out of cell range, so the cloud isn't an option.
    Given that I can already send simple data from the Pico W via a self-generated webpage, I was wondering if it could be streamed via maybe a particular IP : Port straight to Node Red on the central Pi 4, which is already reading marine NMEA data and sending it out over WiFi using Signal K.
    Reply