Hi,
I am trying on the one wire keypad program.I did exactly told in the arduino forum. I am getting an error, I do not know where I am going wrong.Can anyone please point out my mistake?
#include <OnewireKeypad.h>
#define Rows 4
#define Cols 3
#define Pin A0
#define Row_Res 1000
#define Col_Res 220
// ExtremePrec, HighPrec, MediumPrec, LowPrec
#define Precision ExtremePrec
char KEYS[]= {
'1','2','3',
'4','5','6',
'7','8','9',
'*','0','#'
};
OnewireKeypad <Print, 12> Keypad(Serial, KEYS, Rows, Cols, Pin, Row_Res, Col_Res, Precision );
void setup ()
{
Serial.begin(115200);
pinMode(13,OUTPUT);
Keypad.addEventKey(test, '9'); // Add Function to list | Key to look for
Keypad.addEventKey(togglePin13, '7');
}
void loop()
{
Keypad.ListenforEventKey(); // check if an EventKey is found
}
void test()
{
Serial.println("This is a test");
Keypad.deleteEventKey('#'); // remove function from list
}
void togglePin13()
{
digitalWrite(13,!digitalRead(13));
}
error: C:\Users\Lalith\Documents\Arduino\libraries\OnewireKeypad-master/OnewireKeypad.h:64:261: error: expected '{' before 'Precision'
: port_( port ), latchedKey( BitBool< MAX_KEYS >() ), _Data( KP ), _Rows( Rows ), _Cols( Cols ), _Pin( Pin ), holdTime( 500 ), startTime( 0 ), lastState( 0 ), lastRead( 0 ), voltage( 5.0 ), ANALOG_FACTOR(1023/5.0), Num( 0 ), R1( R1 ), R2( R2 ), R3( R3 ) Precision( Precision ) { }
^
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.