Skip to content

Arduino Nano R4 support #114

@HubertJH

Description

@HubertJH

Unfortunately, the library (1.4.4) installed from within the Arduino IDE does not support the Nano R4 (and most likely also the other R4 boards) as the interrupt pins are not defined for those boards. Compiling example Basic.ino fails.

Replacing ...libraries/Encoder/utilities with the folder posted here on GitHub fixes that issue as indeed the interrupt definitions were added.

However, compiling for the standard Nano (as well as Uno) now fails throwing a lengthy error message starting with

...Arduino/libraries/Encoder/Encoder.h:68:11: error: 'IO_REG_TYPE' does not name a type
volatile IO_REG_TYPE * pin1_register;
...
and further down pointing to errors in direct_pin_read.h

...utility/direct_pin_read.h:8:46: note: in definition of macro 'DIRECT_PIN_READ'
#define DIRECT_PIN_READ(base, mask) (((*(base)) & (mask)) ? 1 : 0)
...

Also replacing Encoder.h with the post on GitHub does not help (although the files are different) i.e. R4 compiles fine, standard fails.

While you can work around this issue it would be great if this could be fixed at some point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions