I will pay however much is needed for someone to write me a simple code for a GLCD interface with a numeric keypad attached. The program must be very simple and store some data in EEPROM or whatever you consider to be best. It must do: 1-Welcome Screen and wait for certain key input, 2- INPUT screen where the user will enter a 4-6 digit pin and record it into EEPROM, 3- Goodbye screen and then return to 1. I also need a way to read the pins when I press a certain button and cycle through all the entries. Please can anyone help? I can pay through PAYPAL or something, I just need it by this thursday 30.05.2013
This is what I did so far but no idea how to store a sequence of 4-6 numeric keys into EEPROM and read it back on the GLCD
#include <glcd.h>
#include <Keypad.h>
#include <fonts/allfonts.h>
#include <EEPROM.h>
int position = 0;
int led = 13;
const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'C','0','E'}
};
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
pinMode(led, OUTPUT);
GLCD.Init();
GLCD.SelectFont(Arial14);
welcomeScreen();
}
void loop(){
char key = keypad.getKey();
String enteredcode = "";
if (key != 0 && 'C')
{
GLCD.print(" * ");
enteredcode += (key);
}
if (key == 'C')
{
delay(10);
inputScreen(); }
if (key == 'E'){
delay(50);
GLCD.ClearScreen();
GLCD.CursorTo(3, 1);
GLCD.print("Va rugam");
GLCD.CursorTo(2, 2);
GLCD.print("ASTEPTATI");
GLCD.CursorTo(2, 3);
GLCD.print("#");
delay(500);
GLCD.CursorTo(3, 3);
GLCD.print("#");
delay(500);
GLCD.CursorTo(4, 3);
GLCD.print("#");
delay(500);
GLCD.CursorTo(5, 3);
GLCD.print("#");
delay(500);
GLCD.CursorTo(6, 3);
GLCD.print("#");
delay(500);
GLCD.CursorTo(7, 3);
GLCD.print("#");
delay(500);
GLCD.CursorTo(8, 3);
GLCD.print("#");
delay(500);
GLCD.ClearScreen();
GLCD.CursorTo(5, 1);
GLCD.print("PIN");
GLCD.CursorTo(4, 2);
GLCD.print("INVALID");
delay(2500);
welcomeScreen();}
}
void inputScreen(void)
{
GLCD.ClearScreen();
GLCD.CursorTo(3, 1);
GLCD.print("Va rugam");
GLCD.CursorTo(2, 2);
GLCD.print("Introduceti PIN");
GLCD.CursorTo(3, 3);
digitalWrite(led, HIGH);
}
void welcomeScreen()
{
GLCD.ClearScreen();
GLCD.CursorTo(0, 0);
GLCD.print("*********************");
GLCD.CursorTo(2, 1);
GLCD.print("Bine ati venit!");
GLCD.CursorTo(0, 3);
GLCD.print("*********************");
GLCD.CursorTo(3, 3);
digitalWrite(led, LOW);
}