/*
Simple "Hello World" for ILI9341 LCD
https://wokwi.com/arduino/projects/308024602434470466
*/
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include <Keypad.h>
#define TFT_DC A3
#define TFT_CS A5
#define Password_Length 5
char Data[Password_Length]; // 6 is the number of chars it can hold + the null char = 7
char Master[Password_Length] = "9635";
byte data_count = 0, master_count = 0;
bool Pass_is_good;
char customKey;
char customKey1;
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'},
{'*', '0', '#'}
};
byte rowPins[ROWS] = {41, 43, 45, 47}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {49, 39, 37}; //connect to the column pinouts of the keypad
bool choice = true;
char LANE;
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
tft.begin();
tft.setRotation(1); // Set the display orientation to landscape
tft.fillScreen(ILI9341_LIGHTGREY); // Set the background color to red
tft.setCursor(80, 80); // Set the cursor position
tft.setTextColor(ILI9341_BLACK); // Set the text color to white
tft.setTextSize(3); // Set the text size to 4
tft.print("ARRIVED");
tft.setCursor(77, 120);
tft.setTextColor(ILI9341_BLACK); // Set the text color to white
tft.setTextSize(3); // Set the text size to 4
tft.print("AT BASE"); // Print // Print the text
}
void loop() {
}