EmbeddedRelated.com
The 2026 Embedded Online Conference

Using a board with NuttX RTOS as an RS-485 / Modbus Slave Device

Alan C AssisAlan C Assis December 22, 2024

This practical walk-through shows how to turn a NuttX-equipped board into an RS-485 Modbus RTU slave using a cheap MAX485 transceiver and an STM32F4Discovery board. It explains why a simple UART plus a GPIO for DE/RE is enough, why the RP2040 needs special handling, and gives step-by-step configuration in NuttX, wiring for the transceiver, and a quick test using FreeModbus and mbpoll.


How to use analog input (ADC) on NuttX RTOS

Alan C AssisAlan C Assis September 21, 2024

Hands-on walkthrough showing how to read analog voltages on a Raspberry Pi Pico running NuttX RTOS. The post explains RP2040 ADC basics, which GPIO channels and the internal temperature sensor are exposed, and how rp2040_adc_setup creates /dev/adc0. It also shows the menuconfig options, build and UF2 flash steps, a simple potentiometer test, and a note about RP2040 ADC spike artifacts.


How to use SPI devices in NuttX RTOS

Alan C AssisAlan C Assis June 30, 2024

You can get an SPI sensor running on NuttX in minutes by following a concrete RP2040 example. This post walks through the board glue code, Makefile and header edits, menuconfig settings, wiring, and flash steps needed to register a MAX6675 thermocouple on a Raspberry Pi Pico. Read it to learn where to add board-level code, enable drivers, and test the device from NSH.


How to use I2C devices in (Apache) NuttX: Adding support for an I2C device in your board

Alan C AssisAlan C Assis May 28, 2024

You can add an I2C sensor to NuttX with a few file edits, menuconfig tweaks, and a standard build-and-flash cycle. This guide shows how the BMP280 barometer was integrated into the Raspberry Pi Pico bringup by copying and adapting an existing board driver, wiring the sensor to I2C0, enabling the BMP280 option in menuconfig, and compiling and flashing the resulting nuttx.uf2. It includes exact wiring and build tips.


How to use I2C devices in (Apache) NuttX: Scanning for Devices

Alan C AssisAlan C Assis April 22, 2024

Hands-on guide to scanning I2C peripherals on NuttX using a Raspberry Pi Pico, showing how the RTOS exposes i2c master instances and the i2ctool. The article walks through where the RP2040 I2C driver lives, how to enable I2C0 in menuconfig, build and flash nuttx, and run the i2c dev command to probe the bus. Verify sensors like BMP280 or SSD1306 before registering drivers.


Using (Apache) NuttX Buttons Subsystem

Alan C AssisAlan C Assis March 22, 2024

You do not need to poke GPIO registers to read switches in NuttX, the OS provides a Buttons subsystem that delivers named events, multi-button support, and optional software debouncing. This post walks through wiring two breadboard buttons on a Raspberry Pi Pico, enabling the input and buttons drivers via menuconfig, building nuttx.uf2, and testing the buttons over the usbnsh serial console. It highlights why a simple hardware debounce is still a good idea.


Using (Apache) NuttX USERLED Subsystem

Alan C AssisAlan C Assis February 19, 2024

Controlling an LED with raw GPIO works, but NuttX's USERLED subsystem makes it cleaner and portable. This post walks through enabling the LED driver in menuconfig, mapping the RaspberryPi Pico LED in the board files, and using the /dev/userleds device with printf to set up to 32 LEDs with a single write. It finishes with a hands-on challenge to expand the setup to eight LEDs on a breadboard.


Using GPIO in (Apache) NuttX RTOS

Alan C AssisAlan C Assis January 21, 20247 comments

Blinking an LED is the embedded Hello World, and this tutorial walks through using GPIOs on NuttX running on a Raspberry Pi Pico. It shows how to enable the GPIO driver and example in menuconfig, build and flash the nuttx.uf2, and use NSH gpio device files to read and write pins. The post also explains polling versus interrupt-driven inputs and the pull-up/edge setup needed for button interrupts.


Getting Started with NuttX RTOS on Three Low Cost Boards

Alan C AssisAlan C Assis November 27, 20238 comments

You can get Linux-like power on cheap microcontroller boards using NuttX, not a full Linux system. This article walks through building and flashing NuttX on three low-cost targets: Raspberry Pi Pico (RP2040), ESP32-DevKitC, and STM32F4Discovery, covering SDKs, toolchains, and serial access. Follow the provided commands to configure, compile, and connect to the NuttShell so you can start experimenting with NuttX quickly.


Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image

Alan C AssisAlan C Assis July 5, 2023

This hands-on guide peels back the NuttX source tree and shows how to assemble a tailored firmware image. You will learn what each top-level directory does, how to enable apps with menuconfig and search tricks to resolve dependencies, and how to save a defconfig as a reusable board profile so you can rebuild the same image without repeating configuration steps.


