Solving a Simple Maze by Following Right Wall Using a Ping)))

Table of Contents
Hi Ken....is the PING))) Ultrasonic Sensor and "Roaming with PING" Arduino Code a good fit to program a Sheild-Bot to pass through a maze? Thank you for your time!
John Hammons
Alexandria City Public Schools

A favorite educator asked me this today, so I thought I’d share it more broadly: yes, you can absolutely solve a simple maze with a Shield-Bot and a Ping))) Ultrasonic Sensor. A great place to start is the simple right-wall following algorithm. Design the maze so the walls are connected, and the robot can exit by staying in contact with one side. Plywood, blocks, or anything movable works well for building it.

What I like about this approach is its simplicity—no map, no localization, just consistent decisions. A cyber:bot, Shield-Bot, or BoE-Bot only needs to monitor what’s ahead and what’s on its chosen side. With a front Ping))) for obstacle detection and a side Ping))) (or a single sensor on a servo), the robot can maintain a fixed distance from the side wall, turn when an object is in front, and navigate cleanly through the maze.

There are endless ways to extend this project: add a Gripper 3.0 to collect objects, use a LaserPing for more organically-shaped mazes, introduce color cues on the floor with a ColorPAL, or even convert it into a line-following maze with QTI sensors. We’ve got plenty of resources to support this, and while AI can help write the code, it can’t replace the hands-on experience of building the robot, designing the maze, and running the challenge in a classroom!

Ken Gracey

Resources: 

5 2 votes
Article Rating
Subscribe
Notify of

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Loading...