Home Safety, Vibration Sensor SW-420 and Arduino Nano Code Connection and Working | Arduino Projects
Автор: Automation Dude
Загружено: 2020-09-25
Просмотров: 6006
Описание:
This video is about how to connect Vibration Sensor SW420 to arduino nano and how to write the code. Best project for home safety and security.
--------------------------------------------------------------
🔴Get components from Amazon👉
Arduino Nano: https://www.amazon.in/easy-electronic...
Vibration Sensor: https://www.amazon.in/Generic-CPVKPCB...
---------------------------//------------------------------
Code:
int led =11;
int vs =9; // vibration sensor
void setup(){
pinMode(led, OUTPUT);
pinMode(vs, INPUT);
Serial.begin(9600);
}
void loop(){
long measurement =vibration();
delay(50);
Serial.println(measurement);
if (measurement put greater then sign here 50){
digitalWrite(led, HIGH);
}
else{
digitalWrite(led, LOW);
}
}
long vibration(){
long measurement=pulseIn (vs, HIGH); //wait for the pin to get HIGH and returns measurement
return measurement;
}
---------------------------//------------------------------
🔴 Connect with me on
/ ashish.dahekar
https://www.facebook.com/groups/12880...
---------------------------//------------------------------
Ashish Dahekar youtube channel provide you with genuine and unique electronics and latest technology product review which you will get very rare at one channel on youtube. Please subscribe, we work hard to add Technology values in your life.
All visuals and audios used in our channels are subject to youtube community copyright guidelines.
[You’ll never get these video other than Ashish Dahekar channel]
🔥Click TO Watch Best Timers Review in Market – • Digital Timer switch | Timer Switch Review
🔥Click TO Watch All best Night Lights in market Reviews –
• Touch Light | Night light as Mirror Light,...
---------------------------//------------------------------
All the visuals and music subjected to YouTube copyright policies. We have paid stock footage subscription .
#ashishdahekar
#arduinoprojects
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: