Adafruit Smart RGB Neopixel live colour changes

Hi, I'm trying to change the colour of the Neopixel based on input from the VL53L0X distance sensor using simple if statements. For some reason it i not working. Is there a problem with my code? Or are the lights unable to do live colour updates?

nevermind I solved the problem :slight_smile:

I needed to put the pixels.show(); in each if statement

Good!

Before posting next time, please read and use this link, especially the part about posting code: How to get the best out of this forum - Using Arduino / IDE 1.x - Arduino Forum

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.