Aargh, that is annoying. I'll provide instructions you can follow to fix the bug in the library:
- Open the file at the following path in any text editor:
/Users/jules/Documents/Arduino/libraries/ConfigurableFirmata/src/utility/Boards.h - Change the code at line 817 in the
Boards.hfile from this:
to this;#define IS_PIN_PWM(p) digitalPinHasPWM(p)#define ARDUINO_IS_PIN_PWM(x) (((x & PIN_USE_MASK) == PIN_PWM_GPT) || ((x & PIN_USE_MASK) == PIN_PWM_AGT)) #define ARDUINO_digitalPinHasPWM(p) (ARDUINO_IS_PIN_PWM(getPinCfgs(p, PIN_CFG_REQ_PWM)[0])) #define IS_PIN_PWM(p) ARDUINO_digitalPinHasPWM(p) - Save the file.
Now try compiling the sketch again. Hopefully this time it will work.
Explanation
In case you are interested in the boring details of why this was necessary, I'll provide an explanation below. If you aren't interested in such things then you can skip reading the rest of the post.
The problem is that there is a macro named IS_PIN_PWM in the UNO R4 WiFi board's Arduino core library:
but the ConfigurableFirmata library also uses a macro of the same name:
The person who added support for the UNO R4 WiFi board attempted to work around that macro name collision by undefining the core's macro before defining the library's macro:
However, that doesn't work because the digitalPinHasPWM macro uses the IS_PIN_PWM macro:
I worked around this by duplicating all the code from the core for the digitalPinHasPWM macro definition, including the code for the core's IS_PIN_PWM macro.