Raspberry Pi 2 or 3 - not sure about v4 Sense HAT SSD card ( 8 or 16 Gb should be fine )
The board allows you to make measurements of temperature, humidity, pressure, and orientation, and to output information using its built-in LED matrix.
We will use it to publish Temperature(Centigrade) and Humidity metrics to Node-RED on the IBM Cloud - free account!
It will also display the Temperature(Centigrade) to the matrix screen everytime your cron
job runs
- Setting up Raspbian on your pi is easiest with NOOBS
- setting up Sense HAT
#become root user
sudo su
touch /home/pi/sense.log
crontab -e
# add the following line to POST updates every 5 or any interval you like, I chose 5 minutes
echo "5 * * * * /usr/bin/python /home/pi/dev/pi-hat-node-red/push.py >> /home/pi/sense.log 2>&1"
# restart cron
systemctl restart cron
exit
#revert to pi user
mkdir -p /home/pi/dev && cd /home/pi/dev
#clone repo
git clone https://github.com/Grant-Steinfeld/pi-hat-node-red.git
cd pi-hat-node-red
ls
stat push.py
echo "push.py should be here"
copy the contents of Pi-SenseHat-Ingress.Node-RED.json to your clipboard and paste into your node red editor and deploy it.
echo "example call"
python3 push.py https://<<yourNodeRedSubDomainname>>.mybluemix.net/<<your-end-point-path>>
#replace the values in the << >> with valid NodeRED path parts"