ANAVI pHAT Sensors Recorder for Firestore
Store air quality data captured with ANAVI pHAT sensors and MH-Z19 to Firestore.
Written in C and Go.
Supported sensors:
- BH1750
- BMP180
- HTU21D
- MH_Z19
Prerequisites
Read the instructions of ANAVI pHAT and MH-Z19 Python module.
Install dependencies:
apt install build-essential wiringpi
sudo apt install python-pip
sudo pip install mh-z19
Put your service-account-key.json
for the Firebase in the project root directory.
See the documentation for more detail.
How to build
HTU21D:
cd ./sensors/HTU21D
make
BMP180:
cd ./sensors/BMP180
make
BH1750:
cd ./sensors/BH1750
make
How to use
Check sensor data
go run ./test-sensors.go
Record sensor data
go run ./write.go
Check Firestore data
go run ./read.go
License
C programs for retrieving pHAT sensor data are provided under MIT License by Anavi Technology.
The rest of the scripts are under MIT License by Takuya Matsuyama.