Giter Site home page Giter Site logo

esp32-digital-rgb-led-drivers's Introduction

ESP32 Digital RGB(W) LED Drivers

A library for driving self-timed digital RGB/RGBW LEDs (WS2812, SK6812, NeoPixel, WS2813, etc.) using the Espressif ESP32 microcontroller's RMT output peripheral

Based upon the ESP32 WS2812 driver work by Chris Osborn


Notes

The RMT peripheral of the ESP32 is used for controlling up to 8 LED "strands" (in whatever form factor the serially-chained LEDs are placed). These strands are independently controlled and buffered.

There are working demos for Espressif's IoT Development Framework (esp-idf) and Arduino-ESP32 core. Some demos are ONLY for the ESP IDF (demonstrating C-only techniques). Otherwise, a given demo should be exactly the same on either framework.

This library currently works well with WS2812-type and NeoPixel RGB LEDs (3 bytes of data per LED) - SK6812 RGB LEDs should work equally well. This also works fine with WS2813 (the backup channel is not used currently - tie Backup In to Data In for now).

This also works well with SK6812 RGBW LEDs (4 bytes of data per LED). These are similar to the WS2812 LEDs, but with a white LED present as well - keep in mind that RGBW LEDs draw a fair amount of extra power versus the usual RGB LEDs due to the added white LED element present.

Timings for a given LED type can vary even within that line: use the version variant that works best for you (see ledParamsAll for details).


ESP-IDF build notes - Important!

The ESP-IDF demos are WIP right now (not currently buildable) and may be that way indefinitely

The ESP-IDF varies so regularly and so significantly it's more difficult to keep up with it, versus the abstracted Arduino-ESP32 interfaces. As time permits, I'm working on making it buildable with v3.2.2 and later sub-versions but it's slow going.

