Arduino 각종 모듈 편 진동 모듈 진동기

1747 단어 arduino
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.
Gvib.jpg
 
const int vibratorPin = 8;


void setup()
{
  pinMode(vibratorPin, OUTPUT);
}

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

make it run!
 
then you will see it vibrate every 1 sec.

좋은 웹페이지 즐겨찾기