Hello all,
I just started to explore the Artemis ATP board, and got stuck in a problem. I tried to dig the forum for a solution without success.
When I try to compile the “HelloKeypad” example from the arduino Keypad library (Alexander Brevig, version 3.1.1, https://playground.arduino.cc/Code/Keypad/) I got the following error:
In file included from /tmp/arduino_modified_sketch_605904/HelloKeypad.ino:10:
/home/ernesto/Arduino/libraries/Keypad/src/Keypad.h: In member function ‘virtual void Keypad::pin_mode(byte, byte)’:
/home/ernesto/Arduino/libraries/Keypad/src/Keypad.h:80:70: error: no matching function for call to ‘pinMode(byte&, byte&)’
virtual void pin_mode(byte pinNum, byte mode) { pinMode(pinNum, mode); }
^
In file included from /home/ernesto/.arduino15/packages/SparkFun/hardware/apollo3/1.0.17/cores/arduino/ard_sup/Arduino.h:77,
from /tmp/arduino_build_310926/sketch/HelloKeypad.ino.cpp:1:
/home/ernesto/.arduino15/packages/SparkFun/hardware/apollo3/1.0.17/cores/arduino/ard_sup/ap3_gpio.h:62:6: note: candidate: ‘void pinMode(uint8_t, am_hal_gpio_pincfg_t)’
void pinMode(uint8_t pin, am_hal_gpio_pincfg_t mode);
^~~~~~~
/home/ernesto/.arduino15/packages/SparkFun/hardware/apollo3/1.0.17/cores/arduino/ard_sup/ap3_gpio.h:62:6: note: no known conversion for argument 2 from ‘byte’ {aka ‘unsigned char’} to ‘am_hal_gpio_pincfg_t’
/home/ernesto/.arduino15/packages/SparkFun/hardware/apollo3/1.0.17/cores/arduino/ard_sup/ap3_gpio.h:63:6: note: candidate: ‘void pinMode(uint8_t, am_hal_gpio_pincfg_t, ap3_err_t*)’
void pinMode(uint8_t pin, am_hal_gpio_pincfg_t mode, ap3_err_t *retval);
…
exit status 1
Error compiling for board SparkFun RedBoard Artemis ATP.
The code compiles without problems in an Arduino Mega board. I tried assign different pins in the code without success. If I try to scan the keypad without using the arduino library (example: http://anilarduino.blogspot.com/2015/05 … duino.html) it works without problems. I suppose the way that the library assign the pin modes is not translating correctly from arduino to artemis, but looking at the library code I could not figure out why.
System details:
OS: ArchLinux
IDE: Arduino v. 1.8.10
Board Module: SparkfunApollo3 v 1.0.17
Appreciate any suggestions.
Ernesto