3 Float/Reed Switches Controlling a 16 Pixel RGB LED Ring via UNO
Good evening,
My latest project is for a level indicator on my chicken coops water supply. I am using an Arduino UNO, 3 reed float switches and a 16 pixel RGB LED Ring (adafruit Neopixel). I have the switches at 3 different positions in the water tank. I am wanting to light the RGB LED ring a different colour depending on which switch is closed. The bottom one red, the middle orange and when at the top, green.
I have the LED ring working. I also can have the switch working on its own. But not controlling the LED.
I have no idea what to do next. I am thinking that i need to get the switch turning the LEDs on. Then I can start thinking about using all three at once.
I am hoping someone can help? It seems a simple task for the arduino to do but I am very new at this so I'm struggling a little bit.
Thank you all in advance.
Comments
5 years ago
You are already using a computer for this so I somehow fail to see the problem !?
Three inputs, three outputs, which really equals to just a few lines of code.
Do it fancy with some IF statements so only one LED will be one at any given time.
Reply 5 years ago
I'm using a LED Pixel. I have got it working with 3 separate LEDs but wanted to use one of these (Pic below).
Reply 5 years ago
Sorry again, but I still fail to see the problem as the code libraries can be downloaded from Adafruit.
Simply adapt your 3 LED code for the neopixel library, examples should be included....