So I’ve been using my pi zero and scroll phat kit as a permanent clock on my desk… it’s awesome!
However I’d love to learn how to dim the display at certain hours… for example after 11PM dip the brightness very low until let’s say… 6AM?
THANK YOU!
So I’ve been using my pi zero and scroll phat kit as a permanent clock on my desk… it’s awesome!
However I’d love to learn how to dim the display at certain hours… for example after 11PM dip the brightness very low until let’s say… 6AM?
THANK YOU!
Hi, most interesting, I have in mind a similar application for my PiZeroW. Reading your posting on the forum I couldn’t find details of “scroll phat kit” ? Please tell me which pHat I need and furthermore I would appreciate a picture of your clockface ? I assume it shows hours, minutes, but does it show seconds ? Which tutorial should I use to install the application ?
NewYears greetings from Finland
calleblyh
@Zeniic good question. I had something like this working at some point. I think I got the hour of the day in 24hour time format, and then adjusted the brightness based on how close that was to my target time. This had the effect of dimming it slowly, though, which is probably unnecessary to start with.
There’s a nice entry point for putting your own brightness in, too:
scrollphathd.write_string(
time.strftime("%H:%M"),
x=0, # Align to the left of the buffer
y=0, # Align to the top of the buffer
font=font5x5, # Use the font5x5 font we imported above
brightness=BRIGHTNESS # <--- Put your own brightness value right here
)
And you could compute your brightness value like so:
import datetime
my_brightness = BRIGHTNESS
now = datetime.now().time()
if now >= time(23,00) and now <= time (06,00):
my_brightness = BRIGHTNESS / 2
@calleblyh I’m guessing it’s the Scroll Bot Kit:
Thank you Phil! I’m not entirely sure how to implement something like this but I’ll give it a good go when I get some time!
And yes it is the Scroll Bot Kit!
Thank you