Skip to content

not running, but successfully compiles on Arduino Nano Every (ATMega4809) #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bethanysciences opened this issue Aug 26, 2023 · 3 comments · Fixed by #19
Closed

not running, but successfully compiles on Arduino Nano Every (ATMega4809) #18

bethanysciences opened this issue Aug 26, 2023 · 3 comments · Fixed by #19

Comments

@bethanysciences
Copy link

Subject of the issue

not running, but successfully compiles on Arduino Nano Every (ATMega4809).

Workbench

MCU: Arduino Nano Every (ATMega4809)
Compiling on Arduino version: 2.1.1 2023-07-03T07:51:40.946Z CLI Version: 0.32.3
Board version Arduino MegaAVR Boards version 1.8.8
tested 4 different displays w/ same result connected with stemma connectors.

Steps to reproduce

Compiles and loads successfully but does have this message:

In file included from ...Arduino/libraries/Alphanumeric_Display/src/SparkFun_Alphanumeric_Display.h:28:0,
                 from ...Arduino/libraries/Alphanumeric_Display/src/SparkFun_Alphanumeric_Display.cpp:32:
             ...Library/Arduino15/packages/arduino/hardware/megaavr/1.8.8/libraries/Wire/src/Wire.h: In member function 'bool HT16K33::readRAM(uint8_t, uint8_t, uint8_t*, uint8_t)':
...Library/Arduino15/packages/arduino/hardware/megaavr/1.8.8/libraries/Wire/src/Wire.h:63:12: note: candidate 1: size_t TwoWire::requestFrom(int, int)
     size_t requestFrom(int, int);
            ^~~~~~~~~~~
...Library/Arduino15/packages/arduino/hardware/megaavr/1.8.8/libraries/Wire/src/Wire.h:61:12: note: candidate 2: virtual size_t TwoWire::requestFrom(uint8_t, size_t)
     size_t requestFrom(uint8_t, size_t);

All segments light regardless of fed signals

Solution

I got the correct displays by repeating (exactly), in setup(), the needed characters from the character map in SparkFun_Alphanumeric_Display.h (starting line 45) - a few examples.

display.defineChar('<', 0b00110000000000); // '<'
display.defineChar('-', 0b00000101000000); // '-'
display.defineChar('.', 0b00000000000000); // '.'
display.defineChar('/', 0b10010000000000); // '/'

Looks like something relating to board defs or variable declarations are missing either in your code or Arduino's. Sorry, using these for a fast project and don't have time to run this to ground for you.

@sfe-SparkFro
Copy link
Contributor

Thanks for the bug report! I've tested this on my end and confirmed the behavior you're seeing. Looks like the root problem is here:

#if defined(ARDUINO_ARCH_AVR)
#include <avr/pgmspace.h>
static const uint16_t PROGMEM alphanumeric_segs[96]{
#else
static const uint16_t alphanumeric_segs[96]{
#endif

It appears ARDUINO_ARCH_AVR is not defined for the Nano Every, will just add another check for that.

sfe-SparkFro added a commit that referenced this issue Aug 28, 2023
@sfe-SparkFro
Copy link
Contributor

Should be fixed in v2.2.9! Thanks again for the report!

@bethanysciences
Copy link
Author

Love you guys, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants