Tkinter GUI Application Development Blueprints, Second Edition - Second Edition
by Bhaskar Chaudhary
Hardware
To begin with, we need an Arduino Uno board (or any other Arduino board). We also need an ultrasonic range finder sensor. A quick web search shows hundreds of rangefinder sensors for less than a quarter of a dollar. We use a sensor named HC-SR04-Ultrasonic Range Finder, but just about any other sensor would do. The sensor we have chosen provides a range-finding capability for distances in a 2 cm - 300 cm range, with an accuracy of up to 3 mm.
These sensors use sonar to determine the distance to an object, just as dolphins and bats do. Here's how the sensor calculates the distance. The module has two units. The transmitter transmits ultrasound, while a receiver reads any ultrasound that reflects back. Since the speed of ultrasound ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access