Ks0029 keyestudio Digital Push Button: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<br>
==Introduction==
==Introduction==
This is a basic application module. You can simply plug it into an IO shield to have your first try of Arduino. <br>
This is a basic button application module. Momentary Pushbutton Switch usually stays open. When it is pressed down, circuit connected; when it is released, it will bounce back to the status of disconnection. <br>
Advantages:  
The module has three pins for easy connection. You can simply plug it into an IO shield to have your first try of Arduino. 
* Wide voltage range from 3.3V to 5V
<br>[[File:Ks0029-.png|700px|frameless|thumb]]<br>  
* Standard assembling structure (two 3mm diameter holes with multiple of 5mm as distance from center)
 
* Easily recognizable interfaces of sensors ("A" for analog and "D" for digital)
<br>
==Details==
* Interface: Digital
* Supply Voltage: 3.3V to 5V
* Easy to plug and operate
* Large button keypad and high-quality button cap
* Standard assembling structure
* Easily recognizable pins
* Icons illustrate sensor function clearly
* Icons illustrate sensor function clearly
* High quality connector
* Achieve interactive works
* Immersion gold surface
<br>[[File:Button module.png|500px|frameless|thumb]]<br>
 
==Specification==
*Supply Voltage: 3.3V to 5V
*Easy to plug and operate
*Large button keypad and high-quality first-class cap
*Achieve interesting and interactive works
*Interface: Digital
*Size: 30*20mm
*Weight: 4g


<br>
==Connection Diagram ==
==Connection Diagram ==
<br>[[File:Ks0029.png|700px|frameless|thumb]]<br>


<br>[[File:292.png|500px|frameless|thumb]]<br>  
<br>


==Sample Code ==
==Sample Code ==
Line 39: Line 39:
   } else {
   } else {
     digitalWrite(ledPin, HIGH); // turn LED ON
     digitalWrite(ledPin, HIGH); // turn LED ON
  }
}
}
</pre>
</pre>


== Test ==
 
<br>[[File:KS0029 (8).jpg|500px|frameless|thumb]]<br>  
<br>
== Result==
When you push the digital button, the Led 13 on UNO board will be on. When release the button,the led is off. Shown as below.
<br>[[File:KS0349 7-3.png|800px|frameless|thumb]]<br>
 
== Extension ==
To obviously observe the LED state, you may connect an LED module. Try to program it by yourself. Press the button to control the LED on and off.
<br>[[File:Ks0029-1.png|600px|frameless|thumb]]<br>
 
<br>


==Resources ==
==Resources ==


'''Video'''
* '''Video'''<br>
http://video.keyestudio.com/ks0029/
 
* '''PDF and Code'''<br>
https://fs.keyestudio.com/KS0029


http://www.keyestudio.com/wp/ks0029/
<br>


'''PDF'''
==Buy From ==


https://drive.google.com/open?id=1Uqi1u2NuQ83Nh56HhyIEIkPj1ix7jM8x
*[https://www.keyestudio.com/free-shipping-keyestudio-digital-push-button-switch-module-for-arduino-p0154.html      '''Official Website''']


==Buy From ==
*[https://www.aliexpress.com/store/product/Free-shipping-Keyestudio-Digital-Push-Button-Switch-Module-for-Arduino/4247007_32890262774.html?spm=2114.12010615.8148356.1.512879c5CAU3rB    '''Shop on aliexpress''']
'''Official Website'''


http://www.keyestudio.com/keyestudio-digital-push-button-for-arduino.html


[[Category: Sensor]]
[[Category: Sensor]]

Latest revision as of 14:49, 7 January 2021


Introduction

This is a basic button application module. Momentary Pushbutton Switch usually stays open. When it is pressed down, circuit connected; when it is released, it will bounce back to the status of disconnection.
The module has three pins for easy connection. You can simply plug it into an IO shield to have your first try of Arduino. 
thumb


Details

  • Interface: Digital
  • Supply Voltage: 3.3V to 5V
  • Easy to plug and operate
  • Large button keypad and high-quality button cap
  • Standard assembling structure
  • Easily recognizable pins
  • Icons illustrate sensor function clearly
  • Achieve interactive works


Connection Diagram


thumb


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 = 3;               // Connect sensor to input pin 3 
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
  }
}



Result

When you push the digital button, the Led 13 on UNO board will be on. When release the button,the led is off. Shown as below.
thumb

Extension

To obviously observe the LED state, you may connect an LED module. Try to program it by yourself. Press the button to control the LED on and off.
thumb


Resources

  • Video

http://video.keyestudio.com/ks0029/

  • PDF and Code

https://fs.keyestudio.com/KS0029


Buy From