While the Arduino-ESP32 side is my main focus, the ESP-IDF build ought to be very similar (demo*.ino --> main.cpp, and the header and source libs aren't in their canonical locations by default). Beyond convenience, there was no real value in maintaining duplicate copies of the code and libraries as I did previously so those duplicates were removed. Also, symlinks in the repo are specifically disallowed in Arduino so that's not happening.

Please see the sdkconfig.defaults file for details of the defaults I use. If you run make menuconfig or make sdkconfig this file will be parsed for initial settings ONLY if sdkconfig doesn't exist. However, this file will be processed every time you run make defconfig.


TODO

  • API (current):

    • init --> initStrands (all strands)
    • setColors --> update --> updatePixels (per strand)
    • (n/a) --> reset --> resetPixels (per strand)
  • Future additional (class-driven):

    • (n/a) --> updateTimings (for fine-tuning, debugging, or marginal/odd devices)
    • (n/a) --> updateType (for fine-tuning, debugging, or marginal/odd devices)
    • (n/a) --> addStrand/deleteStrand? (maybe not...)
  • Other:

    • Make the whole library a proper class - more robust and extensible!
    • ledParams - refine and clarify
    • ledParams - lower bounds? Currently bit timing constants are pre-padded +50ns
    • ledParams - add a small constant string as a mapping to the name?
      • Nope! C99 designator 'name' outside aggregate initializer
    • ledParams - instead of bytesPerPixel, specify color format (GRBW, RGB, etc.)?
      • Would have the same problem as naming...
    • WS2813 - handle backup channel
    • Resolve open TODOs in code
    • Add more interleaved demos, and more demos in general
    • Make Arduino side a true Arduino library? May not be practical.
    • APA102/DotStar support?

esp32-digital-rgb-led-drivers's People

Contributors

joshuasiler avatar martymacgyver avatar paulo-raca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32-digital-rgb-led-drivers's Issues

Running at same time as i2s

[Great library, like it lots] I am trying to continually update a 64-pixel strand whilst playing a wav file through i2s. Occasionally, the strand seems corrupted with odd pixels being lit. The led display and the wav playing are in different FreeRTOS tasks. Is it possible the i2s output may be corrupting the RMT buffers?

LED Drivers for dummies

Hi,
I took the example 2 (for Arduino) and placed it on my esp32. I changed the number of leds and the gpioNum.

The result is a Guru Meditation Error and 24 red leds flickering.

Is there some more guidance on how to use this lib properly?

Thanks!

Running the esp-idf demos on Sparkfun's ESP32 Thing sets LEDs to full white

I'm running an ESP32 Thing from Sparkfun, driving a Neopixel 12 LED ring.

The Arduino demo works without issue after configuring the "strand" to be 12 pixels long. The esp-idf demos, though, both set all LEDs to full white brightness. Have tried a few times to make sure I didn't screw anything up, and either I'm always screwing something up or there's something incompatible somewhere. Any ideas?

Example will not run - Demo 2 - esp-idf

Hello, I can not get examples to run. It seems like part of the library is missing? where is function where is function digitalLeds_updatePixels(pStrand)? must we implement this on our own?

when attempting to comile example as given i get the following errors:

error: too few arguments to function 'digitalLeds_resetPixels'
error: implicit declaration of function 'digitalLeds_updatePixels'
error: implicit declaration of function 'digitalLeds_initStrands'

i can fix the reset pixels issue by passing in an argument for num_strands, but i am unsure what is going on with update pixels?

any help would be appreciated thanks.

Regular guru meditation

Hi!

I'm using the (unmodified) Arduino version of ws2812.cpp/.h on PlatformIO
(May 22, 2017 / b130554 version)

I seem to often get this trace:

Guru Meditation Error of type LoadProhibited occurred on core  1. Exception was unhandled.
Register dump:
PC      : 0x40086493  PS      : 0x00060033  A0      : 0x80084fb3  A1      : 0x3ffc0b70
A2      : 0x3ffc3210  A3      : 0x3ffcd04c  A4      : 0x00060023  A5      : 0x3ffc9d70
A6      : 0x00000003  A7      : 0x00060023  A8      : 0x00000000  A9      : 0x00000000
A10     : 0x3ffd72c8  A11     : 0x00060023  A12     : 0x00060023  A13     : 0x3ffc9d40
A14     : 0x3ffc10f8  A15     : 0x00060023  SAR     : 0x00000020  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000008  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000

Backtrace: 0x40086493:0x3ffc0b70 0x40084fb3:0x3ffc0b90 0x400846cc:0x3ffc0bb0 0x400df169:0x3ffc0bd0 0x40081cc9:0x3ffc0c00

CPU halted.

Which resolves to:

0x40086493 /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/./list.c:130
0x40084fb3 /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/./tasks.c:4420
0x400846cc /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/./queue.c:1992
0x400df169 C:\Storage\PlatformIO\Blink32/lib\ws2812/ws2812.cpp:197
0x40081cc9 xtensa_vectors.o:?

The line in ws2812.cpp is here.

This is with the espressif esp32 arduino version: b34d18f5769b1dca526fc52926c51abbded593cd
(Known in PlatformIO as framework-arduinoespressif32 1.1.5)

Any thoughts on what might be going on here?
The code is running together with a basic RC receiver (interrupt based), wifi (mqtt), and also uses ledcWrite from the esp32 arduino code.

I will be narrowing it down more as I have time, but you might have a aha moment that could save me days of doing that ;)

RMT conflict with esp32-owb

If I use this library in the same project as esp32-owb by @DavidAntliff, I get the following reboot loop as soon as a hit digitalLeds_initStrands.

Guru Meditation Error: Core  1 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 1 register dump:
PC      : 0x40084c86  PS      : 0x00060033  A0      : 0x80081ab4  A1      : 0x3ffb0bc0
0x40084c86: rmt_driver_isr_default at /Users/luke/Code/esp32/esp-idf/components/driver/./rmt.c:769 (discriminator 1)

A2      : 0x0000001a  A3      : 0x04000000  A4      : 0x00000000  A5      : 0x00000002
A6      : 0x04000000  A7      : 0x3ffba450  A8      : 0x3ff56000  A9      : 0x00000001
A10     : 0x00000001  A11     : 0x00000000  A12     : 0x80085fb9  A13     : 0x00000001
A14     : 0x00060021  A15     : 0x00060f23  SAR     : 0x00000006  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000010  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff
Core 1 was running in ISR context:
EPC1    : 0x40084c86  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x400d2120
0x40084c86: rmt_driver_isr_default at /Users/luke/Code/esp32/esp-idf/components/driver/./rmt.c:769 (discriminator 1)

