Linux Format

Adding distance sensors to projects

OUR EXPERT

Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his adventures and projects at bigl.es.

YOU NEED

>Pimoroni 4 Letter pHAT

>HC-SR04P

>DS18B20

>4.7K Ohm resistor

>Breadboard

>Four-pin screw terminal

>Pimoroni Hacker HAT

>5x M2F jumper wires

>2x M2M jumper wires

>Code: https:// github.com/ lesp/LXF-Four-Letter-Sensors/ archive/ refs/ heads/ main.zip OUR EXPERT YOU NEED

T he Raspberry Pi is blessed with a plethora of sensors, but there are two that sum up how easy it is to work with them on the Pi. Ultrasonic sensors measure distances using a pulse of sound. A little science and maths can give us fairly accurate distances, enabling our robots to “see” the world, and providing contactless user interfaces for projects. Temperature sensors, such as the DHT11, DHT22

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format9 min read
The Epochalypse
On 2nd November 2000, a man calling himself John Titor began posting on Art Bell’s BSS forums, claiming to be from the O future year of 2036. Titor painted a grim version of the 21st century, a cross between Pat Frank’s 1959 post-apocalyptic epic Ala
Linux Format1 min read
Ultimate Desktop Upgrade!
LXF316 will be on sale Tuesday 28th May 2024 Word processors that can help craft that novel you’ve always been talking about and organise large projects. Revive the old roleplaying system for a digital age as we recreate our own play-by-mail gaming
Linux Format3 min read
Kernel Watch
Linus Torvalds announced the fourth RC (Release Candidate) for what will become Linux 6.9 in another few weeks. In his announcement, he noted that there was “Nothing particularly unusual going on this week – some new hardware mitigations may stand o

Related