| Electronic Components Datasheet Search |
|
KY-034 Datasheet(PDF) 37 Page - AG Electronica |
|
|
|||||||||||||||||||||||||||||
KY-034 Datasheet(HTML) 37 Page - AG Electronica |
|
37 / 50 page ![]() Descripción: El modulo sensor de golpe debe ser conectado a un circuito muy simple que constara de un LED conectado al PIN 13 del Arduino, el cual, parpadeara en el momento que el modulo detecte un golpe, de lo contrario el LED permanecerá encendido. Código: int Led = 13 ;/ / define LED Interface int Shock = 3 / / define the percussion Sensor Interface int val ;/ / define numeric variables val void setup () { pinMode (Led, OUTPUT) ;/ / define LED as output interface pinMode (Shock, INPUT) ;/ / define knock sensor output interface } void loop () { val = digitalRead (Shock) ;/ / read digital interface is assigned a value of 3 val if (val == HIGH) / / When the percussion when the sensor detects a signal, LED flashes { digitalWrite (Led, LOW); } else { digitalWrite (Led, HIGH); } } </syntaxhighlight lang="C"> Arduino KY-031: Modulo Sensor de Golpe |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |