No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
sensor
tests
.gitignore
README.md
setup.py

README.md

Sensor repository for the SAC Sensor

Overview

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.py file is located.
  • type sudo python3 setup.py install or pip3 install sensor
  • to run the sensor, got to the directory where the core.py is located
  • type python3 core.py to run the sensor

Configuration

core.py

In 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 (polling_interval)

mqttconfig.py

In mqttconfig.py, you can change the IPv4 address of the broker.