Ks0112 keyestudio EASY plug Digital Push Button
EASY plug Digital Push Button
Introduction
This is a basic application module widely applied in Arduino, Raspberry Pi platforms. When the button is pressed, it outputs high level signal; when you release the button, it outputs low level signal. You can simply plug it into an IO port to have your first taste of Arduino.
Note: this module needs to be used together with EASY plug control board.
Specification
- Interface: Easy plug
- Supply Voltage: 3.3V to 5V
- Large button keypad and high-quality first-class cap
- Standard assembling structure (two 3mm diameter holes with multiple of 5mm as distance from center)
- Sensor type: Digital
- Size: 38*20mm
- Weight: 6g
Connection Diagram
Sample Code
/* # When you push the digital button, the Led 13 on the board will turn on. Otherwise,the led turns off. */ int ledPin = 13; // choose the pin for the LED int inputPin = 11; // Connect sensor to input pin 11 void setup() { pinMode(ledPin, OUTPUT); // declare LED as output pinMode(inputPin, INPUT); // declare pushbutton as input } void loop(){ int val = digitalRead(inputPin); // read input value if (val == HIGH) { // check if the input is HIGH digitalWrite(ledPin, LOW); // turn LED OFF } else { digitalWrite(ledPin, HIGH); // turn LED ON } }
Resources
https://drive.google.com/open?id=1n231PI2jg8BQcIFIccbpYRfGLHEpQoP0
Buy from
Official Website
http://www.keyestudio.com/keyestudio-easy-plug-digital-push-button-for-arduino.html