Newsletter

Melden Sie sich jetzt für den Newsletter an und profitieren Sie von Aktionen, Gutscheinen & Verlosungen.
 

Name:


Email:


Ok

Light blocking Module

Light blocking Module - Miscellaneous
Brand: Various
Product Code: AC-1136
Availability: In Stock
Price: 4,65€
Incl. 0,74€ VAT excl. shipping costs
Qty:        

Light blocking Module

    Photo 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.

    Left = Ground
    Middle = +5V
    Right = Signal

    Code Sample:

    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 valif (val == HIGH) // When the light sensor detects a signal is interrupted, LED flashes{
    digitalWrite (Led, HIGH);}else{
    digitalWrite (Led, LOW);}}

    Write a review

    Your Name:


    Your Review:Note: HTML is not translated!

    Rating: Bad           Good

    Enter the code in the box below:



    Live Help