Skip to content

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

Notifications You must be signed in to change notification settings

KD-27/Box-Pushing-Robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. The code includes the libraries Wire.h and Adafruit_VL53L0X.h for I2C communication and the VL53L0X sensor functionality, respectively.

  2. An instance of the Adafruit_VL53L0X class called sensor is created.

  3. The code initializes variables for counting (Count) and storing distance readings (distance).

  4. Motor pins (in1, in2, in3, in4) are defined.

  5. IR sensor pins (IRSensorL, IRSensorR) are defined.

  6. The Stop() function is defined to stop the motor by setting all motor pins to 0.

  7. Movement functions (North(), East(), South(), West()) are defined to control the motor by setting appropriate pin values.

  8. The handleInterrupt() function is defined. It reads the values from the IR sensors and performs appropriate actions based on the readings.

  9. 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.

  10. Interrupts are attached to the IR sensor pins, triggering the handleInterrupt() function on any change.

  11. In the loop() function, the ranging test is performed using the VL53L0X sensor, and the measured distance is stored in the distance variable.

  12. 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.

  13. If the Count variable is 1, the West() function is called.

  14. If the Count variable is 0, the East() function is called.

  15. The code continuously repeats the loop() function to monitor and control the motor based on the distance measurements.

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

No packages published

Languages