What I've done + issues:
- Tried to run a light dependent resitor (LDR) on the same board, and get it to display on the Arduino IDE serial monitor. It worked on its own, but not at the same time as the LED ring display. I discovered that this is due to my use of delay(), which pauses the whole loop().
- In the end, I managed to get everything working at the same time by reducing the delay for the LEDs.
- I'm not getting a very wide value change for the LDR. Values only vary from 500-800. WIle I wasn't expecting them to go all the way to 1023 when the LDR is fully uncovered, I was expecting them to be close to 0 when I cover the LDR with my finger.
- Wanted brightness to change based on LDR value, but can't see a change. Not sure what it's due to. Maybe the value itself doesn't change enough. Maybe I haven't defined the right type of variable (don't know if the neopixel library needs it to be an integer, I assume so since it goes from 0-255). Maybe my code's just wrong in another way.
What I want to do:
- Find other functions which can replace the same effects as a delay and prime better programming practices for myself in the future.
- Investigate reason for LDR values not going below 500.
- inversitage whether need / able to use "ldrValue/4" as a variable to define brightness of LEDs.