# Single Sensor Node (ESP32-S2-Mini or RPi Pico-W)

**URL:** <https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951>\
**Category:** Share Your Projects\
**Created:** [26 January 2024 17:42 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951 "2024-01-26T17:42:42Z")\
**Posts on this page:** 19\
**Page:** 2

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [6 June 2025 12:31 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/21 "2025-06-06T12:31:28Z")

</div>

> [@AliFlamenco1984](#):
>
> instead writing code in Espressif IDE and C Language for them, create flow and generate C code and then flash ESP32 to run this flow

If you don't like the Espressif IDE, there are a bunch of alternative firmwares. I use Tasmota.  
This list was offered by AI and therefore might contain either truth or bollix:

1. **Arduino Core for ESP32** : This is a popular choice for those familiar with the Arduino ecosystem. It provides a simple programming environment and a wide range of libraries.
2. **MicroPython** : A lean implementation of Python 3 designed for microcontrollers. It allows for quick prototyping and is great for those who prefer Python over C/C++.
3. **ESP-IDF (Espressif IoT Development Framework)**: The official development framework for the ESP32, providing low-level access to the hardware and advanced features.
4. **PlatformIO** : An open-source ecosystem for IoT development that supports multiple frameworks, including Arduino and ESP-IDF, allowing for a more integrated development experience.
5. **NodeMCU** : A firmware based on Lua, which is easy to use for IoT applications. It provides a simple API for controlling hardware.
6. **Tasmota** : Primarily used for home automation, Tasmota is a firmware that allows for easy integration with various smart home devices and protocols.
7. **ESPHome** : A firmware designed for home automation, particularly with Home Assistant. It allows users to create custom firmware for their ESP32 devices using a simple YAML configuration.
8. **Zephyr** : An open-source real-time operating system (RTOS) that supports the ESP32, suitable for more complex applications requiring multitasking.
9. **FreeRTOS** : A real-time operating system that can be used with the ESP32, providing features for task management and scheduling.
10. **Mongoose OS** : A lightweight operating system for IoT devices that supports JavaScript and C/C++, making it easy to develop applications.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [6 June 2025 12:56 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/22 "2025-06-06T12:56:05Z")

</div>

I've used MicroPython for nearly all of my recent projects. Quick and easy prototyping

> **[MicroPython - Python for microcontrollers](https://micropython.org/download/)**
>
> MicroPython is a lean and efficient
> implementation of the Python 3 programming language
> that includes a small subset of the Python standard library and is
> optimised to run on microcontrollers and in constrained environments.

I find Thonny IDE is great for creating Python scripts and loading them onto the ESP32.

> **[Thonny, Python IDE for beginners](https://thonny.org/)**

There are loads of Python libraries that make creating scripts a 'breeze'.

I also make use of Tasmota on my SonOff mains switches.

---

<div class="post-metadata">

**Author:** ![AliFlamenco1984](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AliFlamenco1984](https://discourse.nodered.org/u/AliFlamenco1984)\
**Post date:** [6 June 2025 14:09 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/23 "2025-06-06T14:09:27Z")

</div>

Most of all you said are code-base like python and C/C++. they are not flow control like node-red

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [6 June 2025 14:28 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/24 "2025-06-06T14:28:17Z")

</div>

Ah, but they (at least the ones I've used) can communicate over MQTT with Node-red.

And with Tasmota at least, once you have told it what sensor is attached, it sends the sensor data automatically, zero programming required.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [6 June 2025 14:39 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/25 "2025-06-06T14:39:04Z")

</div>

_This is what ChatGPT says about running Node-RED on an ESP32._

You **cannot run Node-RED directly on an ESP32**. Node-RED is a JavaScript-based application built on **Node.js** , which is far too resource-heavy for the limited CPU, RAM, and storage of the ESP32 microcontroller.

* * *

### 🔧 What You **Can** Do:

While Node-RED can't run **on** the ESP32, the ESP32 works **very well with** Node-RED:

#### ✅ Use ESP32 as a remote sensor or controller

- Program it with **Arduino** or **MicroPython**.
- Connect it to **Node-RED via MQTT** , HTTP (REST), or WebSockets.
- It can send sensor data or receive control commands.

#### ✅ Run Node-RED on a host (like):

- Raspberry Pi
- Orange Pi
- PC or Laptop
- Server or VM

Your ESP32 becomes a **node** in the system that talks to Node-RED.

* * *

### 📡 Example Setup:

1. ESP32 reads temperature from a DHT sensor.
2. Sends data via **MQTT** to a broker (e.g., Mosquitto).
3. Node-RED subscribes to that MQTT topic and displays the data on a dashboard.

* * *

### 🧠 Alternative on ESP32?

If you're after **graphical logic building** like Node-RED but want it **on the ESP32** , you're out of luck — there's no full-featured equivalent. You’ll need to design the logic manually in code.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 June 2025 14:53 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/26 "2025-06-06T14:53:34Z")

</div>

There is [node-red-mcu](https://github.com/phoddie/node-red-mcu), which may do what you want, but I don't know the current status of the project.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [7 June 2025 04:00 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/27 "2025-06-07T04:00:19Z")

</div>

> [@AliFlamenco1984](#):
>
> read MQTT for example and send data on serial port

What is it you are trying to do ?

You could send MQTT to the ESP, and then have it sent from the ESP serial pins.

EDIT: an example of how you might do that with Tasmota installed on the ESP -

> **[Commands - Tasmota](https://tasmota.github.io/docs/Commands/#serial-bridge)**
>
> Documentation (Wiki) for Tasmota

_ **In the interests of impartiality other ESP firmware is available 😉** _

---

<div class="post-metadata">

**Author:** ![AliFlamenco1984](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AliFlamenco1984](https://discourse.nodered.org/u/AliFlamenco1984)\
**Post date:** [7 June 2025 19:06 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/28 "2025-06-07T19:06:21Z")

</div>

yes you are right. but in IOT scope, many people are active and some of them are not programmer They prefer visual language to text base. if there is a way to write code for ESP in visual language , they will be more happy. like XOD

---

<div class="post-metadata">

**Author:** ![AliFlamenco1984](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AliFlamenco1984](https://discourse.nodered.org/u/AliFlamenco1984)\
**Post date:** [7 June 2025 19:07 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/29 "2025-06-07T19:07:54Z")

</div>

my means, we can add a node to node-red, and convert the flow to C language and run on ESP

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 June 2025 20:36 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/30 "2025-06-07T20:36:59Z")

</div>

> [@AliFlamenco1984](#):
>
> we can add a node to node-red, and convert the flow to C language and run on ESP

That is effectively what the project I linked to earlier does. Did you look at that?

> **[GitHub - phoddie/node-red-mcu: Node-RED for microcontrollers](https://github.com/phoddie/node-red-mcu)**
>
> Node-RED for microcontrollers

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [8 June 2025 06:55 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/31 "2025-06-08T06:55:29Z")

</div>

As an alternative, you might want to consider using Microblocks on your micro-controller

> **[Home](https://microblocks.fun)**
>
> MicroBlocks is a blocks programming language for physical computing inspired by Scratch.

There is a discord forum for it if you need to ask any questions

> **[Discord - Group Chat That’s All Fun & Games](https://discord.com/channels/1000653853491998760/1000653853491998762)**
>
> Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.

---

<div class="post-metadata">

**Author:** ![AliFlamenco1984](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AliFlamenco1984](https://discourse.nodered.org/u/AliFlamenco1984)\
**Post date:** [11 June 2025 04:13 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/32 "2025-06-11T04:13:03Z")

</div>

Thanks Colin. I am searching on it.  
Thanks alot.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [20 June 2025 17:33 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/33 "2025-06-20T17:33:47Z")

</div>

Amazing that - after we spent a lot of time to establish a tool to run Node-RED flows on MCUs - people still tend to promote stuff like MicroPython. 😐  
Following the hint of @Colin, I can only encourage you to test the [node-red-mcu-plugin](https://flows.nodered.org/node/@ralphwetzel/node-red-mcu-plugin). If you run into issues, just get in contact with me or @phoddie; we'll try to provide appropriate support!

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [21 June 2025 13:54 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/34 "2025-06-21T13:54:52Z")

</div>

> [@ralphwetzel](#):
>
> Amazing

My full respect, it is indeed amazing how you managed this! As long time user of ESPHome for small devices like esp32, I now got interested to try it out. Clever thing, this integration with a Node-RED instance to manage it, pretty cool!

---

<div class="post-metadata">

**Author:** ![AliFlamenco1984](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AliFlamenco1984](https://discourse.nodered.org/u/AliFlamenco1984)\
**Post date:** [26 June 2025 21:58 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/35 "2025-06-26T21:58:18Z")

</div>

I want to add nodes to node-red-mcu. I am a senior embedded developer and lately I knew node-red. I like to help and develope nodes to node-red-mcu and make it better to use for other people.

---

<div class="post-metadata">

**Author:** ![AliFlamenco1984](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AliFlamenco1984](https://discourse.nodered.org/u/AliFlamenco1984)\
**Post date:** [4 July 2025 06:48 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/36 "2025-07-04T06:48:40Z")

</div>

As I understood, If I want to add MCU like LPC1768, I should add hardware platform to Moddable firstly.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [4 July 2025 20:51 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/37 "2025-07-04T20:51:55Z")

</div>

> [@AliFlamenco1984](#):
>
> LPC1768

That's a pretty long way to go - as you would have to integrate this into the SDK in all its depth.

---

<div class="post-metadata">

**Author:** ![AliFlamenco1984](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AliFlamenco1984](https://discourse.nodered.org/u/AliFlamenco1984)\
**Post date:** [5 July 2025 07:43 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/38 "2025-07-05T07:43:39Z")

</div>

> [@ralphwetzel](#):
>
> That's a pretty long way to go - as you would have to integrate this into the SDK in all its depth.

yes that is not simple, but useful. It can be done for arm cortex-m3 generally.

---

<div class="post-metadata">

**Author:** ![AliFlamenco1984](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@AliFlamenco1984](https://discourse.nodered.org/u/AliFlamenco1984)\
**Post date:** [5 July 2025 07:46 UTC](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951/39 "2025-07-05T07:46:36Z")

</div>

This link is for discussion about it.

> **[STM32-Arm Cortex · Moddable-OpenSource moddable · Discussion #1513](https://github.com/Moddable-OpenSource/moddable/discussions/1513)**
>
> Moddable SDK doesn't support Arm Cortex-M4 and M3 like STM32F207 or LPC1768. I Think added this is usefull. As Node-red-MCU uses Moddable sdk, added familiar MCU like LPC1768 or STM32F207 to it can...

[Previous page](https://discourse.nodered.org/t/single-sensor-node-esp32-s2-mini-or-rpi-pico-w/84951.md?page=1)
