Salve gente,
sfortunatamente ho perso tutte le mie librerie, con non poca difficoltà, perche non ricordavo dove le avevo scaricate, sono riuscito a trovarle, ma una di queste Keypad_i2c mi da il seguente errore:
Keypad/Keypad_I2C.cpp.o: In function `Keypad_I2C::begin(char*)':
/usr/share/arduino/libraries/Keypad/Keypad_I2C.cpp:35: multiple definition of `Keypad_I2C::pin_read(unsigned char)'
Keypad_I2C/Keypad_I2C.cpp.o:/usr/share/arduino/libraries/Keypad_I2C/Keypad_I2C.cpp:35: first defined here
/usr/lib/gcc/avr/4.7.2/../../../avr/bin/ld: Disabling relaxation: it will not work with multiple definitions
Keypad/Keypad_I2C.cpp.o: In function `Keypad_I2C::begin(char*)':
/usr/share/arduino/libraries/Keypad/Keypad_I2C.cpp:35: multiple definition of `Keypad_I2C::pin_write(unsigned char, unsigned char)'
Keypad_I2C/Keypad_I2C.cpp.o:/usr/share/arduino/libraries/Keypad_I2C/Keypad_I2C.cpp:35: first defined here
Keypad/Keypad_I2C.cpp.o: In function `Keypad_I2C::begin(char*)':
/usr/share/arduino/libraries/Keypad/Keypad_I2C.cpp:35: multiple definition of `Keypad_I2C::pinState_set()'
Keypad_I2C/Keypad_I2C.cpp.o:/usr/share/arduino/libraries/Keypad_I2C/Keypad_I2C.cpp:35: first defined here
Keypad/Keypad_I2C.cpp.o: In function `Keypad_I2C::begin(char*)':
/usr/share/arduino/libraries/Keypad/Keypad_I2C.cpp:35: multiple definition of `Keypad_I2C::begin(int)'
Keypad_I2C/Keypad_I2C.cpp.o:/usr/share/arduino/libraries/Keypad_I2C/Keypad_I2C.cpp:35: first defined here
Keypad/Keypad_I2C.cpp.o: In function `Keypad_I2C::begin(char*)':
/usr/share/arduino/libraries/Keypad/Keypad_I2C.cpp:35: multiple definition of `Keypad_I2C::begin(unsigned char)'
Keypad_I2C/Keypad_I2C.cpp.o:/usr/share/arduino/libraries/Keypad_I2C/Keypad_I2C.cpp:35: first defined here
Keypad/Keypad_I2C.cpp.o: In function `Keypad_I2C::begin(char*)':
/usr/share/arduino/libraries/Keypad/Keypad_I2C.cpp:35: multiple definition of `Keypad_I2C::begin()'
Keypad_I2C/Keypad_I2C.cpp.o:/usr/share/arduino/libraries/Keypad_I2C/Keypad_I2C.cpp:35: first defined here
Keypad/Keypad_I2C.cpp.o: In function `Keypad_I2C::begin(char*)':
/usr/share/arduino/libraries/Keypad/Keypad_I2C.cpp:35: multiple definition of `Keypad_I2C::begin(char*)'
Keypad_I2C/Keypad_I2C.cpp.o:/usr/share/arduino/libraries/Keypad_I2C/Keypad_I2C.cpp:35: first defined here
collect2: error: ld returned 1 exit status
lo sketch:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Keypad_I2C.h>
#include <Keypad.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x20,16,2);
#define I2CADDR 0x24
const byte ROWS = 4;
const byte COLS = 4;
char hexaKeys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {7, 6, 5, 4};
byte colPins[COLS] = {3, 2, 1, 0};
Keypad_I2C customKeypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS, I2CADDR);
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight();
customKeypad.begin( );
Serial.begin(9600);
}
void loop()
{
char customKey = customKeypad.getKey();
if (customKey != NO_KEY){
lcd.print(customKey);
}
}
prima mi funzionava ed ora no.....evidentemente non è la stessa che avevo prima, cosa posso fare ?
GRAZIE!!!!!!!!!!!!