Hi i'm making a 4 digit password using an active buzzer, a 44 keypad, and lcd162 and a solenoid lock.
I'm like at 60% of my code but i encountered an exit 1 status that i cant resolve(i checked if my arduino was connected)
pls help me.
// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
//-----------------------------clavier------------------------
int count_value = 6
#include <Keypad.h>
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{ '1', '2', '3', 'A' },
{ '4', '5', '6', 'B' },
{ '7', '8', '9', 'C' },
{ '*', '0', '#', 'D' }
};
byte rowPins[ROWS] = { 39, 41, 43, 45 }; //connect to the row pinouts of the keypad
byte colPins[COLS] = { 47, 49, 51, 53 }; //connect to the column pinouts of the keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad(makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
void setup() {
// active buzzer
pinMode(10, OUTPUT);
// pour le clavier
Serial.begin(9600);
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Inserer le code:");
// code checker
}
void loop() {
key_response();
}
void key_response(){
char customKey = customKeypad.getKey();
if (customKey) {
// sound signal
tone(10, 300, 150);
// visual signal
lcd.setCursor(count_value, 1);
count_value++;
Serial.println(customKey);
lcd.print(customKey);
}
}
void code_faux(){
delay(400);
// buzzer and LCD answer
tone(10, 90, 150);
lcd.setCursor(count_value, 1);
delay(300);
tone(10, 90, 150);
// LCD answer
lcd.print("FAUX");
lcd.setCursor(count_value, 1);
delay(750);
//clearing loop
int cleaning = 0;
while (cleaning <= 3) {
cleaning++;
lcd.print("*");
}
}
void code_juste(){
// buzzer and LCD answer
tone(10, 400, 150);
lcd.setCursor(count_value, 1);
delay(300);
tone(10, 750, 150);
// LCD answer
lcd.print("Vrai");
lcd.setCursor(count_value, 1);
delay(750);
//clearing loop
int cleaning = 0;
while (cleaning <= 3) {
cleaning++;
lcd.print("*");
}
}
// should be the end :)