Keypad Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld
Keypad Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld

Use your smartphone touch screen as a keypad. Want to open your room with a pin code? With just few code lines you have the advantage of using a 4×4 keypad so you can enter a password to trigger Arduino and open your door using a motor.

This shield is one of the I/O shields.I/O shields provides simple function of using your smartphone as input or output to Arduino.Learn more from the I/O shields tutorial

.

 

Keypad Library converts your smartphone to a an Numerical 4*4 pad so that you can send numbers and special numerical characters one by one to Arduino and take actions.

Adding #define CUSTOM_SETTINGS along with #define INCLUDE_KEYPAD_SHIELD is a key that will let you unlock the KeyPad shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.

 

bool isRowPressed(byte)

Checks if a given row is pressed.

SYNTAX
Keypad.isRowPressed(rowNumber);

RETURNS
Returns a yes “1” or no “0”.

PARAMETERS
Takes a byte holding the number of row.

USAGE
if(Keypad.isRowPressed(0))
{
   /* Turn on a LED if a certain button in row 1 is pressed. */
   digitalWrite(pin13,HIGH);
}

 

bool isColumnPressed(byte)

Checks if a given column is pressed.

SYNTAX
Keypad.isColumnPressed(rowNumber);

RETURNS
Returns a yes “1” or no “0”.

PARAMETERS
Takes a byte holding the number of column.

USAGE
if(Keypad.isColumnPressed(0))
{
   /* Turn on a LED if a certain button in row 1 is pressed. */
   digitalWrite(pin13,HIGH);
}

 

bool isAnyRowPressed(void)

Checks if a any row is pressed.

SYNTAX
Keypad.isAnyRowPressed();

RETURNS
Returns a yes “1” or no “0”.

PARAMETERS
None.

USAGE
if(Keypad.isAnyRowPressed())
{
   /* Turn on a LED if a certain button in column 1 is pressed. */
   digitalWrite(pin13,HIGH);
}

 

bool isAnyColumnPressed(void)

Checks if a any column is pressed.

SYNTAX
Keypad.isAnyColumnPressed();

RETURNS
Returns a yes “1” or no “0”.

PARAMETERS
None.

USAGE
if(Keypad.isAnyColumnPressed())
{
   /* Turn on a LED if a certain button in column 1 is pressed. */
   digitalWrite(pin13,HIGH);
}

 

bool setOnButtonChange(void(*userFunction)(byte,byte))

Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a new button is pressed on the application’s keypad.

SYNTAX
Keypad.setOnButtonChange(&userFunctionName);

RETURNS
None.

PARAMETERS
&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

USAGE
Keypad.setOnButtonChange(&myFunction);
/* myFunction exists under the loop function. */
/* This function will be invoked each time a new Keypad button is pressed. */
void myFunction (byte rowNumber , byte coloumnNumber)
{
    /*Turn On the LED if ‘1’ is pressed else turn Off. */
    if(Keypad.isRowPressed(1) && Keypad.isColoumnPressed(1) )
    {
        digitalWrite(pin13,HIGH);
    }
}