I want to create a circuit with vibrating DC motors, that vibrate after each other.
How am I suppose to do this?
I can get one working, but when connecting a second one and 'doubling' the code it doesn't work. So how can I add multiple motors that vibrate after each other?
This is my code for 1 motor that works:
void setup() {
pinMode( 2 , OUTPUT); // Must be a PWM pin (~)
}
void loop() {
analogWrite( 2 , 155 ); // duty cycle, change this value to change intensity of vibration
delay(750); // play for 0.75s
analogWrite( 2 , 0 ); // 0% duty cycle (off)
delay(1000); // wait for 1s
}
See the attachment for my circuit.