Nodejs, Expressjs, Mongodb, Mongoose, D3.js concoction to show the Enviro pHAT by pimoroni BMP280 temperature/pressure sensor readings over time, charted by D3.js
Clone this repository to your raspbery pi. Change directory to the foler. Then run the following.
npm install
Add the two processes to the root users crontab to get the pymongo script taking readings and inserting into the mongo database and the express front-end serving up.
sudo vi crontab -u root -e
...
@reboot /usr/local/bin/node /home/pi/enviro-phat/index.js
* * * * * python /home/pi/enviro-phat/read-temp.py
...
sudo reboot
Wait for the raspberry pi to finish booting and see the results by visiting http://raspberrypi.local:3000
You should see something like the screen below.