{"id":1193,"date":"2018-01-16T11:24:27","date_gmt":"2018-01-16T13:24:27","guid":{"rendered":"https:\/\/arduxop.com.br\/loja\/produto\/ky-010-optical-broken-module\/"},"modified":"2024-09-20T11:29:19","modified_gmt":"2024-09-20T15:29:19","slug":"ky-010-optical-broken-module","status":"publish","type":"product","link":"https:\/\/arduxop.com.br\/loja\/produto\/ky-010-optical-broken-module\/","title":{"rendered":"KY-010 Optical broken module"},"content":{"rendered":"<p>KEYES ARDUINO photo interrupter modulePhoto interupter module use the buildin arduino led. If the sensor is broken the LED is turned on.Device senses a signal, LED lights, otherwise off.SchematicIf you view from the top like on the photoLeft = GroundMiddle = +5VRight = SignalConnect the module to the arduino as follows:Arduino pin GND to module GNDArduino digital pin 3 to module SignalArduino pin 5V to module 5V&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-Example Code&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-\/\/ Example code for KY-010\/\/ photo interrupter module int Led = 13 ;\/\/ define LED Interfaceint buttonpin = 3; \/\/ define the photo interrupter sensor interfaceint val ;\/\/ define numeric variables valvoid setup (){ pinMode (Led, OUTPUT) ;\/\/ define LED as output interface pinMode (buttonpin, INPUT) ;\/\/ define the photo interrupter 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 light sensor detects a signal is interrupted, LED flashes { digitalWrite (Led, HIGH); } else { digitalWrite (Led, LOW); }}<\/p>\n","protected":false},"excerpt":{"rendered":"<p><br data-mce-bogus=\"1\"><\/p>\n","protected":false},"featured_media":1194,"template":"","meta":[],"product_brand":[],"product_cat":[178],"product_tag":[],"class_list":{"0":"post-1193","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-sensores","8":"entry","9":"has-media","11":"first","12":"onbackorder","13":"sale","14":"sold-individually","15":"purchasable","16":"product-type-simple","17":"has-product-nav","18":"col","19":"span_1_of_3","20":"owp-content-center","21":"owp-thumbs-layout-horizontal","22":"owp-btn-normal","23":"owp-tabs-layout-horizontal"},"_links":{"self":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product\/1193","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\/1194"}],"wp:attachment":[{"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/media?parent=1193"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product_brand?post=1193"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product_cat?post=1193"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/arduxop.com.br\/loja\/wp-json\/wp\/v2\/product_tag?post=1193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}