5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



EASY PLUG Super Starter Kit For Arduino Project 4: Push Button

Posted by Fiona Su on

Overview
In this project, we’ll be looking at the one of the most common and simple inputs- a push button. It is an elegant way to control power to your project. Press once to turn on, then press again to turn off. Press to release pleasure!
Component Required:

  • EASY plug control board*1
  • EASY plug Digital Push Button *1
  • EASY plug LED Module *1
  • RJ11 cable*1
  • USB cable*1

Component Introduction



The EASY Plug Push-button module is a tidy little design that lets you control a DC power source using an everyday tactile button.
This basic application module is widely applied to Arduino, Raspberry Pi platforms.
When the button is pressed, it outputs HIGH level signal; if release the button, it outputs LOW level signal.
You can simply connect to an IO port to have your first taste of Arduino.

  • Supply Voltage: 3.3V to 5V
  • Large button and high-quality top cap
  • Sensor type: Digital

Connect It Up
Connect the EASY Plug push button sensor and LED module to control board using RJ11 cables.

thumb

Example 1: Button Controlled Light
Upload the Code
Below is an example code.

thumb

What You Should See
Powered up and upload well the code, press down the button, LED module is turned on. While release the button, LED is off.

thumb

thumb

Open the monitor, it will print out the value read from the button.

thumb

Example 2: Simulating Table Lamp
Upload the Code
Below is an example code.

thumb

What You Should See
Powered up and upload well the code, press down the button, LED light is turned on, it will not be off when release the button; But if press the button once again, LED will be turned off. It seems like your table lamp.

thumb

Open the monitor, you should be able to see how many times do you press the button.

thumb

All Tutorial

 Buy here>>EASY PLUG Super Starter Kit For Arduino STEM EDU

0 comments

Leave a comment

Please note, comments must be approved before they are published