Understanding basic robot movement

Tasks: Make robot move

  1. Connest both DC motors to RobDuino controller according to [@tbl:motors_to_RobDuino]:
MOTOR RobDuino Output pins
Left DC Motor - con. A D7
Left DC Motor - con. B D6
Right DC Motor - con. A D5
Right DC Motor - con. B D4

Table: Motors connections to RobDuino Output pins. {#tbl:motors_to_RobDuino}

  1. Write simple programming instructions to move the robot forward. Make right sequence of programming instructions (e.g. digitalWrite() and delay(time_in_ms) functions) to achive:
    1. move the robot forward,
    2. do it for 3000 ms and
    3. stop the robot.

Questions:

You probably ended up with something like [@lst:051_First_moves]:

void setup()
{
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  
  digitalWrite(7, HIGH);
  digitalWrite(6, LOW);
  digitalWrite(5, HIGH);
  digitalWrite(4, LOW);
  
  delay(3000);
  
  digitalWrite(7, LOW);
  digitalWrite(6, LOW);
  digitalWrite(5, LOW);
  digitalWrite(4, LOW);
}

void loop()
{

}

: First moves. {#lst:051_First_moves}

  1. Is this code “easy readable”?
  2. Why is readable code important?

Summary:

<++>

Issues:

<++>