Sensor repository for the SAC Sensor
This repository contains the python code of the SAC Sensor.
The SAC Sensor consists of a Grove Luminance Sensor which is plugged into a GrovePi board and uses MQTT as the IoT protocol.
The SAC Sensor measures the luminance in a fixed interval and publishes its measured value and position to the MQTT network.
The sensor value ranges from
0 - 1000.
How to install and run
- Clone the repository onto the Raspberry Pi 3 (with GrovePi board and Luminance sensor).
- Go to the directory where the
setup.pyfile is located.
sudo python3 setup.py installor
pip3 install sensor
- to run the sensor, got to the directory where the
python3 core.pyto run the sensor
core.py, you can check or change the
PIN where you plug the Luminance sensor into the GrovePi board (default is 0, which is the pin A0 on the GrovePi board).
You can also change the interval, in which the sensor publishes its value (
mqttconfig.py, you can change the IPv4 address of the broker.