someweisguy / esp_dmx

Espressif ESP32 implementation of ANSI-ESTA E1.11 DMX-512A and E1.20 RDM
MIT License
350 stars 37 forks source link

AVR Port? #47

Closed drewTheNerd closed 1 year ago

drewTheNerd commented 1 year ago

Hello,

First off, thanks for this amazing library. This is the only library on the entire internet that I can find that appears to have implemented RDM for an Arduino ecosystem. I've been searching for one for a long time, and trying to write my own, but with minimal success.

I have some DMX strip tape (similar to the WS2812B strip tape that's super popular) but the only way to address each segment of the strip is via RDM. Additionally, I've also been testing with some other larger fixtures that come from china which are also RDM addressable. I'm trying to figure out a way to implement an RDM controller on Arduino so I can address these fixtures.

That said, as I write this I am attempting to test this library on an ESP8266 that I have lying around, but I would prefer to use an Atmega processor instead, such as the Atmega2560. (I'm working on eventually implementing this on custom hardware, and the Atemga chips are what I had planned on using for a variety of reasons.) So my question is, will there ever be an AVR port of this library? If so, I would be happy to help (as best I could -- I'm not super experienced with writing custom Arduino libraries, but I have been working with the Arduino ecosystem for years, so I'm pretty experienced with the ecosystem in general.)

Thanks, Drew

someweisguy commented 1 year ago

Thank you for the kind words! Seriously, that is so nice of you to say. :)

First let me address the ESP8266 - this library is not compatible with ESP8266. It's one of my biggest disappointments. I discuss this a bit here. Essentially, the platform that ESP32 runs on, ESP-IDF, is not ESP8266 compatible so esp_dmx is not ESP8266 compatible. It's super frustrating.

In that same issue linked above, I mention some of the requirements to port this library. It is completely impossible to port v1 or v2 of this library to any architecture besides ESP32. But I've made some fundamental changes to v3 to make porting possible. Here are the current requirements needed to port v3 of this library:

The big problem here is FreeRTOS. To use this library without FreeRTOS would require a major code rewrite. There appears to be a library which adds FreeRTOS to Arduino, but I haven't looked into it at all.

If you are interested in porting this library, I welcome any help you can provide and I'm happy to answer any questions you might have! There are some things that I can do as well to make this library more portable. I'll add those to my to-do list. But it still may be a while before I'm able to get to them.