digitalWrite(pinLF,HIGH);
Car_state = 3;
show_state();
}
void stopp()
//stop
{
digitalWrite(pinRB,HIGH);
digitalWrite(pinRF,HIGH);
digitalWrite(pinLB,HIGH);
digitalWrite(pinLF,HIGH);
Car_state = 5;
show_state();
}
void back()
//back
{
digitalWrite(pinRB,HIGH); //making motor move towards right rear
digitalWrite(pinRF,LOW);
digitalWrite(pinLB,HIGH); //making motor move towards left rear
digitalWrite(pinLF,LOW);
Car_state = 2;
show_state() ;
}
void show_state(void) //showing current state of the car
{
lcd.setCursor(0, 1); //showing from second row
switch(Car_state)
keyestudio
www.keyestudio.com
76