0x400d2120: esp_vApplicationIdleHook at /Users/luke/Code/esp32/esp-idf/components/esp32/./freertos_hooks.c:85


Backtrace: 0x40084c86:0x3ffb0bc0 0x40081ab1:0x3ffb0bf0 0x400824ad:0x3ffb0c10 0x400e4c60:0x00000000
0x40084c86: rmt_driver_isr_default at /Users/luke/Code/esp32/esp-idf/components/driver/./rmt.c:769 (discriminator 1)

0x40081ab1: shared_intr_isr at /Users/luke/Code/esp32/esp-idf/components/esp32/./intr_alloc.c:773

0x400824ad: _xt_lowint1 at /Users/luke/Code/esp32/esp-idf/components/freertos/./xtensa_vectors.S:1105

0x400e4c60: i2c_master_cmd_begin at /Users/luke/Code/esp32/esp-idf/components/driver/./i2c.c:1187


Rebooting...

The relevant sections of code are:

#define WS2812_PIN (27)
#define WS2812_PIN_MASK (1ULL<<WS2812_PIN)
void ws2812_task(void *pvParameter)
{

    gpio_config_t io_conf;
    io_conf.intr_type = GPIO_PIN_INTR_DISABLE;
    io_conf.mode = GPIO_MODE_OUTPUT;
    io_conf.pin_bit_mask = GPIO_SEL_27;
    io_conf.pull_down_en = 0;
    io_conf.pull_up_en = 0;
    gpio_config(&io_conf);

    strand_t strands[] = {
        {.rmtChannel = RMT_CHANNEL_2, .gpioNum = WS2812_PIN, .ledType = LED_WS2812B_V3, .brightLimit = 255, .numPixels =  3,
        .pixels = NULL, ._stateVars = NULL}
    };

    if (digitalLeds_initStrands(strands, 1)) {
        ESP_LOGE(CM02_TAG, "Failed to initialize WS2812");
        vTaskDelete(NULL);
        return;
    }

    uint8_t x = 0;
    while (true) {
        strands[0].pixels[0] = pixelFromRGB(255-x, x, 0);
        strands[0].pixels[1] = pixelFromRGB(0, 255-x, x);
        strands[0].pixels[2] = pixelFromRGB(x, 0, 255-x);
        x++;
        digitalLeds_updatePixels(&strands[0]);
        vTaskDelay(30/portTICK_PERIOD_MS);
    }
}

#define DS18B20_PROBE_PIN 16
static float temp_probe_value = -1;
static void temp_probe_task(void *pvParameter) {
    DS18B20_ERROR err;

    OneWireBus * owb;
    owb_rmt_driver_info rmt_driver_info;
    owb = owb_rmt_initialize(&rmt_driver_info, DS18B20_PROBE_PIN, RMT_CHANNEL_1, RMT_CHANNEL_0);
    owb_use_crc(owb, true);

    DS18B20_Info * ds18b20_probe;
    ds18b20_probe = ds18b20_malloc();
    ds18b20_init_solo(ds18b20_probe, owb);
    ds18b20_use_crc(ds18b20_probe, true);
    ds18b20_set_resolution(ds18b20_probe, DS18B20_RESOLUTION_12_BIT);

    while (1) {
        ds18b20_convert_all(owb);

        // Wait 1s, and then wait longer if the conversion isn't done
        vTaskDelay(1000/portTICK_PERIOD_MS);
        ds18b20_wait_for_conversion(ds18b20_probe); // block

        err = ds18b20_read_temp(ds18b20_probe, &temp_probe_value);
        printf("  %.1f    %d errors\n", temp_probe_value, err);
        // FIXME: check errors
    }
}

I have taken care to specify different RMT channels, and I think the pins I'm using for each peripheral or valid. If I disable one, the other works perfectly.

Using this code renders I2C unstable on ESP32/arduino?

