Testing a RGB LED on NuttX with brightness control

In my previous post I explained how to control a RGB LED on NuttX, but at that time it doesn’t have brightness control.

Now I created a new driver that uses three PWM pins to control the LED intensive.

I posted the driver in the NuttX mailing list and Greg incorporated it on NuttX mainline (drivers/leds/rgbled.c).

A video worth more than 1 millions of words:

You can reproduce it just connection a RGB LED to STM32F4Discovery this way: Red pin connected to PE9, Green pin connected to PA1 and Blue pin connected to PB0 and compile NuttX with these commands:

$ cd nuttx
$ cd tools
$ ./configure.sh stm32f4discovery/rgbled
$ cd ..
$ make

Just write the nuttx.bin in your board and the LED fading will start after reset.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s