Controlling LED In Keypad App By Android App

Controlling LED In Keypad #App Using #AndroidApp via @CsharpCorner  #IoT #Android

  • Introduction

    In this article, I am going to explain about controlling the LED in Keypad app by an Android app.

  • Explanation

    According to the connection, upload program to the board and download the keypad app in the Playstore, install, and see the result.

  • Similarly, the other LEDs also get turned ON and OFF by the keypad app, without bluetooth.
  • According to the connection, upload program to the board and download the keypad app in the Playstore, install, and see the result.
  • Similarly, the other LEDs also get turned ON and OFF by the keypad app, without bluetooth.

In this article, I am going to explain about controlling the LED in Keypad app by Android app.

@CsharpCorner: Controlling LED In Keypad #App Using #AndroidApp via @CsharpCorner #IoT #Android

Controlling LED In Keypad App By Android App

 

 

 

 

 

C# Corner

In Focus LEARN: Introduction to Entity Framework

C# Corner

Contribute An Article

A Blog

A News

A Video

A Link

An Interview Question

Ask a Question

 

TECHNOLOGIES .NET CIO How do I OOP/OOD Swift

.NET Core Cloud HTML 5 Open Source TypeScript

AJAX Coding Best Practices Internet & Web Operating Systems Unity

Algorithms in C# Cognitive Services Internet of Things Philosophy Universal Windows Platform

Android Cryptography Ionic PHP Visual Studio

Angular 2 Current Affairs iOS Power BI VR and AR

AngularJS Custom Controls Java Products WCF

Architecture Databases & DBA JavaScript Project Management Web Development

ASP.NET Design Patterns & Practices JQuery Python Web Services

ASP.NET Core DevOps Knockout React Windows 10

Azure Dynamics CRM LINQ Security Windows Forms

Big Data Entity Framework Machine Learning Servers Windows Services

Bootstrap Games Programming Microsoft Office SharePoint Workflow Foundation

Bot Framework Google Development Microsoft Phone Software Testing WPF

C# Graphics Design Mobile Development SQL Language Xamarin

C, C++, MFC Hardware Node.js SQL Server XML

Career Advice

Request a new Category | View All

ANSWERS

BLOGS

VIDEOS

INTERVIEWS

BOOKS

NEWS

EVENTS CHAPTERS

ANNUAL CONFERENCE

CAREER

JOBS

Consultants

MORE IDEAS

DOWNLOADS

LINKS

REVIEWS

STUDENTS

MEMBERS

STORIES

Certifications

Controlling LED In Keypad App By Android App

Sr Karthiga

Oct 06 2016

Article

0

0

2.5k

facebook

twitter

linkedIn

google Plus

Reddit

WhatsApp

Email

Bookmark

Print

Other Artcile

Expand

contolingled.zip

Introduction

In this article, I am going to explain about controlling the LED in Keypad app by an Android app. It will be run in  a real time process for the home application.

 

Software Requirement

Arduino Uno

Leds

Bread Board

Hook Up Wires 

Connection from Arduino Board to LEDs

 Leds  Arduino Board

 Led1  11

 Led1  12

 Led1  13

 Led1  14

 

Programming

#define CUSTOM_SETTINGS   

#define INCLUDE_KEYPAD_SHIELD   

/* Include 1Sheeld library. */   

#include    

int  A, B, C, D;  //vaiables with names of buttons in keypad   

/* A name for the LED on pin 8. */   

int  yellow = 8;  

/* A name for the LED on pin 9. */   

int  green = 9;  

/* A name for the LED on pin 10. */   

int  white = 10;  

/* A name for the LED on pin 11. */   

int  red = 11;  

  

void  setup()  

{  

  /* Start communication. */   

  OneSheeld.begin();  

  /* Set LEDs as output. */   

  pinMode(yellow, OUTPUT);  

  pinMode(red, OUTPUT);  

  pinMode(green, OUTPUT);  

  pinMode(white, OUTPUT);  

}  

  

void  loop()  

{  

  Keypad.setOnButtonChange(&lightLed);  

}  

void  lightLed (byte rowNumber , byte coloumnNumber)  

{  

    /* If keypad’s button A is pressed. */   

  if (Keypad.isRowPressed(0) && Keypad.isColumnPressed(3))  

  {  

    A = 1; // press A    

    B = 0;  

    C = 0;  

    D = 0;  

  }  

    

  else   if (Keypad.isRowPressed(1) && Keypad.isColumnPressed(3))  

  {  

    A = 0;  

    B = 1;// press B   

    C = 0;  

    D = 0;  

  }  

    

   else   if (Keypad.isRowPressed(2) && Keypad.isColumnPressed(3))  

  {  

    A = 0;  

    B = 0;  

    C = 1;  // press c   

    D = 0;  

  }  

  

   else   if (Keypad.isRowPressed(3) && Keypad.isColumnPressed(3))  

  {  

    A = 0;  

    B = 0;  

    C = 0;  

    D = 1; // press D   

  }  

  else   

  {  

    /* Turn off all of LEDs. */   

    digitalWrite(yellow,LOW);  

    digitalWrite(green,LOW);  

    digitalWrite(white,LOW);  

    digitalWrite(red,LOW);  

  }  

  if (A)  //press button A   

    digitalWrite(yellow, HIGH);  

  if (B)  //press button B   

    digitalWrite(green, HIGH);  

  if (C)  //press button C   

    digitalWrite(white, HIGH);  

  if (D)  //press button D   

    digitalWrite(red, HIGH);  

}  

Explanation

According to the connection, upload program to the board and download the keypad app in the Playstore, install, and see the result. In the LEDs, when you press the 1 key, it is switched ON. Similarly, the other LEDs also get turned ON and OFF by the keypad app, without bluetooth.

 

Output

Controlling LED

Android App

Keypad App

TRENDING UP

01

Introduction To Entity Framework

02

Introduction To Bootstrap Tables

03

Creating .NET Core Console Application With NoSQL- MongoDB At Back-end

04

Overview Of Delegate Concept In C#

05

Exception Handling Mechanism In .NET

06

Calculating Distance Using Google Maps In ASP.NET MVC

07

Calling A C# Function With jQuery AJAX In ASP.NET MVC

08

Creating ASP.NET Core, Angular2 Shopping Cart Using Web API And EF 1.0.1

09

Getting Started With SQL Server 2016

10

HTTP Get, Put, Post And Delete Verbs In ASP.NET WEB API

View All

Follow @twitterapi

Guess! What is coming here?

We will unveil at C# Corner Annual Conference 2017

About Us

Contact Us

Privacy Policy

Terms

Media Kit

Sitemap

Report a Bug

FAQ

©2017 C# Corner. All contents are copyright of their authors

Controlling LED In Keypad App By Android App

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.