Skip to main content

Reading a LDR with a raspberry pi and publishing the data via mqtt

Project description

# Light Sensor MQTT This repsository contains a simple light sensor for the raspberry pi. Because the pi does not have any analog inputs the scripts measures how long it takes to charge a capacitor until the pi recognizes the voltage as logical one.

The script will takes n measurements, averages them and publishes the result via MQTT. In my setup the MQTT data will be read by home assistant and is used to control the lights.

Requires python3 to run.

## Installation pip install raspberrypi-mqtt-light-sensor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

raspberrypi-mqtt-light-sensor-0.3.0.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file raspberrypi-mqtt-light-sensor-0.3.0.tar.gz.

File metadata

File hashes

Hashes for raspberrypi-mqtt-light-sensor-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ca357c3b0d56c058583ce71e0d325a40373084611cb8f366339f1dd331c5848c
MD5 e08963119d3dbee2a89ee6ddbf7284e7
BLAKE2b-256 b3e6bbe1b95bce5a8d44bc981ae61d10c5220977f55afac9e106e9fda8deda62

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page