How to use analog input (ADC) on NuttX RTOS
In all previous tutorial about NuttX we used some type of digital interface (I2C, SPI, etc), so today we will see how to use an analog interface to read some analog sensor or other analog device. In fact we live in an analog world and sometimes we need to read some analog voltage to make sense of some external analog signal. Today we will see how to use the ADC (Analog Digital Converter) from Raspberry Pi Pico RP2040 to read analog voltages.
First let me explain what...
How to use SPI devices in NuttX RTOS
Previously in this EmbeddedRelated article, we saw how to use I2C device connected to your board. Although I2C devices are very common nowadays, probably you will need to use some SPI device as well. Today we will see how to do exactly that. So, lets to get started!
The SPI (Serial Peripheral Interface) is synchronous serial communication protocol (by synchronous it means there is a common clock signal to indicate when which signal transition will occur)....
How to use I2C devices in (Apache) NuttX: Adding support for an I2C device in your board
Previously in this EmbeddedRelated article, we saw how to find an I2C device connected to your board using the i2ctool that is very familiar for people with previous experience with embedded Linux. Today we will see how to add support to an I2C device (i.e. BMP280 sensor) in your board. So, lets to get started!
NuttX uses a very simple approach to interface with devices connected to the board: each board has a board bringup() function that is used to initialize the...
How to use I2C devices in (Apache) NuttX: Scanning for Devices
Previously in this EmbeddedRelated article, we saw how to use Buttons Subsystem on NuttX using a RaspberryPi Pico board. Now we will change from user input device (buttons) for something more generic: I2C protocol. NuttX supports a lot of I2C devices (sensors, displays, EEPROMs, I/O Expanders, I2C multiplexers, and many more). And most important: because NuttX is a Linux-like RTOS you will find the very familiar i2ctool to search for devices in your I2C bus. So, lets to get...
Using (Apache) NuttX Buttons Subsystem
Previously in this EmbeddedRelated article, we saw how to use LEDs Subsystem on NuttX testing on RaspberryPi Pico. In the same way we avoided using GPIO Subsystem to control LEDs we can avoid using GPIO Subsystem to read Buttons inputs. That is right, NuttX has an Input Device Subsystem like Linux and today we will learn how to use it.
Buttons are one of the simplest user input interface and after the famous "hello world LED" example they are probably the second...
Using (Apache) NuttX USERLED Subsystem
In the previous article (https://embeddedrelated.com/showarticle/1623.php) we saw how to use GPIOs on NuttX testing on RaspberryPi Pico as example. In that article we used the GPIO output to control an LED, but there is a better way to do that. Of course, NuttX has an LED subsystem similar to Linux LED subsystem: it is called USERLED. Today we will see how to control LEDs using NuttX's USERLED subsystem.
The main advantage of using the USERLED...
Using GPIO in (Apache) NuttX RTOS
In the previous article (https://embeddedrelated.com/showarticle/1610.php) we saw how to compile and run NuttX on three low cost boards (RaspberryPi Pico, ESP32-Devkit and STM32F4Discovery). Today we will see how to use GPIO pins and read and write logic level signals from/to the MCU pins.
Everybody knows that blinking a LED is the "Hello World" program of embedded system engineer. Controlling a GPIO we can do exactly that! Although it is important to know that NuttX...
Getting Started with NuttX RTOS on Three Low Cost Boards
If you are an embedded system developer chances are you already played with Linux on some embedded board and saw how it is powerful, right?
So, I have a good news: you can have same power using NuttX on some ultra low cost board powered by a microcontroller instead of microprocessor (that normally is way more expansive).
In fact many companies already realized it before me. It explains why NuttX is the kernel used by many IoT frameworks:
Another great news is that few days ago...
Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image
In the previous article (https://www.embeddedrelated.com/showarticle/1524.p...) we saw how to run NuttX RTOS using the SIMulator. Today we will see how NuttX's directory tree is organized and how to use the menuconfig to enable some applications, including some tricks to search and solve dependencies.
NuttX Directories organization:
If you have previously compiled the Linux kernel or the U-Boot bootloader you will see that the NuttX source tree organization is...
Getting Started with (Apache) NuttX RTOS - Part 1
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 (Apache) NuttX RTOS - Part 1
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!
How to use analog input (ADC) on NuttX RTOS
In all previous tutorial about NuttX we used some type of digital interface (I2C, SPI, etc), so today we will see how to use an analog interface to read some analog sensor or other analog device. In fact we live in an analog world and sometimes we need to read some analog voltage to make sense of some external analog signal. Today we will see how to use the ADC (Analog Digital Converter) from Raspberry Pi Pico RP2040 to read analog voltages.
First let me explain what...
Getting Started with NuttX RTOS on Three Low Cost Boards
If you are an embedded system developer chances are you already played with Linux on some embedded board and saw how it is powerful, right?
So, I have a good news: you can have same power using NuttX on some ultra low cost board powered by a microcontroller instead of microprocessor (that normally is way more expansive).
In fact many companies already realized it before me. It explains why NuttX is the kernel used by many IoT frameworks:
Another great news is that few days ago...
Using GPIO in (Apache) NuttX RTOS
In the previous article (https://embeddedrelated.com/showarticle/1610.php) we saw how to compile and run NuttX on three low cost boards (RaspberryPi Pico, ESP32-Devkit and STM32F4Discovery). Today we will see how to use GPIO pins and read and write logic level signals from/to the MCU pins.
Everybody knows that blinking a LED is the "Hello World" program of embedded system engineer. Controlling a GPIO we can do exactly that! Although it is important to know that NuttX...
Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image
In the previous article (https://www.embeddedrelated.com/showarticle/1524.p...) we saw how to run NuttX RTOS using the SIMulator. Today we will see how NuttX's directory tree is organized and how to use the menuconfig to enable some applications, including some tricks to search and solve dependencies.
NuttX Directories organization:
If you have previously compiled the Linux kernel or the U-Boot bootloader you will see that the NuttX source tree organization is...
How to use I2C devices in (Apache) NuttX: Adding support for an I2C device in your board
Previously in this EmbeddedRelated article, we saw how to find an I2C device connected to your board using the i2ctool that is very familiar for people with previous experience with embedded Linux. Today we will see how to add support to an I2C device (i.e. BMP280 sensor) in your board. So, lets to get started!
NuttX uses a very simple approach to interface with devices connected to the board: each board has a board bringup() function that is used to initialize the...
How to use I2C devices in (Apache) NuttX: Scanning for Devices
Previously in this EmbeddedRelated article, we saw how to use Buttons Subsystem on NuttX using a RaspberryPi Pico board. Now we will change from user input device (buttons) for something more generic: I2C protocol. NuttX supports a lot of I2C devices (sensors, displays, EEPROMs, I/O Expanders, I2C multiplexers, and many more). And most important: because NuttX is a Linux-like RTOS you will find the very familiar i2ctool to search for devices in your I2C bus. So, lets to get...
How to use SPI devices in NuttX RTOS
Previously in this EmbeddedRelated article, we saw how to use I2C device connected to your board. Although I2C devices are very common nowadays, probably you will need to use some SPI device as well. Today we will see how to do exactly that. So, lets to get started!
The SPI (Serial Peripheral Interface) is synchronous serial communication protocol (by synchronous it means there is a common clock signal to indicate when which signal transition will occur)....
Using (Apache) NuttX Buttons Subsystem
Previously in this EmbeddedRelated article, we saw how to use LEDs Subsystem on NuttX testing on RaspberryPi Pico. In the same way we avoided using GPIO Subsystem to control LEDs we can avoid using GPIO Subsystem to read Buttons inputs. That is right, NuttX has an Input Device Subsystem like Linux and today we will learn how to use it.
Buttons are one of the simplest user input interface and after the famous "hello world LED" example they are probably the second...
Using (Apache) NuttX USERLED Subsystem
In the previous article (https://embeddedrelated.com/showarticle/1623.php) we saw how to use GPIOs on NuttX testing on RaspberryPi Pico as example. In that article we used the GPIO output to control an LED, but there is a better way to do that. Of course, NuttX has an LED subsystem similar to Linux LED subsystem: it is called USERLED. Today we will see how to control LEDs using NuttX's USERLED subsystem.
The main advantage of using the USERLED...
How to use I2C devices in (Apache) NuttX: Scanning for Devices
Previously in this EmbeddedRelated article, we saw how to use Buttons Subsystem on NuttX using a RaspberryPi Pico board. Now we will change from user input device (buttons) for something more generic: I2C protocol. NuttX supports a lot of I2C devices (sensors, displays, EEPROMs, I/O Expanders, I2C multiplexers, and many more). And most important: because NuttX is a Linux-like RTOS you will find the very familiar i2ctool to search for devices in your I2C bus. So, lets to get...
How to use I2C devices in (Apache) NuttX: Adding support for an I2C device in your board
Previously in this EmbeddedRelated article, we saw how to find an I2C device connected to your board using the i2ctool that is very familiar for people with previous experience with embedded Linux. Today we will see how to add support to an I2C device (i.e. BMP280 sensor) in your board. So, lets to get started!
NuttX uses a very simple approach to interface with devices connected to the board: each board has a board bringup() function that is used to initialize the...
Getting Started with (Apache) NuttX RTOS - Part 1
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
If you are an embedded system developer chances are you already played with Linux on some embedded board and saw how it is powerful, right?
So, I have a good news: you can have same power using NuttX on some ultra low cost board powered by a microcontroller instead of microprocessor (that normally is way more expansive).
In fact many companies already realized it before me. It explains why NuttX is the kernel used by many IoT frameworks:
Another great news is that few days ago...
Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image
In the previous article (https://www.embeddedrelated.com/showarticle/1524.p...) we saw how to run NuttX RTOS using the SIMulator. Today we will see how NuttX's directory tree is organized and how to use the menuconfig to enable some applications, including some tricks to search and solve dependencies.
NuttX Directories organization:
If you have previously compiled the Linux kernel or the U-Boot bootloader you will see that the NuttX source tree organization is...
Using GPIO in (Apache) NuttX RTOS
In the previous article (https://embeddedrelated.com/showarticle/1610.php) we saw how to compile and run NuttX on three low cost boards (RaspberryPi Pico, ESP32-Devkit and STM32F4Discovery). Today we will see how to use GPIO pins and read and write logic level signals from/to the MCU pins.
Everybody knows that blinking a LED is the "Hello World" program of embedded system engineer. Controlling a GPIO we can do exactly that! Although it is important to know that NuttX...
How to use SPI devices in NuttX RTOS
Previously in this EmbeddedRelated article, we saw how to use I2C device connected to your board. Although I2C devices are very common nowadays, probably you will need to use some SPI device as well. Today we will see how to do exactly that. So, lets to get started!
The SPI (Serial Peripheral Interface) is synchronous serial communication protocol (by synchronous it means there is a common clock signal to indicate when which signal transition will occur)....
Using (Apache) NuttX Buttons Subsystem
Previously in this EmbeddedRelated article, we saw how to use LEDs Subsystem on NuttX testing on RaspberryPi Pico. In the same way we avoided using GPIO Subsystem to control LEDs we can avoid using GPIO Subsystem to read Buttons inputs. That is right, NuttX has an Input Device Subsystem like Linux and today we will learn how to use it.
Buttons are one of the simplest user input interface and after the famous "hello world LED" example they are probably the second...
How to use analog input (ADC) on NuttX RTOS
In all previous tutorial about NuttX we used some type of digital interface (I2C, SPI, etc), so today we will see how to use an analog interface to read some analog sensor or other analog device. In fact we live in an analog world and sometimes we need to read some analog voltage to make sense of some external analog signal. Today we will see how to use the ADC (Analog Digital Converter) from Raspberry Pi Pico RP2040 to read analog voltages.
First let me explain what...
Using (Apache) NuttX USERLED Subsystem
In the previous article (https://embeddedrelated.com/showarticle/1623.php) we saw how to use GPIOs on NuttX testing on RaspberryPi Pico as example. In that article we used the GPIO output to control an LED, but there is a better way to do that. Of course, NuttX has an LED subsystem similar to Linux LED subsystem: it is called USERLED. Today we will see how to control LEDs using NuttX's USERLED subsystem.
The main advantage of using the USERLED...