Newsletter

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

Name:


Email:


Ok

Mercury open optical module

Mercury open optical module - Miscellaneous
Brand: Various
Product Code: AC-1142
Availability: In Stock
Price: 4,55€
Incl. 0,73€ VAT excl. shipping costs
Qty:        

Mercury open optical module

    Mercury switch module and a digital interface, built-in 13 LED build a simple circuit to produce tilt warning lamp 13 comes with digital interfaces of the LED, the mercury tilt switch sensor interface to access digital 3, when the tilt switch sensor senses a key signal, LED lights, otherwise off.

     

    Code Sample:

    int Led = 13 ;// define LED Interfaceint buttonpin = 3; // define the mercury tilt switch sensor interfaceint val ;// define numeric variables valvoid setup (){
    pinMode (Led, OUTPUT) ;// define LED as output interface
    pinMode (buttonpin, INPUT) ;// define the mercury tilt switch sensor output interface}void loop (){
    val = digitalRead (buttonpin) ;// read the values assigned to the digital interface 3 valif (val == HIGH) // When the mercury tilt switch sensor detects a signal, 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