I'm using the hub-ee wheels to make a robot.
I want it to turn 90 degrees when it meets a wall.
To do that i need it to perform an action for an x amount of time.
So how do i make it do this (see code below) for 0.5 seconds?
digitalWrite(leftIN1, HIGH);
digitalWrite(leftIN2, LOW);
analogWrite(leftPWM, 200);
digitalWrite(rightIN1, HIGH);
digitalWrite(rightIN2, LOW);
analogWrite(rightPWM, 200);