adafruit / Adafruit_Keypad

light keypad library for arduino
23 stars 10 forks source link

Dependency on Ringbuffer.h not satisfied by Arduino Core #3

Closed CristoXeuari closed 5 years ago

CristoXeuari commented 5 years ago

Hi, my assumption is that Ringbuffer.h is supposed to be part of the arduino core. Perhaps this is missing in later version of arduino ide (I'm using 2:1.0.5). I would very much like to use this library but I'm unsure which supporting code i'm missing as there are several ringbuffer implementations available. Thank you.

Code:

include

Compilation: /usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections /usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -MMD -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DPROG_TYPES_COMPAT -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/eightanaloginputs -I/home/pi/Arduino/libraries/Adafruit_Keypad -I/home/pi/Arduino/libraries/Adafruit_Keypad /tmp/build7967350557655550057.tmp/sketch_may07a.cpp -o /tmp/build7967350557655550057.tmp/sketch_may07a.cpp.o -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DPROG_TYPES_COMPAT -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/eightanaloginputs -I/home/pi/Arduino/libraries/Adafruit_Keypad -I/home/pi/Arduino/libraries/Adafruit_Keypad /tmp/build7967350557655550057.tmp/sketch_may07a.cpp -o /tmp/build7967350557655550057.tmp/sketch_may07a.cpp.o In file included from sketch_may07a.ino:1:0: In file included from sketch_may07a.ino:1:0: /home/pi/Arduino/libraries/Adafruit_Keypad/Adafruit_Keypad.h:5:24: fatal error: RingBuffer.h: No such file or directory compilation terminated. /home/pi/Arduino/libraries/Adafruit_Keypad/Adafruit_Keypad.h:5:24: fatal error: RingBuffer.h: No such file or directory compilation terminated.

ladyada commented 5 years ago

use latest ide, reopen if still issue

CristoXeuari commented 5 years ago

I have the same problem using ide 1.8.9 which I believe is the latest version.

TheKitty commented 5 years ago

If you google ringbuffer.h arduino there are results that may help. It is not code that is provided by Adafruit but part of the IDE. The Arduino forums would be another source of information.

caternuson commented 5 years ago

-mmcu=atmega328p

What board are you using? It looks like RingBuffer is not implemented on all targets.

[EDIT] Seems related: https://github.com/adafruit/Adafruit_Keypad/issues/2 Note comment there about library being specialized for M4 architecture: https://github.com/adafruit/Adafruit_Keypad/issues/2#issuecomment-439719694

ladyada commented 5 years ago

carter, dya want to try and generalize this? originally we wrote it for neotrellis but its useful besides

On Wed, May 8, 2019 at 1:29 PM CristoXeuari notifications@github.com wrote:

I have the same problem using ide 1.8.9 which I believe is the latest version.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit_Keypad/issues/3#issuecomment-490577418, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJINUIYP5PLUV5OJW3LETTPUMEXJANCNFSM4HLLGWWA .

caternuson commented 5 years ago

@ladyada can take a look

@CristoXeuari still curious about your hardware setup

What's the non-NeoTrellis M4 use case for this? I'm probably just forgetting or overlooking something.

ladyada commented 5 years ago

carter, you could include the ringbuffer file as a utiliy (under a new name)

CristoXeuari commented 5 years ago

The board is a Nano made by Elegoo with an Atmega328p and CH340. The keypad is made by Sodial, 3x4, uses 7 pins and, I think, membrane switches.

Thank you. Issue #2 is relevant. I wasn't aware this library was not for generalised usage.

caternuson commented 5 years ago

Please try the 1.0.3 version of the library when it becomes available.

caternuson commented 5 years ago

Closing for now. Hopefully fixed by #4. Can reopen if needed.