How to use I2C devices in (Apache) NuttX: Scanning for Devices

Alan C AssisAlan C Assis April 22, 2024

Hands-on guide to scanning I2C peripherals on NuttX using a Raspberry Pi Pico, showing how the RTOS exposes i2c master instances and the i2ctool. The article walks through where the RP2040 I2C driver lives, how to enable I2C0 in menuconfig, build and flash nuttx, and run the i2c dev command to probe the bus. Verify sensors like BMP280 or SSD1306 before registering drivers.


How to use I2C devices in (Apache) NuttX: Adding support for an I2C device in your board

Alan C AssisAlan C Assis May 28, 2024

You can add an I2C sensor to NuttX with a few file edits, menuconfig tweaks, and a standard build-and-flash cycle. This guide shows how the BMP280 barometer was integrated into the Raspberry Pi Pico bringup by copying and adapting an existing board driver, wiring the sensor to I2C0, enabling the BMP280 option in menuconfig, and compiling and flashing the resulting nuttx.uf2. It includes exact wiring and build tips.


Getting Started with (Apache) NuttX RTOS - Part 1

Alan C AssisAlan C Assis June 2, 20234 comments

NuttX RTOS is used in many products from companies like Sony, Xiaomi, Samsung, Google/Fitbit, WildernessLabs and many other companis. So, probably you are already using NuttX even without knowing it, like the you was using Linux on your TV, WiFi router more than 10 years ago and didn't know too! Today you will have the chance to discover a little bit of this fantastic Linux-like RTOS! Are you ready? So, let's get started!


Getting Started with NuttX RTOS on Three Low Cost Boards

Alan C AssisAlan C Assis November 27, 20238 comments

You can get Linux-like power on cheap microcontroller boards using NuttX, not a full Linux system. This article walks through building and flashing NuttX on three low-cost targets: Raspberry Pi Pico (RP2040), ESP32-DevKitC, and STM32F4Discovery, covering SDKs, toolchains, and serial access. Follow the provided commands to configure, compile, and connect to the NuttShell so you can start experimenting with NuttX quickly.


Using GPIO in (Apache) NuttX RTOS

Alan C AssisAlan C Assis January 21, 20247 comments

Blinking an LED is the embedded Hello World, and this tutorial walks through using GPIOs on NuttX running on a Raspberry Pi Pico. It shows how to enable the GPIO driver and example in menuconfig, build and flash the nuttx.uf2, and use NSH gpio device files to read and write pins. The post also explains polling versus interrupt-driven inputs and the pull-up/edge setup needed for button interrupts.


Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image

Alan C AssisAlan C Assis July 5, 2023

This hands-on guide peels back the NuttX source tree and shows how to assemble a tailored firmware image. You will learn what each top-level directory does, how to enable apps with menuconfig and search tricks to resolve dependencies, and how to save a defconfig as a reusable board profile so you can rebuild the same image without repeating configuration steps.


How to use SPI devices in NuttX RTOS

Alan C AssisAlan C Assis June 30, 2024

You can get an SPI sensor running on NuttX in minutes by following a concrete RP2040 example. This post walks through the board glue code, Makefile and header edits, menuconfig settings, wiring, and flash steps needed to register a MAX6675 thermocouple on a Raspberry Pi Pico. Read it to learn where to add board-level code, enable drivers, and test the device from NSH.


How to use analog input (ADC) on NuttX RTOS

Alan C AssisAlan C Assis September 21, 2024

Hands-on walkthrough showing how to read analog voltages on a Raspberry Pi Pico running NuttX RTOS. The post explains RP2040 ADC basics, which GPIO channels and the internal temperature sensor are exposed, and how rp2040_adc_setup creates /dev/adc0. It also shows the menuconfig options, build and UF2 flash steps, a simple potentiometer test, and a note about RP2040 ADC spike artifacts.


Using (Apache) NuttX USERLED Subsystem

Alan C AssisAlan C Assis February 19, 2024

Controlling an LED with raw GPIO works, but NuttX's USERLED subsystem makes it cleaner and portable. This post walks through enabling the LED driver in menuconfig, mapping the RaspberryPi Pico LED in the board files, and using the /dev/userleds device with printf to set up to 32 LEDs with a single write. It finishes with a hands-on challenge to expand the setup to eight LEDs on a breadboard.


Using a board with NuttX RTOS as an RS-485 / Modbus Slave Device

Alan C AssisAlan C Assis December 22, 2024

This practical walk-through shows how to turn a NuttX-equipped board into an RS-485 Modbus RTU slave using a cheap MAX485 transceiver and an STM32F4Discovery board. It explains why a simple UART plus a GPIO for DE/RE is enough, why the RP2040 needs special handling, and gives step-by-step configuration in NuttX, wiring for the transceiver, and a quick test using FreeModbus and mbpoll.


The 2026 Embedded Online Conference