Tags: Push, Button, Switch, Interrupter, Module, 5v, ky, tactile,

Push Button Switch Module KY-004

  • 6.00 AED
    • Ex Tax:6.00 AED
    • Product Code: KY-004 Push Button Module
    • Availability: Out Of Stock
    The Keyes KY-004 Key Switch Module is a simple on/off Micro switch compatible with Any Microcontroller systems. in general, an ordinary digital button. The use of such a module is perhaps good only in circuits where it is required to connect 1-2 buttons to the microcontroller but a built-in pul..

    The Keyes KY-004 Key Switch Module is a simple on/off Micro switch compatible with Any Microcontroller systems. in general, an ordinary digital button. The use of such a module is perhaps good only in circuits where it is required to connect 1-2 buttons to the microcontroller but a built-in pull-up resistor makes it a little more convenient to use than a bare button. 

    For connections, there is a three-pin connector, the common terminal of the connector is marked with a “-” sign, the central pin is used to supply + 5V supply voltage, the information pin is marked “S”, The size of the module is 24 x 15 mm, weight 1.3 g. In addition to the button, a resistor with a resistance of 10 kOhm is installed on the board. 


    Specifications:

    Material: FR4

    Length: 25mm

    Width: 16mm

    Height: 10mm

    Weight: 1.5g

    Operating Voltage: 5v DC


    This is an Arduino Code for Push Button Switch Interrupteur Module KY-004 :

    Sensor Connections       Arduino Connections       

    LED +                                         =[Pin 13]
    LED -=[Pin GND]
    Sensor Signal=[Pin 10]
    Sensor +V=[Pin 5V]
    Sensor -=[Pin GND]


    int Led = 13 ;// Declaration of the LED-output pin
    int Sensor = 10; // Declaration of the sensor input pin
    int val; // Temporary variable
      
    void setup ()
    {
      pinMode (Led, OUTPUT) ; // Initialization output pin
      pinMode (Sensor, INPUT) ; // Initialization sensor pin
      digitalWrite(Sensor, HIGH); // Activating of the internal pull-up resistor
    }
      
    void loop ()
    {
      val = digitalRead (Sensor) ; // The current signal from the sensor will be read
      
      if (val == HIGH) // If a signal will be detected, the LED will light up.
      {
        digitalWrite (Led, LOW);
      }
      else
      {
        digitalWrite (Led, HIGH);
      }
    }
    

    There are no reviews for this product.

    Write a review

    Please login or register to review