INFOSTATION CORP
  • Home
  • Gallery
  • Contact
  • About
  • Digital Goods
  • Home
  • Gallery
  • Contact
  • About
  • Digital Goods
Search

Sensor - Push Button Module

26/5/2019

Comments

 
The push button module is a switch to close a circuit when you press the button. The module has 3 pins and can be configured as a pull-down resistor  or pull-up resistor. A pull-down resistor is used to make the default state of the digital pin as Low or tothe logic level in 0V value, while a pull-up resistor is used to make the default state of the digital pin as High or to the logic level in 5V value. 
In my push button I have, the left side is the Sensing side, where it should connect to the digital input 4 pin of Arduino. 
​
Note: Use a tester to verify the correct connection of the pin. Test the connection in the tester where the 10k values and the 0 values will be displayed. The common of this connection is the signal pin. 
Picture
the middle pin of the module should be connected to the GND pin of Arduino. In this state, it is a pull-down resistor. Meaning, there's no LED light when the code has been uploaded and executed to the Arduino. The right side pin of the module should be connected to the VCC (5V) of the Arduino, so it would give HIGH signal to the digital pin 4 when the user pressed the push button.

Picture
I made a short sample of the push button module code. See the code below. In this code, the input will be read in the digital pin 4, and the output will be in the digital pin 13. When the input reads LOW signal, there is no light display in LED. But when the input reads HIGH signal, there should be light display in LED.  Let us upload the code (sketch) to the Arduino so we could test it.

    
After uploading the code, the LED should not lit up, because the default state is the pull-down resistor. See the image for my demo.
Picture
When you pressed now the push button, you should see the LED lit up.
Picture
There it goes. We will discuss another sensor to our next article.
Comments

    Noel Anonas

    Author, coder, Innovator
    email:
    ​noelqanonas@gmail.com
    My Resume
    ​Couse Outline for Java

    Picture

    Archives

    July 2019
    June 2019
    May 2019
    June 2017

    Categories

    All

    RSS Feed

    View my profile on LinkedIn
  • Home
  • Gallery
  • Contact
  • About
  • Digital Goods