I am controlling motor with raspberry pi, using wiringPi. I made my code, and implemented. It worked. But when I exit the code, motor was still working. How can I stop this?
while(1){
digitalWrite(EN1, HIGH);
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
delay(10000);
digitalWrite(EN1, LOW);
delay(5000);
digitalWrite(EN1, HIGH);
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
delay(10000);
digitalWrite(EN1, LOW);
delay(5000);
}