too many initializers for 'char [3]'

What am I doing wrong?

auger_Control.ino (1 Bytes)

Your code is missing from the file.

You are obviously trying to initialize an array with too many elements...

If you are initializing using a string, you must ensure the array is long enough for the null character.

char arr[4] = "abc"; //4 characters including null.

Sorry about that here's my code

#include <Keypad.h>
#include <Servo.h>
#include <Password.h>
#include <Wire.h>
#include <FastIO.h>
#include <I2CIO.h>
#include <LCD.h>
#include <LiquidCrystal.h>
#include <LiquidCrystal_I2C.h>
#include <LiquidCrystal_SR.h>
#include <LiquidCrystal_SR2W.h>
#include <LiquidCrystal_SR3W.h>

Servo myservo;
int pos = 0;
LiquidCrystal lcd(2,3,4,9,10,11,12);
Password password = Password( "4321" );
const byte ROWS = 4; // Four rows
const byte COLS = 3; // Three columns
// Define the Keymap
char keys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};

I think I got it though, thanks for the help!!

#include <LiquidCrystal.h>
#include <LiquidCrystal_I2C.h>
#include <LiquidCrystal_SR.h>
#include <LiquidCrystal_SR2W.h>
#include <LiquidCrystal_SR3W.h>

Don't you know what kind of LCD you have?

Yup, its exactly what the error said:

const byte COLS = 3; // Three columns

{'1','2','3','A'} << 4 elements.

Thank you!

PaulS:

#include <LiquidCrystal.h>

#include <LiquidCrystal_I2C.h>
#include <LiquidCrystal_SR.h>
#include <LiquidCrystal_SR2W.h>
#include <LiquidCrystal_SR3W.h>



Don't you know what kind of LCD you have?

Hedging his bets. :wink: