Home > other >  C51: three hcsr04 ultrasonic automatic obstacle avoidance car
C51: three hcsr04 ultrasonic automatic obstacle avoidance car

Time:10-05

Csc51 automatic obstacle avoidance car, with the ultrasonic module, three or so, before action is to use the rear wheel turn two motor control movement, control of the motor is l298
This is my application, I use the physical test, not make bosses who see program which was wrong, or am I the original broken

CodePudding user response:

The simulation test program is normal, but this is a sample program, logic.
Initialize the ultrasonic value in the middle of 110 more than 100 application conditions are to go forward, adjustment between the ultrasonic value is about 90 is determined, because about initial value is different, so the side wheel rotation, any adjustment about ultrasonic value is greater than or less than the other side of the edge, the corresponding wheel rotation or stopped.
  • Related