Interesting approach - I tried to add different signatures for different times of the day, but it doesn’t seem to be too consistent. I think with the combination of varying brightness and color temperature, there are just far too many potential combinations. So here are my thoughts on that:
First thing to tackle is brightness
Going back to my original thought, I have made a few changes to the original setup. Instead of a photoresistor, I am using an Adafruit TSL2561 (digital light sensor) and super bright white COB LED with a relatively neutral color temperature. I can vary the brightness of the LED using PWM and a mosfet to match the same brightness as when the color signature was calibrated. The challenge with this now is that the light ends up being too harsh, so I am going to work on diffusing the LED a bit.
Next I have to fix the color temperature issue.
I believe you discussed this in a previous forum post. I haven’t tried it yet, but I will try the “press the button for while balance” method. Since I want to eventually make this automated, I will connect a digital pin to the button to let the Arduino control it (I’ll of course check what logic level it is running at, if it is active high/low, etc). I haven’t tested this bit yet. I could also just reset the Pixy’s power by splicing into the ribbon cable or just individually connecting each pin or something (not important at the moment).
I think the order of operations would be something like:
- Arduino determines camera has to be used (determined by another part of the project)
- Arduino reads light sensor and adjusts LED to match brightness
- Arduino makes Pixy auto-white balance
- Pixy does it’s magic
Please let me know if this is logical or if I am completely missing the point on how this works! Thanks!