kalio Posted November 28, 2017 Posted November 28, 2017 I'm building an advertisement kiosk with the orange pi one, but I have concerns for too high night time screen brightness or too low day time screen brightness. Please could someone one provide me with a solution to solve this issue. I'm not a guru when it comes to Linux programming, but I can run basic Linux commands and can find my way around terminal. I've seen a few solutions; like this (https://askubuntu.com/questions/894460/automatically-adjust-display-brightness-based-on-sunrise-and-sunset), where they get the sunrise and sunset times of the day from a website and use a Cron script to set the screen brightness based on that. But my kiosk is going to be offline so that won't work for me. I will really appreciate the help, thanks in advance.
Larry Bank Posted November 28, 2017 Posted November 28, 2017 Instead of trying to guess the lighting, why not measure it? Something like the MAX44009 light sensor can do the trick. It's simple to connect on I2C (4 wires total) and they're really cheap. https://www.ebay.com/itm/112194480319
Igor Posted November 28, 2017 Posted November 28, 2017 Than use a simple I2C light sensor https://www.ebay.de/itm/Helligkeitsmesser-Sensor-I2C-Bus-digital-TSL2561-fur-Arduino-Raspberry-Pi-New/272477704018
kalio Posted November 28, 2017 Author Posted November 28, 2017 Really nice to get your replies @Igor and @Larry Bank, I like the idea, but that might have to be a future upgrade. I need to put this out as soon as possible, so a bash script that will try to run at specific times (say 6:50 am, 745am, 6pm, 7pm and 7:45pm) and set the screen brightness will be perfect for now. I can buy the ambient light sensor and integrate it later. Thanks
kalio Posted December 5, 2017 Author Posted December 5, 2017 Hi guys...come on help a brother out...I'm still stuck
Igor Posted December 5, 2017 Posted December 5, 2017 1 hour ago, kalio said: I'm still stuck From what you wrote I have no idea of which problem did you stop? Can't you control brightness at all or what?
Larry Bank Posted December 5, 2017 Posted December 5, 2017 How about start here: https://sunrise-sunset.org/api What tools have you tried? What worked/failed?
kalio Posted December 9, 2017 Author Posted December 9, 2017 @Igor @Larry Bank I want to implement this automatically on an orange pi. I'm building an outdoor advertising kiosk, it's going to be offline as well in a remote location. so I just want a Cron script that can adjust the connected screen brightness based on the time of the day.
Larry Bank Posted December 9, 2017 Posted December 9, 2017 From my brief look at Cron scripts (I've never used them), it looks like it will just fire off events at fixed times. This means you'll need to dynamically adjust the script to follow the changing daylight times. This sounds like a lot more effort than just adding a light sensor. Is the time to develop the software really that much cheaper than adding a $2 sensor to each kiosk?
zador.blood.stained Posted December 9, 2017 Posted December 9, 2017 From my brief look at this topic actually setting the screen brightness will be the biggest problem. Without a proper backlight driver and without a DDC I2C interface in the legacy kernel the only way left would be color correction via xcalib, and even this should work only with X server. 34 minutes ago, Larry Bank said: From my brief look at Cron scripts (I've never used them), it looks like it will just fire off events at fixed times. This means you'll need to dynamically adjust the script to follow the changing daylight times. The cron based solution doesn't have to be minute to minute precise but it will require an external RTC module to keep the correct date and time without NTP, and hardcoding some local sunrise/sunset tables. 34 minutes ago, Larry Bank said: This sounds like a lot more effort than just adding a light sensor. Is the time to develop the software really that much cheaper than adding a $2 sensor to each kiosk? Since this will be an outdoor kiosk according to @kalio the light sensors will need to have dust/dirt/rain/snow protection (or regular cleaning) as well as "protection" against artificial light sources (i.e. street lights). So is it really cheaper/simpler? And in any case any solution will require more than basic Linux knowledge and programming skills, so for a commercial project with a deadline it would be better to hire someone to do the software part for you.
Recommended Posts