MKR IOT Carrier + MKRWAN 1310

Hello - I connected my MKRWAN1310 board to MKRIOT Carrier V.2.

Installed the MKRIOT library and this simple example cold from Arduino. When I tried to compile, I get this error

Arduino_MKRIoTCarrier\src\Arduino_MKRIoTCarrier.cpp: In member function 'int MKRIoTCarrier::begin()':

Arduino_MKRIoTCarrier.cpp:34:11: error: 'AREF_PIN' was not declared in this scope
pinMode(AREF_PIN,INPUT_PULLUP);

Arduino_MKRIoTCarrier.cpp:34:11: note: suggested alternative: 'SCK_PIN'
pinMode(AREF_PIN,INPUT_PULLUP);

exit status 1.
what does this mean?

Same problem here: Arduino MKR 1310 + Arduino MKR IoT Carrier Rev. 2
Trying to compile an example…
On the other hand with an Arduino MKR 1010 it compiles!

hello gdillen - Missing AREF_PIN MKR boards definition · Issue #68 · arduino-libraries/Arduino_MKRIoTCarrier · GitHub

1 Like

I was given this as the solution, and it compiled.

  1. Open the folder from the path shown in the error message in your file manager (e.g., Windows File Explorer, macOS Finder).
  2. Open the MKRIoTCarrierDefines.h file you find there in any text editor.
  3. Change line 93 in the file from this:
#ifdef ARDUINO_SAMD_MKRWIFI1010

to this:

#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_MKRWAN1310)
  1. Save the file.
2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.