A Dancing Robot Car

TLROB004

Jugaadu was challenged by Shruti to make a toy car that can dance. Jugaadu accepted the challenge now he needs your help to make a car.
Robo Car chassis Kit
  1. Attach 2 motors and caster wheel to the chassis.
  2. Create a system of motor driver IC and arduino UNO.
  3. Code on arduino IDE. (for connection and code take help of let's tinker app)

    

int motorPin1 = 2;

int motorPin2 = 3;

int motorPin3 = 4;

int motorPin4 = 5;

void setup() {

Serial.begin(9600);

pinMode(motorPin1, OUTPUT);

pinMode(motorPin2, OUTPUT);

pinMode(motorPin3, OUTPUT);

pinMode(motorPin4, OUTPUT);

}

void loop() {

digitalWrite(motorPin1, HIGH); 

digitalWrite(motorPin2, LOW); 

digitalWrite(motorPin3, HIGH); 

digitalWrite(motorPin4, LOW); 

delay(5000);

digitalWrite(motorPin1, HIGH); 

digitalWrite(motorPin2, LOW); 

digitalWrite(motorPin3, LOW); 

digitalWrite(motorPin4, HIGH); 

delay(3000);

digitalWrite(motorPin1, LOW); 

digitalWrite(motorPin2, HIGH); 

digitalWrite(motorPin3, HIGH); 

digitalWrite(motorPin4, LOW); 

delay(5000);

digitalWrite(motorPin1, HIGH); 

digitalWrite(motorPin2, LOW); 

digitalWrite(motorPin3, HIGH); 

digitalWrite(motorPin4, LOW);

delay(3000);

digitalWrite(motorPin1, LOW);

digitalWrite(motorPin2, HIGH);

digitalWrite(motorPin3, LOW);

digitalWrite(motorPin4, HIGH);

delay(4000);

}