Thanks for the code, it works great, except that as soon as I use it on my project, talking to I2C causes a crash:
0x400d65ee: i2cRead at /home/merlin/Arduino/hardware/espressif/esp32/cores/esp32/esp32-hal-i2c.c line 379
0x400d3e3e: TwoWire::requestFrom(unsigned char, unsigned int, bool) at /home/merlin/Arduino/hardware/espressif/esp32/libraries/Wire/src/Wire.cpp line 143
0x400d3e98: TwoWire::requestFrom(int, int) at /home/merlin/Arduino/hardware/espressif/esp32/libraries/Wire/src/Wire.cpp line 143
0x400d44e6: IoTuz::i2cexp_read() at /home/merlin/Arduino/libraries/IoTuz/IoTuz.cpp line 130

If I disable your code, then my I2C read which has been working for over a month, works again.

Are you using the same part of the chip, or is there some kind of incompatibility between using RMT and I2C?

Doesn't work with current IDF

With current versions of IDF, there isn't any output on the pin.

I've identified the problem to be on espressif/esp-idf@17747b3 -- Reverting it makes the leds blink again :)

I would love to submit a PR, but I really haven't figured out those IO matrixes yet, so I'm hoping you can work a proper fix.

Thank you!

How to use only ws2812 library without arduinoish.hpp?

Hi! Thanks for the great library!

I want to use only ws2812 library in my esp32 project without arduinosh.hpp. My project has the following folder structure:

/ (root)
/main
/components
/components/ws2812
/components/ws2812/include

My main source codes are like following codes.

#include <esp_log.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <math.h>
#include "ws2812.h"

#include "sdkconfig.h"

static char tag[] = "neosarchizo";

const int DATA_PIN = 17;
const uint16_t NUM_PIXELS = 3;
uint8_t MAX_COLOR_VAL = 32;

rgbVal *pixels;

void app_main() {
	ESP_LOGD(tag, "start");
	ws2812_init(DATA_PIN, LED_SK6812);
	pixels = (rgbVal*)malloc(sizeof(rgbVal) * NUM_PIXELS);

	while(1) {
		for(uint16_t i=0; i<NUM_PIXELS; i++) {
			pixels[i] = makeRGBVal(MAX_COLOR_VAL, 0, 0);
		}
		ws2812_setColors(NUM_PIXELS, pixels);
		vTaskDelay(1000/portTICK_PERIOD_MS);
		for (uint16_t i=0; i<NUM_PIXELS; i++) {
			pixels[i] = makeRGBVal(0, MAX_COLOR_VAL, 0);
		}
		ws2812_setColors(NUM_PIXELS, pixels);
		vTaskDelay(1000/portTICK_PERIOD_MS);
		for (uint16_t i=0; i<NUM_PIXELS; i++) {
			pixels[i] = makeRGBVal(0, 0, MAX_COLOR_VAL);
		}
		ws2812_setColors(NUM_PIXELS, pixels);
		vTaskDelay(1000/portTICK_PERIOD_MS);
	}

	vTaskDelete(NULL);
} // task_hmc5883l

But I get following errors when I build it.

