sorry the whole code so far is:
#include <LiquidCrystal.h>
#include <Wire.h>
#include <Keypad.h>
const byte rows = 4;
const byte cols = 4;
char keys[rows][cols] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[rows] = {22, 23, 24, 25};
byte colPins[cols] = {26 ,27 ,28 ,29};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, rows, cols);
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8,9,4,5,6,7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("Welcome,");
delay(3000);
ClearScreen();
lcd.setCursor(0,0);
lcd.print("To my");
lcd.setCursor(0,1);
lcd.print("Project 2014");
delay(3000);
ClearScreen();
lcd.setCursor(0,0);
lcd.print("Let's begin");
lcd.setCursor(0,1);
delay(3000);
ClearScreen();
}
void loop()
{
TemperatureScreen();
}
void ClearScreen()
{
lcd.setCursor(0,0);
lcd.print(" ");
lcd.setCursor(0,1);
lcd.print(" ");
}
void TemperatureScreen()
{
char Temp1 = keypad.getKey();
lcd.setCursor(0,0);
lcd.print("Temperature?");
lcd.setCursor(2,1);
lcd.print((char)223);
lcd.setCursor(3,1);
lcd.print("C");
lcd.setCursor(0,1);
if (int(Temp1) != 0)
{
lcd.print(Temp1);
}
void VolumeScreen()
{
lcd.setCursor(0,0);
lcd.print("Volume?");
lcd.setCursor(2,1);
lcd.print("L");
}
void ConfirmationScreen()
{
}
and my setup so far is:
See now I want to be able to type to variables into (0,1) and (1,1), followed by pressing the A button to confirm or B to cancel, but to be able to use these variables later on in the code is this possible?