Trouble controlling Neopixels with mysensors library installed.



  • I have a little night light project I'm working on that uses a pro mini, of which I had a working prototype running with the Neopixels sans MySensor.h. Today I added the NRF transceiver and libraries + configured the sketch for my sensors. Looking at the serial terminal of my gateway I see that data is coming in from the night light sensors. However the Neopixels no longer start up right away and when they do show, do not update rapidly like before. Eventually they stop working all together.

    Did I run out of memory for managing the state of my Neopixels or is there something else going on where MySensors would be blocking the loop?

    github library of my current code:
    https://github.com/destos/night_light


  • Admin

    @destos

    Looks like you send temp every second. What happens if you increase this a bit?



  • @hek When I increase it there is still the same lack of neopixel activity between messages. I put some debugger print statements around my interval functions, and it looks like calling gw.send isn't asynchronous and halts the execution until the message is sent preventing anything else from updating. Including the Neopixels and my brightness tweening.

    Thanks again for your help and project.


  • Hardware Contributor

    did you ever get this working? I have the same with neopixels, using either the adafruit library or the fastled library. As soon as i include the mysensors library the leds no longer change.


  • Mod

    @Shiny I use Ws2812 all over the place in the MySensors Dollhouse setup: https://www.mysensors.org/build/dollhouse
    Maybe you can get some hints from there.


Log in to reply
 

Suggested Topics

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts