{"product_id":"1814-pa4a","title":"1814-PA4A - LIGHT BLOCKING PHOTO INTERRUPTER SENSOR MODULE KY-010","description":"\u003cp\u003eKY010 Broken Light Blocking Photo Interrupter Sensor Module For AVR PIC DIY KITS\u003c\/p\u003e\n\n\n\u003cp\u003ePhoto interrupter module and a digital interface  builtin 13 LED build a simple circuit to produce.photointerrupter warning lamp\u003c\/p\u003e \n\n\u003cp\u003eIt comes with digital interfaces of the LED  the light blocking access number 3 sensor interfaces sensing when the light interrupter\u003c\/p\u003e \n\n\u003cp\u003eDevice senses a key signal  LED lights  otherwise off.\u003c\/p\u003e \n\n\u003cp\u003eRoutines source code:\u003c\/p\u003e \n\n\u003cp\u003eint Led = 13 ;\/\/ define LED Interface\u003c\/p\u003e \n\n\u003cp\u003eint buttonpin = 3; \/\/ define the photo interrupter sensor interface\u003c\/p\u003e \n\n\u003cp\u003eint val ;\/\/ define numeric variables val\u003c\/p\u003e \n\n\u003cp\u003evoid setup()\u003c\/p\u003e \n\n\u003cp\u003e{\u003c\/p\u003e \n\n\u003cp\u003epinMode (Led  OUTPUT) ;\/\/ define LED as output interface\u003c\/p\u003e \n\n\u003cp\u003epinMode (buttonpin  INPUT) ;\/\/ define the photo interrupter sensor output interface\u003c\/p\u003e \n\n\u003cp\u003e}\u003c\/p\u003e \n\n\u003cp\u003evoid loop ()\u003c\/p\u003e \n\n\u003cp\u003e{\u003c\/p\u003e \n\n\u003cp\u003eval = digitalRead (buttonpin) ;\/\/ digital interface will be assigned a value of 3 to read val\u003c\/p\u003e \n\n\u003cp\u003eif (val == HIGH) \/\/ When the light sensor detects a signal is interrupted  LED flashes\u003c\/p\u003e \n\n\u003cp\u003e{\u003c\/p\u003e \n\n\u003cp\u003edigitalWrite (Led  HIGH);\u003c\/p\u003e \n\n\u003cp\u003e}\u003c\/p\u003e \n\n\u003cp\u003eelse\u003c\/p\u003e \n\n\u003cp\u003e{\u003c\/p\u003e \n\n\u003cp\u003edigitalWrite (Led  LOW);\u003c\/p\u003e \n\n\u003cp\u003e}\u003c\/p\u003e \n\n\u003cp\u003e}\u003c\/p\u003e","brand":"Generic","offers":[{"title":"Default Title","offer_id":44818973884485,"sku":"274175-1814-PA4A","price":7.95,"currency_code":"CAD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0102\/6644\/3834\/files\/1814-PA4A.jpg?v=1776257162","url":"https:\/\/shop.sayal.com\/products\/1814-pa4a","provider":"SAYAL Electronics","version":"1.0","type":"link"}