Eye care and night mode - sblantipodi/firefly_luciferin GitHub Wiki
Night mode
Luciferin offers many features for eye care
, the first being the night mode
which can be enabled directly from the misc tab
.
By setting a percentage above 0%, the night mode
will be activated and will start to reduce the brightness within the time interval set according to the set percentage.
Eye care dialog
If you click the ☰
button you can access the eye care
dialog where you can enable other eye care
features.
Eye care dialog offers the following features:
- Night light: Use warmer colors to block blue light. The higher you raise the level, the more blue light will be blocked. The 'Auto' setting syncs with the night light setting in your operating system.
- Luminosity threshold: If enabled LEDs will never turn off in black scenes, a soft and gentle light is used instead.
- Peak brightness limit: Limit peak brightness without affecting lower brightness scenes.
- Light dependent resistor (LDR): Brightness will be controlled by your LDR sensor. The following functionalities require the LDR sensor.
- Room brightness: Current brightness level read by the LDR sensor.
- LDR reading interval: Interval in minutes between LDR readings.
- Turn off LEDs during readings: Turn off LEDs between readings, this is useful if you have the LDR near the LEDs
- Minimum LED brigthness: Use a minimum brightness level when the room is very dark.
- Calibrate LDR: Current brightness level of the room will be used as the maximum level from which to start adjusting the brightness of the LED strip. Calibration takes up to 5 seconds.
Automatic brightness control using LDR
A photoresistor (also known as light-dependent resistor or LDR) is a passive component that decreases resistance with respect to receiving luminosity (light) on the component's sensitive surface.
Luciferin can use this cheap component to automatically adjust the brightness of the LED strip according to the brightness of the room.
This feature is optional but requires an LDR paired with a 10K Ohm resistor once enabled. GL5516 LDR is good ones for the purpose.
If you are using a custom PCB you can connect the LDR to GPIO36 or GPIO33 if using ESP32
, and to A0 if using an ESP8266
.
If you are using the Luciferin Official PCB, just connect the LDR on the R5 silkscreen and the 10K Ohm resistor on the R4 silkscreen.
Once auto brightness is enabled, brightness can't be adjusted manually.
If your room is not really bright and you want to use the current brightness of the room as the maximum brightness, you can calibrate the LDR by clicking the ✔
button.
Current brightness level of the room will be used as the maximum level from which to start adjusting the brightness of the LED strip.
If you want to reduce the eye strain even more, please have a look at the Smoothing feature that uses Linear Interpolation with Frame Insertion.