GithubHelp home page GithubHelp logo

Comments (7)

someweisguy avatar someweisguy commented on May 25, 2024 1

I've pushed some code to the dev branch that builds on Arduino! Woohoo! You can clone that branch and copy the folder into your libraries folder in your Arduino directory, and that should allow you to #include "esp_dmx.h".

I am doubtful that the keyword highlighting will work, but I am making progress. I am not thrilled with the fixes I made in the last commit; I'm still trying to figure out how the ESP32 Arduino core works in the grand scheme of things so I am sure that there are better ways to do what I did. For now, this code will work on ESP32, but it can likely break on ESP32-S2 or ESP32-C3. If you use the latter, let me know and I can push a hotfix so that you will be able to play with this library.

No word on Platform.IO yet. That will probably be much, much later.

from esp_dmx.

someweisguy avatar someweisguy commented on May 25, 2024

Thanks for the question! I am working on implementing this repo on Arduino. I haven't done much work in a while because life has gotten in the way a bit, but the Arduino implementation is close. I will hopefully have some free time coming up soon and I'll see where I get with it.

I can add a Platform.IO implementation as well, but I will have to do some research to figure out what that entails. I not very up to date on how PIO works. I'll keep you updated!

from esp_dmx.

ellogwen avatar ellogwen commented on May 25, 2024

Hi, thanks for your answer. No need to rush or stress yourself :) I am currently using a modified LXESP32DMX to work with uart1, but this library needs to patch a core file for receiving to work, which is nothing I can do easily, so I am using it only for transmitting. For now. I will switch definetly in the near future.

I would offer you my help, but I have no clue about esp-idf though.

from esp_dmx.

someweisguy avatar someweisguy commented on May 25, 2024

Highlighting works now! Turns out I had to use a single tab instead of spaces in my keywords.txt file. Whoops!

from esp_dmx.

someweisguy avatar someweisguy commented on May 25, 2024

The latest commit did some reorganizing. In /examples I've renamed all the example files. The example files for ESP-IDF code are now prefixed with idf_. I'm not sure if I love that formatting so it may change in the future.

I've also added some Arduino DMX read example code!

Finally, I found an interesting bug in the previous code. Whenever you called dmx_driver_delete() the ESP32 would attempt to free the heap-allocated double-buffer. It would then detect a corrupted heap and would crash. I couldn't find any other solutions online, but what I found is that when the size of the DMX double-buffer is divisible by 4, the problem goes away. I suspect what is happening is that the Arduino implementation of ESP32's malloc() function only allows you to allocate 32-bit aligned memory as if calling heap_caps_malloc(size, MALLOC_CAP_32BIT) in ESP-IDF. Long story short, only allocate memory by factors of 4 on ESP32 Arduino!

from esp_dmx.

someweisguy avatar someweisguy commented on May 25, 2024

Another update: I've finished adding example code for Arduino! I'm going to style those examples so that they better fit the Arduino example sketch style guide, but they work now as is.

I found that Arduino-ESP32 v1.0.6 and earlier don't support the newest ESP32 chipsets. Arduino-ESP32 v2.0.0 was JUST released less than two weeks ago, and it does support the S2 and the C3. For the sake of inclusion, I'm going to support Arduino-ESP32 v2.0.0 and up only. If you want to use Arduino v1.0.6, I've created a branch called arduino-v1.0.6 but I'm not planning on updating it in the future.

from esp_dmx.

someweisguy avatar someweisguy commented on May 25, 2024

I've officially ported this library to Arduino. It's available in the Arduino IDE library manager and the example code is working. So I am going to close this issue.

I'm still looking into Platform.IO. It looks simple enough, but that will be another release! Let me know if you have any other questions. :)

from esp_dmx.

Related Issues (20)

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.