Arduino 各种模块篇 震动模块 vibrator

时间:2023-03-08 19:52:52
Arduino 各种模块篇 震动模块 vibrator

vibrator is a good thing. it has multi-funtionality . :)

Now the  vibrator we choose is the one which looks like this:

http://www.seeedstudio.com/wiki/Grove_-_Vibrator

I am testing this vibrator which is neat.

Arduino 各种模块篇 震动模块 vibrator

const int vibratorPin = ;

void setup()
{
pinMode(vibratorPin, OUTPUT);
} void loop()
{
// make it vibrate
digitalWrite(vibratorPin,HIGH);
delay();
// make it not vibrate
digitalWrite(vibratorPin,LOW);
delay();
}

make it run!

then you will see it vibrate every 1 sec.