Go Down

Topic: I2C Port expander and keypads for Arduino (Read 1 time) previous topic - next topic



I used the tutorial http://playground.arduino.cc/Main/I2CPortExpanderAndKeypads to connect a keypad with an I2C expander, and the program works on IDE 023, but gives me errors and cannot compile on IDE 105. I am a beginner in programing and don't know how to detect and change the incompatibilities.

I changed send and receive with read and write and WConstants.h with Arduino.h but then I get errors like this:

In file included from C:\...\arduino-1.0.5\hardware\arduino\cores\arduino/HardwareSerial.h:100,
                 from C:\...\arduino-1.0.5\hardware\arduino\cores\arduino/Arduino.h:193,
                 from i2ckeypad.cpp:50:
C:\...\arduino-1.0.5\hardware\arduino\cores\arduino/USBAPI.h:191: error: declaration of C function 'int USB_Recv(uint8_t)' conflicts with
C:\...\arduino-1.0.5\hardware\arduino\cores\arduino/USBAPI.h:190: error: previous declaration 'int USB_Recv(uint8_t, void*, int)' here
In file included from i2ckeypad.cpp:50:
C:\...\arduino-1.0.5\hardware\arduino\cores\arduino/Arduino.h:196: error: declaration of C function 'uint16_t makeWord(byte, byte)' conflicts with
C:\...\arduino-1.0.5\hardware\arduino\cores\arduino/Arduino.h:195: error: previous declaration 'uint16_t makeWord(uint16_t)' here
C:\...\arduino-1.0.5\hardware\arduino\cores\arduino/Arduino.h:206: error: declaration of C function 'long int random(long int)' conflicts with
c:/.../arduino-1.0.5/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:504: error: previous declaration 'long int random()' here
C:\...\arduino-1.0.5\hardware\arduino\cores\arduino/Arduino.h:207: error: declaration of C function 'long int random(long int, long int)' conflicts with
C:\...\arduino-1.0.5\hardware\arduino\cores\arduino/Arduino.h:206: error: previous declaration 'long int random(long int)' here

Can anyone help me with this? Thank you.


You could just use the keypad_I2c library. It's included with the normal keypad library.



@tack thank you for your answer. I sow that tutorial. It says there "You can find more information inside the docs folder under the Keypad_I2C library folder." But there is no docs folder in the downloaded zip and no information on how to use that library. So I really don't know how to use it.

Anyone knows where I can find those docs?


A quick Google turned up the following, which should help you:-



Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131