thomasnewmancomputer engineer
  • work
  • writing
  • about
  • contact
All projects

Thomas Newman / Computer Engineer

Explore projects ↗GitHub ↗Get in touch ↗

Automatic Wall-Avoiding Robot

Project 05Robotics / embedded control

Team-built Arduino robot. I wrote the control code that uses ultrasonic ranging to stop, turn, and steer around walls.

C++ArduinoUltrasonic sensorDC motors
Automatic Wall-Avoiding Robot
Embedded systems1 min read
View source

Role: Team project. I wrote most of the Arduino control code, while my partner designed the physical robot.

I developed this project with one other co-instructor for the Jr. DEEP summer camp in 2025.

Behaviour#

Source codetext
Ultrasonic ping -> Distance check -> Stop & turn -> Drive forward

The robot drives forward while checking distance with an ultrasonic sensor. When something is closer than a threshold, it stops, turns, re-checks, and carries on.

The stopping distance is 10 cm, and the turning times were chosen experimentally based on how quickly the motors can turn, and measuring in 90 degree intervals.

What I learned
  • Real sensors are noisy, so one bad reading shouldn't make the robot turn
  • Motors don't spin at matching speeds, so "drive straight" needs tuning

On this page

  1. Behaviour
  2. Source code

Source code

Open repository

Last edited on October 27, 2026 at 12:17 AM EDT

← Previous projectAutonomous Plant-Watering SystemNext project →SpriteForge