LED Keypad Shield

Hello,
I was using the LED keypad Shield with some students and i was interested to use these shields with other boards than the
Arduino UNO.
So i make some modification in the source code of the library.
In the header file LedKeypad.h, you can change these lines :
***********
private:
#define SCL_pin 19
#define SDA_pin 18
**********
by these one
*****************
private:
#if defined(ARDUINO_AVR_MEGA)
#define SCL_pin 21
#define SDA_pin 20
#elif defined(ARDUINO_AVR_MEGA2560)
#define SCL_pin 21
#define SDA_pin 20
#elif defined(ARDUINO_AVR_UNO)
#define SCL_pin 19
#define SDA_pin 18
#elif defined(ARDUINO_AVR_ETHERNET)
#define SCL_pin 19
#define SDA_pin 18
#elif defined(ARDUINO_AVR_LEONARDO)
#define SCL_pin 3
#define SDA_pin 2
#endif
**************************************
Then the shield works perfect on UNO, MEGA2560, Leonardo Board ...
I just take into account these boards. I have some samples of these models.
If this can help somebody ...
Have fun
Manuel
I was using the LED keypad Shield with some students and i was interested to use these shields with other boards than the
Arduino UNO.
So i make some modification in the source code of the library.
In the header file LedKeypad.h, you can change these lines :
***********
private:
#define SCL_pin 19
#define SDA_pin 18
**********
by these one
*****************
private:
#if defined(ARDUINO_AVR_MEGA)
#define SCL_pin 21
#define SDA_pin 20
#elif defined(ARDUINO_AVR_MEGA2560)
#define SCL_pin 21
#define SDA_pin 20
#elif defined(ARDUINO_AVR_UNO)
#define SCL_pin 19
#define SDA_pin 18
#elif defined(ARDUINO_AVR_ETHERNET)
#define SCL_pin 19
#define SDA_pin 18
#elif defined(ARDUINO_AVR_LEONARDO)
#define SCL_pin 3
#define SDA_pin 2
#endif
**************************************
Then the shield works perfect on UNO, MEGA2560, Leonardo Board ...
I just take into account these boards. I have some samples of these models.
If this can help somebody ...
Have fun
Manuel