Lux Twitter Tweet Bot (Python / Raspberry Pi)

Twitter tweet bot now with Lux levels

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.

LTR-559 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.

get_lux() function

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.

Twitter tweet bot now with Lux levels


The Python script for this project can be found on my GitHub at:

The LTR-559 can be purchased via Pimoroni at:


One thought on “Lux Twitter Tweet Bot (Python / Raspberry Pi)

Comments are closed.