ELectronic ENgineers e-shop
WhatsApp +99470-355-77-72
Telegram bot
Сб, 2024-04-20, 13:19
Приветствую Вас Гость
Меню сайта
Категории раздела
Мини-чат
Наш опрос
Оцените мой сайт
Всего ответов: 394
Статистика

Онлайн всего: 1
Гостей: 1
Пользователей: 0
Главная » Для электронщиков разработчиков » Arduino совместимые контроллеры и платы » Датчик удара,вибрации,наклона

Датчик вибрации с переключателем и регулировкой чувствительности SW-420

Рейтинг: 5.0/2
2.90 AZN
Купить сейчас

Vibration sensor with switch and sensitivity adjustment (model SW-420).
Approximate size: 33 x 14 x 8 mm.

The breakout board contains an LM393 op-amp IC but it is used as a comparator and not an amplifier. Basically, the D0 pin goes high when there is vibration and goes low when there isn’t. You can adjust the sensitivity of the sensor by turning the trimmer on the board.
The board comes with two LEDs: one for power indication and one tied directly to D0. When the D0 pin is high, the D0 LED turns off and vice versa. Yeah, it’s the opposite of what we would like the LED to do.


int SW420 = 3;

void setup(){
 pinMode(SW420, INPUT);
 Serial.begin(9600);
}
void loop(){
 delay(10);
 long pulseWidth = pulseIn (SW420, HIGH);;
 delay(50);
 Serial.println(measurement);
 if (pulseWidth > 1000){
 Serial.println(“The Titans are coming!”);
 }
 else{
 digitalWrite(“Tranquility is here”); 
 }
}

 

Добавил: elektronwik1, Чт, 2022-08-25

Поиск
Вход на сайт
Корзина
Ваша корзина пуста
Валюта

  • 10 AZN = $5.872
  • 1 AZN = 53.376 Рубль
  • 1 AZN = 15.326TL
Copyright WWW.ELEN.AZ Baku Azerbaijan © 2024 Телефон(WhatsApp):+994703557772