Skip to content

mrzaizai2k/Wall-following-car-with-Arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Wall-Following Car with Arduino

Check out my two YouTube channels for more content:

  1. Mrzaizai2k - AI (NEW)
  2. Mrzaizai2k (Old)

Maze Solving with Wall Follower Algorithm

The video below explains the project in detail:


Table of Contents

  1. Overview
  2. Functions
    2.1 Stop (dung())
    2.2 Move Forward (tien())
    2.3 Move Backward (lui())
    2.4 Turn Left (retrai())
    2.5 Turn Right (rephai())
  3. Distance Measurement

Overview

This Arduino project controls a robot built with an Arduino Uno, an ultrasonic sensor (HC-SR04), and four DC motors (controlled via the AFMotor library). The robot navigates by measuring distances in front and on its sides, enabling it to stop, move forward, move backward, or turn left and right based on its surroundings.

Functions

2.1 Stop (dung())

Stops all motors and displays "DUNG" (Vietnamese for "STOP") on an LCD screen.

2.2 Move Forward (tien())

Moves the robot forward with customizable speed settings.

2.3 Move Backward (lui())

Moves the robot backward with adjustable speed.

2.4 Turn Left (retrai())

Turns the robot to the left.

2.5 Turn Right (rephai())

Turns the robot to the right.

Distance Measurement

  1. Front Distance (distancefront()): Uses the HC-SR04 sensor to measure the distance ahead of the robot.
  2. Side Distance (distanceside()): Measures the distance to the side using the HC-SR04 sensor.

The main program loop continuously measures distances, updates the LCD with the robot's status, and adjusts its movements based on button inputs. The code is flexible, allowing users to tweak motor speeds and distance thresholds to meet specific project needs.

About

Maze solving with wall follower algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages