Using a Whadda Vibration Motor Module
What is a Whadda Vibration Motor Module vibration motor?
We already have a tutorial on how to use a vibration motor on its own. The Whadda Vibration Motor Module simplifies this process by integrating all the essential components—such as a transistor, capacitor, and diode—into a single module along with the coin vibration motor. This ensures a safe and stable circuit, allowing you to easily control the motor without needing to worry about the electronic setup.
Wiring
- G to GND
- V to 5V
- S to pin 13
Getting started
This code is getting the motor to vibrate for 1 second and stop for 1 second.
int motorPin = 13; //motor transistor is connected to pin 3
void setup()
{
pinMode(motorPin, OUTPUT);
}
void loop()
{
digitalWrite(motorPin, HIGH); //vibrate
delay(1000); // delay one second
digitalWrite(motorPin, LOW); //stop vibrating
delay(1000); //wait 50 seconds.
}