Things used in this project

Hardware components:
11113 01
SparkFun Arduino Pro Mini 328 - 5V/16MHz
MP3 / WAV trigger
Old telephone
12002 04
Breadboard (generic)
11026 02
Jumper wires (generic)
SparkFun Hook up wire
microSD card
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)
SparkFun Heat gun


Bftp bqpmfdpl5t


Phone Keypad SketchArduino
This example code was modified to work with a telephone keypad and MP3 trigger.
#include <Password.h> //
#include <Keypad.h> //

Password password = Password( "7365" );

const byte ROWS = 4; // Four rows
const byte COLS = 3; //  columns
// Define the Keymap
char keys[ROWS][COLS] = {
  {'7','8','A'}, //"A" is a placeholder; no such button exists on my keypad
  {'B','2','3'}, //"B" is a placeholder; no such button exists on my keyopad
  {'*','C','D'} //"C" and "D" are placeholders; no such buttons exist on my keypad

byte rowPins[ROWS] = { 7,5,3,8 };//Connect keypad rows to these Arduino pins.
byte colPins[COLS] = { 6,4,2 };// Connect keypad columns to these Arduino pins.

const int dial = 13; //Digital Arduino pin going to MP3 triggerboard.
const int morse = 12; //Digital Arduino pin going to MP3 trigger board.

// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){
  pinMode(dial, OUTPUT);
  pinMode(morse, OUTPUT);
  digitalWrite(dial, HIGH); //MP3 board triggers active low, so begin with HIGH.
  digitalWrite(morse, HIGH); //MP3 board triggers active low, so begin with HIGH.
  keypad.addEventListener(keypadEvent); //add an event listener for this keypad

void loop(){

//take care of some special events
void keypadEvent(KeypadEvent eKey){
  switch (keypad.getState()){
    case PRESSED:
	Serial.print("Pressed: "); //For monitoring
	Serial.println(eKey); //For monitoring
  digitalWrite(dial, LOW); //Play the dial beep audio file; this occurs for each key press
  digitalWrite(dial, HIGH);
	switch (eKey){
	  case '*': checkPassword(); break; // * is the enter key
	  default: password.append(eKey);

void checkPassword(){
  if (password.evaluate()){
    Serial.println("Success");  //Monitoring
    password.reset(); //Clear the key entries
    digitalWrite(morse, LOW); //Play the clue audio file
    digitalWrite(morse, HIGH);
    Serial.println("Wrong"); //Monitoring
    password.reset(); //Clear the key entries for the next passcode attempt


B57dc145 205f 4523 9c98 4f052a708665 v9luk4kums
Sam Horne
0 projects • 0 followers


Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback


Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog