Last month I added a Pimoroni breakout garden with a temperature/pressure sensor to my Raspberry Pi, and built a whole project around it. As the breakout garden has 2 additional slots that were empty I have decided to use one for the LTR-559 (sadly to my knowledge not a droid in Star Wars) Light & Proximity Sensor.
I am going to use the sensor to measure illuminance (light) in the room. These light measurements are done in Lux. The Python for using the sensor is just a few lines.
With the additional lines of Python, the Twitter tweet bot now reports:
- Room temperature and pressure from the BMP280 sensor
- Time from the Python using datetime
- CPU temperature from Python using gpiozero
- Lux level from the LTR-559 sensor
The Tweet bot tweets every 30 minutes as the Python program is called at 30 minute intervals via a scheduled cron job.
The Python script for this project can be found on my GitHub at:
The LTR-559 can be purchased via Pimoroni at: