Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts

Raspberry Pi Tempreature Sensor with Scratch

So far I've been using LED's and micro switches in my prototyping, I wanted to take it to the next level and see if I could use an integrated circuit.  I thought this would be a good challenge to take to the Bournemouth Christmas hack day!

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.