Seite 1
BN 2134050 Erschütterungs-/Stoßsensor Kurzanleitung Version: 1 Lieferumfang Produkt (2x) Beschreibung Das Produkt besteht aus einem Erschütterungssensor und einem 10kΩ Pull-up-Widerstand. Verwenden Sie das Produkt zur Erkennung von Erschütterungen. Die besten Ergebnisse lassen sich erzielen, wenn der Sensor Stö- ßen/Erschütterung ausgesetzt ist, die parallel zu den Anschlusspins auftreten.
Pinout / Pin Map Beschreibung LOW Signal bei Erschütterung Stromversorgung Anwendungsbeispiel Das folgende Beispiel verwendet den Sensor, um bei Erschütterung ein Alarmsignal zu senden. Die Anweisungen basieren auf der Arduino®-Plattform. Sie kön- nen auch ein Arduino Derivat oder eine andere Plattform ver- wenden, die das Produkt unterstützt.
loop () { void // Read the value from the sensor shockVal = (shockPin); digitalRead // If we're in an alarm state (shockVal == // Record the time of the shock lastShockTime = millis(); Print alarm to Serial Monitor (!bAlarm){ ("Alarm: Shock module");...
Seite 4
Entsorgung Elektronische Geräte sind Wertstoffe und gehören nicht in den Hausmüll. Entsorgen Sie das Produkt am Ende seiner Lebensdauer gemäß den geltenden gesetzlichen Bestimmungen. Sie erfüllen damit die gesetzlichen Verpflichtungen und leisten Ihren Beitrag zum Umweltschutz. Impressum Dies ist eine Publikation der Conrad Electronic SE, Klaus-Conrad-Str. 1, D-92240 Hirschau (www.conrad.com).
BN 2134050 Vibration / Shock Sensor Quick Instructions Version: 1 Delivery Content Product (2x) Description The product comprises a vibration sensor and a 10 kΩ pull-up resistor. Use the product to detect vibrations. Best results can be observed when the sensor is exposed to jolts occurring parallel to the module pins.
Seite 6
Example Application The following example uses the sensor to send an alarm signal when shock is detected. The instructions use the Arduino® platform to illustrate product use. You can also use an Arduino derivative or another platform that supports this type of product. Connection Module Arduino®...
(!bAlarm){ Serial.println ("Alarm: Shock module"); bAlarm = true; else (bAlarm && (millis() - lastShockTime) > shock- AlarmTime) { Serial.println ("Alarm off"); bAlarm = false; Procedure Prepare a sketch with the given code and upload it to your board. Connect the module/component to the board as shown in the connection diagram or table.
Legal Notice This is a publication by Conrad Electronic SE, Klaus-Conrad-Str. 1, D- 92240 Hirschau (www.conrad.com). All rights including translation reserved. Reproduction by any method, e.g. photocopy, microfilming, or the capture in electronic data pro- cessing systems require the prior written approval by the editor. Reprinting, also in part, is prohibited.