Oferta!

KY-010 Optical broken module

Original price was: R$ 39,37.Current price is: R$ 32,81.

Em estoque

wws Edmar / Dúvidas sobre o produto? Precisa de ajuda? Fale comigo.
SKU: 10480-H7 Categoria:
  Perguntas e Respostas

Descrição

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———————————————-Example Code———————————————-// 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); }}

Informação adicional

Peso 0,0000 kg
Dimensões 0,0000 × 0,0000 cm

Informações Gerais

Não há perguntas ainda.