-
The code includes the libraries
Wire.h
andAdafruit_VL53L0X.h
for I2C communication and the VL53L0X sensor functionality, respectively. -
An instance of the
Adafruit_VL53L0X
class calledsensor
is created. -
The code initializes variables for counting (Count) and storing distance readings (distance).
-
Motor pins (in1, in2, in3, in4) are defined.
-
IR sensor pins (IRSensorL, IRSensorR) are defined.
-
The
Stop()
function is defined to stop the motor by setting all motor pins to 0. -
Movement functions (
North()
,East()
,South()
,West()
) are defined to control the motor by setting appropriate pin values. -
The
handleInterrupt()
function is defined. It reads the values from the IR sensors and performs appropriate actions based on the readings. -
In the
setup()
function, serial communication is initiated, and the VL53L0X sensor is initialized. Motor and IR sensor pins are set as outputs and inputs, respectively. -
Interrupts are attached to the IR sensor pins, triggering the
handleInterrupt()
function on any change. -
In the
loop()
function, the ranging test is performed using the VL53L0X sensor, and the measured distance is stored in thedistance
variable. -
If a valid measurement is obtained, the distance is checked. If the distance is less than or equal to 1300 mm, the
North()
function is called. -
If the
Count
variable is 1, theWest()
function is called. -
If the
Count
variable is 0, theEast()
function is called. -
The code continuously repeats the
loop()
function to monitor and control the motor based on the distance measurements.
-
Notifications
You must be signed in to change notification settings - Fork 0
Our box pushing robot, equipped with two infrared sensors, a VL53L0X sensor, and motor control, navigates and pushes boxes efficiently. Additionally, it features a hammer rotating in the vertical plane for enhanced versatility and functionality.
License
KD-27/Box-Pushing-Robot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Our box pushing robot, equipped with two infrared sensors, a VL53L0X sensor, and motor control, navigates and pushes boxes efficiently. Additionally, it features a hammer rotating in the vertical plane for enhanced versatility and functionality.
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published