Skip to content

tristancalderbank/qdg-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qdg-pi

Python script that runs on a Raspberry Pi and publishes data from an array of multiplexed BME280 sensors to a host computer via redis. This project uses the TCA9548A I2C multiplexer.

Instructions:

  1. First enable I2C on the pi by following this guide:

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

  1. Configure the timezone on the pi by running the following command:
sudo dpkg-reconfigure tzdata
  1. Run pi-setup.py to install python dependencies and add cronjob for starting the publishing script if the pi reboots

  2. Edit publish-data.py and change the ip_address variable to point to the host computer

How It Works

The publishing script writes a single byte to the multiplexer I2C address to select which sensor to read.

By using redis, a database server running on the host computer, the pi can create a "pubsub" channel to which it publishes data collected from the connected sensors. The host computer subscribes to this channel and saves the data into csv format.

About

Python script that collects and fowards sensor data on a Raspberry Pi. Part of the qdg-pi-web project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages