Search
Sense Distance with PING)))
Visit this simple Propeller C - Simple Devices tutorial to learn how to set up and use the PING))) Ultrasonic Distance Sensor to measure distances to objects, and control LED lights on your Propeller board.
PING))) Wiring & Example Code
The Ping))) Ultrasonic Distance Sensor measures the roundtrip echo time of ultrasonic sound to determine how far away an object is. It can measure distances anywhere from 3 centimeters to 3 meters. In addition to being a great distance sensor for robots, it’s also useful for detecting people passing through doorways, viewing art exhibits, approaching holiday props, and more.
Wiring & Connections
Parallax PING))) Ultrasonic Distance Sensor (left) and Parallax Laser PING (right).
Sense Distance with a PING)))
The PING))) Ultrasonic Distance Sensor
The PING))) measures the round-trip echo time of ultrasonic sound to determine how far away an object is, and can measure distances anywhere from 3 centimeters to 3 meters. In addition to being a great distance sensor for robots, the PING))) is also useful for things such as detecting when a person passes through a doorway, approaches art exhibits, and walks near holiday props.
Shield-Bot Roaming with Ping)))
Your Shield-Bot can get ready to roam with its Ping))) turret, using these simple instructions and provided example code.
Sub-system Ping))) and Servo Testing
Program the micro:bit to Use the Ping))) Ultrasonic Sensor
This project has several subsystems that we’ll test independently before we program to work together. First, we need to check the Ping))) Ultrasonic Sensor to see that it is wired properly and produces accurate measurements. This is what you will need to do:
Build the Ping))) Bracket and Circuit
The Build
- Build and test your cyber:bot, following all tutorials up to Navigation with the cyber:bot
- Attach the Ping))) sensor and Mounting Bracket Kit to your cyber:bot, following the directions that come with the kit.
- The Ping))) Sensor plugs into servo header pin 16 on the cyber:bot board.
- Mounting bracket standard servo plugs into servo header 17 on the cyber:bot board.
- Center the Ping))) Mounting bracket on the servo horn.
Roaming with PING Arduino Code
Here is the Arduino code listing for the Shield-Bot and PING))) sensor on a servo mounting bracket: