r/arduino • u/MassiveRisk99 • Sep 27 '26
Hardware Help Need to differentiate between red light and white light on a sensor
I have a game project that I am struggling to solve an issue on.
The aim is to open a device and disable a security feature before continuing. This security feature is a light sensor, if the item is opened when it is bright they will lose a life or fail the game.
The method I would like the players to use is have use red light. This will make the rest of that section of the game more challenging.
I have tested a few things with an LDR and filters etc. to try and get some sort of difference in values for the red light and white light with no luck.
Looked into a TCS34725 RGB colour sensor but i am unsure if this would even work as it is mainly used to detect the colours of an object, not environmental light.
Does anyone know if it would be possible to cover the white LED and only use the sensor to detect a large enough difference in white light and red light to make the game work?
The aim is to not cover the sensor as it should trigger fairly quickly after the device is open, so needs to be quite sensitive. Plus they are not meant to know the location of the sensor. Although if I cannot figure anything better out, I will probably have to go this route.
Or are there any other suggestions from people on what i could do?
Edit: I was using the wrong shade filters. Tested all of the shades and found one that drops the levels enough to make the game work.