Arduino pins 2 wheel drive robot

Draft notes for Arduino pins for 2 wheel drive bot

Arduino Sensor Shield v5.0

  • Infrared sensor:  pin 10–doesn’t need PWM
  • Line sensor:  pins 1, 2, and 3  Doesn’t need PWM, 1= right, 2 = center, 3 = left
  • Motor Right:  pins 4 (IN1 from motor shield–L298N) and 5 (IN2 from motor shield)–ENA gets pin 6–ENA needs PWM
  • Motor Left:  pins 7 (IN3 from motor shield) and 8 (IN4 from motor shield)– ENB gets pin 9–ENB needs PWM
  • Servo for head:  pin 11–servos need PWM
  • Eyeballs (ultrasonic distance sensor–HC-SR04):  pins 12 (Trig) and 13 (Echo)–doesn’t need PWM  Use A4 and A5 (analog)?

L298N motor shield pins

PWM is on pins 3, 5, 6, 9, 10, 11–use for servos, ENA, ENB

Connect to Arduino with VMS and Ground not 5V

Leave a Reply