If you are asking a question, please follow this template:
- My goal is: I want to put delay between two of my instructions to push DC motor forward and backward. I want to push motor for 600 millisecond first and then pull it backwards
- My actions are:
GPIO.set_mode(2, GPIO.MODE_OUTPUT);
GPIO.set_mode(4, GPIO.MODE_OUTPUT);
Timer.set(600, 0, function() {
GPIO.write(4, 0);
GPIO.write(2, 1);
}, null);
Timer.set(600, 0, function() {
GPIO.write(4, 1);
GPIO.write(2, 0);
}, null);
//your code to be executed after 1 second
GPIO.write(4, 0);
GPIO.write(2, 0);
- The result I see is: Motor does not respond, I just here click-click sound.
- My expectation & question is: I am using H-bridge motor driver IC for controlling and power amplification purposes.