/Users/neosarchizo/esp/aqk-device/build/main/libmain.a(aqk_device_main.o):(.literal.app_main+0x10): undefined reference to `ws2812_init'
/Users/neosarchizo/esp/aqk-device/build/main/libmain.a(aqk_device_main.o):(.literal.app_main+0x14): undefined reference to `ws2812_setColors'
/Users/neosarchizo/esp/aqk-device/build/main/libmain.a(aqk_device_main.o): In function `app_main':
/Users/neosarchizo/esp/aqk-device/main/./aqk_device_main.c:19: undefined reference to `ws2812_init'
/Users/neosarchizo/esp/aqk-device/main/./aqk_device_main.c:26: undefined reference to `ws2812_setColors'
/Users/neosarchizo/esp/aqk-device/main/./aqk_device_main.c:28: undefined reference to `ws2812_setColors'
/Users/neosarchizo/esp/aqk-device/main/./aqk_device_main.c:33: undefined reference to `ws2812_setColors'
collect2: error: ld returned 1 exit status
make: *** [/Users/neosarchizo/esp/aqk-device/build/aqk-device.elf] Error 1

What did I do wrong?

DPORT function update

SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_RMT_CLK_EN); CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_RMT_RST);

in ws2812_init should be updated to:

DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_RMT_CLK_EN); DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_RMT_RST);

after a recent esp-idf update

Max brightness setting ignored

Is the brightnessLimit field respected in the strand_t implementation? I'm trying with the code below, but it doesn't seem to make a difference in the brightness of the LEDs.

strand_t strand = {
    .rmtChannel = 0,
    .gpioNum = 32,
    .ledType = LED_WS2812B_V2,
    .brightLimit = 10, // Doesn't seem to matter what the value is. Brightness doesn't change
    .numPixels = 13,
    .pixels = null,
    ._stateVars = null
};

channels coupled together

Hi Marty, I programmed an ESP32 with your DEMO1.ino program and it gives some problems.
I've connected three ledstring to the ESP32, on GPIO 13,14 and 15.
When I send some data to the first led-strand it works perfect. Sending data to the second strand its also send the same data to the first led-strand Sending data to led-strand 3, also strand 2 and 1 are filled with the same data. For a good look I modify some timing and number of led strings, but nothing more.

Is this an issue only with the demo, is this something in the program or do I something wrong?

Not working in latest version of arduino-esp32

Hi, I was successfully using your library, and then (for other reasons) I upgraded to the latest version of arduino-esp32 at https://github.com/espressif/arduino-esp32 and your library stopped working. Have you tried upgrading recently?

It's unclear to me why it's not working, the console isn't showing any error messages, the pixels just don't light up anymore like they used to. I was using the older version of your code from February, and upgraded to your latest, and tried each setting LED_WS2812B_V1 to V3, and some different pins. No luck, I'd appreciate your help.

This works for WS2812B but not WS2812

This doesn't work well on old 6-pin WS2812 devices, Strictly speaking, you can get it mostly working by using a WS2812_CYCLE time of about 240ns, but it's still glitchy.

Even then, a look with the logic analyzer reveals the problem: a bit-banged test using the Particle Photon and the Adafruit_NeoPixel library gives the following timings:

Low:   tH = 0.31µs ±0.01µs / tL = 0.94µs ±0.01µs
High:  tH = 0.82µs ±0.01µs / tL = 0.44µs ±0.01µs
Cycle: 1.25µs ±0.02µs

The ESP32 RMT timings (with WS2812_CYCLE = 240ns):

Low:   tH = 0.48µs ±0.01µs / tL = 0.47µs ±0.01µs
High:  tH = 0.95µs ±0.01µs / tL = 0.95µs ±0.01µs
Cycle: 1.43µs ±0.48µs

The spec timings are as follows:

WS2812:

Low:   tH = 0.35µs ±0.15µs / tL = 0.80µs ±0.15µs
High:  tH = 0.70µs ±0.15µs / tL = 0.60µs ±0.15µs
Cycle: 1.25µs ±0.60µs
Reset: >50µs

WS2812B:

Low:   tH = 0.35µs ±0.15µs / tL = 0.90µs ±0.15µs
High:  tH = 0.90µs ±0.15µs / tL = 0.35µs ±0.15µs
Cycle: 1.25µs ±0.15µs
Reset: >50µs

As a rule of thumb we see that a low bit needs a longer time in the low state than the high state, and vice versa for high. A 2:1 duty cycle should suffice for both, but a 50:50 duty cycle will not do (it's a wonder it works at all for the WS2812B let alone the WS2812 - presumably the tH is what's mediating this and so lengthening that timing serves to be decoded as low versus high.

If possible, the RMT should be driving a more appropriate signal. Otherwise it's not a very reliable solution versus bit-banging (which works remarkably poorly on the ESP32).

(Note: there's a lot of leeway when signalling, but not enough to allow 50:50 timing to work glitch-free.)

Running the RMT channels in parallel

According to the ESP32 data sheet ([here](url
https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/rmt.html)) “The RMT has eight channels numbered from zero to seven. Each channel is able to independently transmit or receive data.”
This driver can use up to 8 RMT channels, but as written does not send data in parallel. This is because there is a wait for semaphore, which pauses delivery of the data for each strand until all the data for that strand has been sent.

For the animation, the demos call drawNext() continuously for a period of seconds, but each call to that function must only perform 1) changing pixel color values (rainbow colors, or scanner); and 2) digitalLeds_updatePixels for each strand. If digitalLeds_updatePixels() would only transfer the pixel data to a buffer, it would run very fast. But the buffer won't be ready to accept more data (set of different pixel colors) until the prior data has been sent, and that can take a few milliseconds. This is where the semaphore comes in. In digitalLeds_updatePixels() there is a call to xSemaphoreTake(pState->sem, portMAX_DELAY) which waits indefinitely for that semaphore, which is sent by the interrupt when the last data has been sent to the strand.

This driver would be greatly improved if it could run the “update pixels” for each strand in parallel (concurrently). It would mean a very large number of pixels could be refreshed at a nice rate (30 or 40 Hz).

I think all that is required is to relocate the xSemaphoreTake() statement (wait for completion), and let other strands start up in parallel. The call to updatePixels would need only to wait at the end for ALL the strands data to be sent (wait for last one to finish).

(ESP-IDF) gRmtSem is never given when Heap Corruption Detection is set to Light Impact

This is with ESP-IDF v4.0...

With Heap Corruption Detection set to Comprehensive, everything works (reasonably) fine.

With HCD at Basic, I get a LoadProhibited at line 297 of esp32_digital_led_lib.cpp (in digitalLeds_resetPixels())

With HCD in Light Impact, the system hangs at line 367 of esp32_digital_led_lib.cpp (in digitalLeds_drawPixels()), waiting to take gRmtSem.

Any idea where to look to debug this?

(Big picture, I'm getting some glitching and so I'm trying to figure out how to tune out the glitching...)

Using this driver seems to shift analogread by one bit to the left (x2)

I have
#define JOYSTICK_X_PIN 39
#define JOYSTICK_Y_PIN 34
#define BAT_PIN 2

All 3 of those values are returning values that are 4095 when they are at 50% after I enable your driver, but for instance if I move my joystick from center to 0, then I get 4095 to 0.
If I remove your driver, and go back to adafruit, center is 2048 and then the value goes back from 0 to 4096.

idf example on a .c file

Any reason the example is a .cpp file? i been learning on my own idf and all that i have done is on a c files, would it be posible to release an exampl on how to use this library on c?

compile error with Arduino

just hoping anyone can point out what i doing wrong or failed to install.
my issue is i get an error in 2 lines of code in the ws2812.cpp file

DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_RMT_CLK_EN);
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_RMT_RST);

if i // the code it will compile but won't run

WS2812B timing update

Update the timing parameters for the WS2812B (the WS2812 parameters are unchanged).

Used the parameters from the cpldcpu post

//timingParams ledParams_WS2812B = { .T0H = 350, .T1H = 900, .T0L = 900, .T1L = 350, .TRS =  50000}; // orig datasheet
//timingParams ledParams_WS2812B = { .T0H = 400, .T1H = 850, .T0L = 850, .T1L = 400, .TRS =  50000}; // 2016 datasheet
timingParams   ledParams_WS2812B = { .T0H = 450, .T1H = 850, .T0L = 850, .T1L = 450, .TRS =  50000}; // cplcpu test

What is the benefit over FastLed lib ?

Everything is in the title,

Your library looks promizing but I just wanted to know what is the benefit to use RMT over the FastLed style library which more Software controled by the CPU itself.

Thanks for your great job 😊

What are the default Arduino Values for Tickrate and CPU needed?

Hi, i have a question, what are the needed values i need to change via make menuconfig for CPU Frequency and Tick rate?
If i leave the values as they are. Should the LEDs still work or not work at all ? because i have problems getting my WS2812B to work (from this site: https://www.banggood.com/100Pcs-DC-5V-3MM-x-10MM-WS2812B-SMD-LED-Board-Built-in-IC-WS2812-p-979463.html?rmmds=detail-left-hotproducts&cur_warehouse=CN ).
I have successfully tested the RMT interface via an integrated LED (set RMT to pulse reaaaaaally slow like just 4 times a second). But i didn't get my WS2812B to work. Any tips here ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.