I'm making a 4digit password door locker

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 :)

Welcome to the forum

Your topic has been moved to the Programming category of the forum. Please take care when selecting which category to post in

As to your problem, I assume that you get an error when compiling. If so then please post the full error using code tags when you do

" ; " missing at line end.

correct = int count_value = 6;

oh i feel so dumb, i thought i checked everything.
thank you bro :+1:

1 Like

Have a look on very similar project: Strongbox rev_02 - Pastebin.com

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.