This is an example program of WS2812 library https://developer.mbed.org/users/devararendy/code/WS2812/ in main program, i also put some line to measure how many asm NOP do we need. I have test it on STM32F411RE (Nucleo 411RE). if you would like to use another microcontroller, you need to adjust the asm("nop") in the library.

Dependencies:   USBDevice WS2812 mbed-os

History

added some explanation of using TIM to measure asm("NOP") execution time and an example of using sendColors for sending all colors in buffer to all LEDs default tip

2016-12-10, by devararendy [Sat, 10 Dec 2016 09:21:00 +0000] rev 2

added some explanation of using TIM to measure asm("NOP") execution time and an example of using sendColors for sending all colors in buffer to all LEDs


This is example program of my WS2812 library. https://developer.mbed.org/users/devararendy/code/WS2812/; I have test is with STM32F411RE (Nucleo 411RE). I you have any question, feel free to ask. I hope i can help

2016-12-10, by devararendy [Sat, 10 Dec 2016 08:38:13 +0000] rev 1

This is example program of my WS2812 library. https://developer.mbed.org/users/devararendy/code/WS2812/; I have test is with STM32F411RE (Nucleo 411RE). I you have any question, feel free to ask. I hope i can help


This is an example of RGB LED WS2812. In main.cpp i have commented some line. these line is to calculate how many asm("NOP") do we need. because different CPU clock will make different sum of NOP

2016-12-10, by devararendy [Sat, 10 Dec 2016 08:26:36 +0000] rev 0

This is an example of RGB LED WS2812. In main.cpp i have commented some line. these line is to calculate how many asm("NOP") do we need. because different CPU clock will make different sum of NOP