Hey everyone. this is my first time using Arduino.
i've tried all day to activate my vibrating coin motor via Arduino uno board without sucsses.
i have a PMDR1 #6148 vibrating coin motor, and my Arduino board was connected this whole time to the computer via the correct cable.
i've tried to connect it and activate the vibration motor in two ways:
- connecting the blue wire to the ground, the red wire to digital exit 9, implementing the following code, pressing verify\compile and upload:
const int motorPin = 9; // Digital pin to which the motor is connected
void setup() {
pinMode(motorPin, OUTPUT); // Set the motor pin as an output
}
void loop() {
// Activate the vibration motor
digitalWrite(motorPin, HIGH);
delay(1000); // Vibration for 1 second
// Turn off the vibration motor
digitalWrite(motorPin, LOW);
delay(2000); // Pause for 2 seconds before the next vibration
}
- using a breadboard, connecting two wires from the Arduino board to the ground and two wires from the coin vibration motor to the breadboard.
what am i doing wrong?
from videos i've seen
thank you!!