https://github.com/robcranfill/blatb
Backlight according to (ambient) brightness
https://github.com/robcranfill/blatb
python3 raspberry-lcd raspberrypi
Last synced: 2 months ago
JSON representation
Backlight according to (ambient) brightness
- Host: GitHub
- URL: https://github.com/robcranfill/blatb
- Owner: RobCranfill
- License: gpl-3.0
- Created: 2020-12-31T00:55:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-16T18:05:27.000Z (about 1 year ago)
- Last Synced: 2025-01-15T06:51:08.718Z (4 months ago)
- Topics: python3, raspberry-lcd, raspberrypi
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blatb
**B**ack**L**ight **A**ccording **T**o **B**rightnessYet another (sub)projet for my Raspberry Pi weather display.
This sets the display's backlight according to the ambient light level as
read by an attached [Adafruit VEML7700 light sensor](https://learn.adafruit.com/adafruit-veml7700).I wasn't sure what range of values the sensor returns, so I included code to dump the raw values to a file.
This isn't necessary and I guess I may remove that in the near future. The included shell script
finds the min and max of those values.## Files
* `blatb.py` The code that's run every minute (or whatever) by cron.
* `blatb.sh` OK, *this* is what's run every minute by cron! ;-)
* `cron-listing` This is the crontab line that kicks it off.## Prerequisites
* Hardware
* RPi & Raspian ('Buster' is what I'm running)
* An attached Adafruit VEML7700 light sensor (see above link)
* Must enable I2C (using raspi-config)
* Must restart after updating udev rules* Software libraries
* adafruit_veml7700
* `pip3 install adafruit-circuitpython-veml7700`
(this will also install various other Adafruit "Circuit Python" libraries.)
* rpi-backlight
* `pip3 install rpi-backlight`