Code Monkey home page Code Monkey logo

Comments (2)

TheSeven avatar TheSeven commented on July 4, 2024

Have you considered using the I2S hardware to drive WS2812 in the background instead of bitbanging it?
Have a look at https://github.com/TheSeven/esp8266firmware/tree/master/src/device/ws2811 for an example.
Some of that code was written by me (feel free to use that), but the I2S interface setup etc. was cherrypicked from random places all over the internet - not sure where exactly the idea originates from. It's been floating around for a while.
Once I get around to getting this project set up on physical hardware (sorry, I'm quite busy lately as well), I might have a go at implanting that into this project.

from esp8266_artnetnode_v2.

scamiv avatar scamiv commented on July 4, 2024

I needed multiple stripes per esp so I2S wasn't an option.

The reason for the flickering is an added 6ยตs by the wifi IRQ. However this wont be disabled by calling RSIL as it is managed by the NMI.
Therefore you also have to mask the non-maskable interrupt to get consistent timing.
Luckily some wise guys found out how: https://www.esp8266.com/viewtopic.php?f=9&t=3979&start=20
After some trial and error i got it to work, it a'int pretty yet but flicker free at last.
https://gist.github.com/scamiv/b931b307afaead5a0f43e6eb2bc57e08

Edit: This is a hack, not a fix. The proper way would probably be to actually use the nmi to shedule our packets.

from esp8266_artnetnode_v2.

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.