Article Image
Article Image
View All Posts
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi

I recently got hold of a Raspberry Pi along with a starter kit. My starter kit came with a couple of sensors and components.

The temperature sensor is the DS18B20


Getting this up and running was pretty straightforward following various instructions on the internet - the most useful being the one from Adafruit

My sensor already comes with a resistor on it’s circuit board so the wiring was just a case of plugging the red wire to the 3.3v supply, the black wire to ground, and the white wire to Pin 7 on my breakout board.

wiring disagram

To load up support for the device follow these steps:

sudo modprobe w1-gpio
sudo modprobe w1-therm
cd /sys/bus/w1/devices
28-0000057cc14e  w1_bus_master1
cd 28-0000057cc14e
cat w1_slave
68 01 4b 46 7f ff 08 10 05 : crc=05 YES
68 01 4b 46 7f ff 08 10 05 t=22500

The second line of text is the temperature.

If you want to change the pin that w1 devices can connect to then you need to edit /boot/cmdline.txt and add this parameter:

bcm2708.w1_gpio_pin=<GPIO_pin_number> (for examplebcm2708.w1_gpio_pin=17).

Related Posts

Raspberry pi Infrared Receiver - Set up an infrared receiver with a Raspberry Pi and LIRC in this detailed guide, covering wiring, installing LIRC, and configuring your remote control.
Connecting up the MCP23S17 and HD44780U based LCD - Explore the Raspberry Pi GPIO extensibility by connecting an MCP23S17 extension to drive an LCD display in 4-bit mode, leaving the I2C, UART, and SPI functionalities free for future projects.
Raspberry Pi iBeacon - Follow this guide to create an iBeacon using a Raspberry Pi, Bluetooth 4.0 dongle, and basic iOS app for monitoring the beacon's proximity.
Forget SSH and vim, Use VSCode to Remote Develop on the Raspberry Pi - Learn how to use VSCode's remote development features for an efficient, hassle-free experience while coding on the Raspberry Pi, with access to all hardware components and support for most models.
Raspberry Pi BTLE Device - Find out how to turn your Raspberry Pi into a fully functional Bluetooth device that communicates with an iPhone app using the Node.js module, Bleno.

Related Videos

Getting started with Raspberry Pi Pico - MicroPython - Dive into this Raspberry Pi Pico tutorial where you'll solder headers, set up Thonny, write codes in MicroPython, and create a blinking LED project to kick off your Pico journey.
Custom ESP32 PCB Soldering - Learn about the steps to solder and test a custom ESP32 board for a Moon Lamp project, including assembling components, connecting pins, and controlling LED channels.
My 3D Printer Is Out to Get Me! - Solve your Ender 3 printer's overheating problems by wiring up a new XT60 plug and socket for better connection and heat reduction, and discover the usefulness of an infrared camera in identifying issues.
Flashing the TS80P with IronOS and Soldering up a RaspberryPi Pico W - Experience the powerful and efficient performance of the TS80P soldering iron combined with open-source IronOS firmware, and learn how easily it can elevate your soldering projects, including working with the Raspberry Pico W.
Raspberry Pi Hidden Settings - Setup Hostname, SSH and WiFi from the Pi Imager Application. - Easily set up SSH, WiFi, and hostnames for your Raspberry Pi by accessing a hidden screen within the Imager Application. Press Ctrl+Shift+X to reveal this convenient feature.
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening


> Image


A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff. Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...

View All Posts