Introduction: Auto Arduino Car
This is a car that can induct the object in the front, let it won't be crash on the object. It well stop with a distance and turn and keep going
Supplies
Prepare:
L298n u3
Arduino(Mega)
Battery
Positive and negative part of bread board
Many wires and positive & negative wires
joy it robot car kit 01
1 ultrasonic
Step 1: Connect Motor
Put two DC motor in the front of the car. Take the gear in other two motor and put it in the back of the car.
Connect DC motor with thin wire. Connect the two that is normal with one with one positive with one negative.
Step 2: Connect Wires With L298n U3 With Arduino
connect 7(on Arduino) to N1(on L298n U3)
connect 6 to N2
connect 5 to N3
connect 6 to N4
connect 2 to ENA
connect 1 to ENB
connect 8 to N5
connect 9 to N6
connect 10 to N7
connect 11 to N8
connect 12 to ENA
connect 13 to ENB
Power part
connect GND to the negative side of the breadboard
connect 5V to positive side
ultrasonic
connect vcc to the positive
connect trig to A1
connect Echo to A2
connect gnd to negative
Motor(right)
positive wires to out 2
negative to out 1
Motor(left)
negative to out 3
positive to out 4
Power
connect vcc and end on L298n u3 to a battery (vcc to positive, and to negative)
connect gnd on positive, +5 to positive
Step 3: Code
Attachments
Step 4:
Done