{"id":1135,"date":"2018-01-16T11:23:49","date_gmt":"2018-01-16T13:23:49","guid":{"rendered":"https:\/\/arduxop.com.br\/loja\/produto\/ky-004-key-switch-module\/"},"modified":"2024-07-25T07:58:41","modified_gmt":"2024-07-25T11:58:41","slug":"ky-004-key-switch-module","status":"publish","type":"product","link":"https:\/\/arduxop.com.br\/loja\/produto\/ky-004-key-switch-module\/","title":{"rendered":"KY-004 Key switch module"},"content":{"rendered":"<p>When the key is pressed the buildin LED on pin 13 will be turned off.Connecting to the ArduinoPin &#8211; = GND, connect to GND of the ArduinoPin (middel pin) +5 v, connect to Arduino +5Pin S signal, connect to Arduino pin 10&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-Example code&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;int Led = 13 ;\/\/ define LED Interfaceint buttonpin = 10; \/\/ define the key switch sensor interfaceint val ;\/\/ define numeric variables valvoid setup (){ pinMode (Led, OUTPUT); \/\/ define LED as output interface pinMode (buttonpin, INPUT); \/\/ define the key switch sensor output interface}void loop (){ val = digitalRead (buttonpin); \/\/ digital interface will be assigned a value of 3 to read val if (val == HIGH)  \/\/ When the key switch when the sensor detects a signal, LED flashes { digitalWrite (Led, HIGH); } else { digitalWrite (Led, LOW); }}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When the key is pressed the buildin LED on pin 13 will be turned off.Connecting to the ArduinoPin &#8211; = GND, connect to GND of the ArduinoPin (middel pin) +5 v, connect to Arduino +5Pin S signal, connect to Arduino pin 10&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-Example code&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;int Led = 13 ;\/\/ define LED Interfaceint buttonpin = 10; \/\/ define [&hellip;]<\/p>\n","protected":false},"featured_media":1136,"template":"","meta":[],"product_brand":[],"product_cat":[178],"product_tag":[],"class_list":["post-1135","product","type-product","status-publish","has-post-thumbnail","product_cat-sensores","entry","has-media","first","instock","sale","sold-individually","purchasable","product-type-simple","has-product-nav","col","span_1_of_3","owp-content-center","owp-thumbs-layout-horizontal","owp-btn-normal","owp-tabs-layout-horizontal"],"_links":{"self":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product\/1135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/media\/1136"}],"wp:attachment":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/media?parent=1135"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product_brand?post=1135"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product_cat?post=1135"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product_tag?post=1135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}