I bought some DS18B20 temperature sensors and using the documentation on the pridopia.co.uk website configured my raspberry pi and scratch to read the temperature data.
Using RDP/xrdp to connect to the raspberry pi, I connected using the root logon which you might need to enable.
I needed to run the following commands in the terminal window:
sudo modprobe w1-gpio
sudo modprobe w1-therm
Here's what my breadboard looks like with the temperature sensor.
The pridopia instructions have you setup and run a mesh host which handles reading the data, when you run Scratch you can then join the mesh to get access to the devices.
Here's a screenshot of the scratch program running and displaying the temperature
Will demo this at the next Code Club meeting.
0 comments:
Post a Comment