Issue with Thinger.io

Hello everybody,

I have a new Arduino MKR 1010 and wanted to connect it to the platform Thinger.io

Therefore, I used the following code example in the Arduino Web Editor

#include <ThingerWiFiNINA.h>

#define USERNAME "your_user_name"
#define DEVICE_ID "your_device_id"
#define DEVICE_CREDENTIAL "your_device_credential"

#define SSID "your_wifi_ssid"
#define SSID_PASSWORD "your_wifi_ssid_password"

ThingerWiFiNINA thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

void setup() {
// configure wifi network
thing.add_wifi(SSID, SSID_PASSWORD);

pinMode(LED_BUILTIN, OUTPUT);

// pin control example (i.e. turning on/off a light, a relay, etc)
thing["led"] << digitalPin(LED_BUILTIN);

// resource output example (i.e. reading a sensor value, a variable, etc)
thing["millis"] >> outputValue(millis());

// more details at http://docs.thinger.io/arduino/
}

void loop() {
thing.handle();
}

However, I am getting the following error message without changing anything in the code:

macro "min" passed 3 arguments, but takes just 2

Using library wifinina_1_4_0 at version 1.4.0 in folder: /home/builder/opt/libraries/latest/wifinina_1_4_0

Using library SPI at version 1.0 in folder: /home/builder/.arduino15/packages/arduino/hardware/samd/1.8.1/libraries/SPI

In file included from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/char_traits.h:39:0,

from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/string:40,

from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/stdexcept:39,

from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/array:39,

from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/tuple:39,

from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/functional:54,

from /home/builder/opt/libraries/latest/thinger_io_2_13_0/src/thinger/thinger_resource.hpp:33,

from /home/builder/opt/libraries/latest/thinger_io_2_13_0/src/thinger/thinger.h:29,

from /home/builder/opt/libraries/latest/thinger_io_2_13_0/src/ThingerClient.h:28,

from /home/builder/opt/libraries/latest/thinger_io_2_13_0/src/ThingerWifi.h:27,

from /home/builder/opt/libraries/latest/thinger_io_2_13_0/src/ThingerWiFiNINA.h:28,

from /tmp/474111246/ArduinoMKR1010/ArduinoMKR1010.ino:1:

/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2

min(const _Tp& __a, const _Tp& __b, _Compare __comp)

^

/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2

max(const _Tp& __a, const _Tp& __b, _Compare __comp)

^

exit status 1

Does anybody have an idea what that is about?

Thanks in advance!

Kev

Hi
Try to use version 2.9.2 of thinger.io library

Hi,

Is there a fix for this issue? I installed 2.9.2, but it does not have the required ThingerWiFiNINA.h.

It appears only 2.13.0 has the correct .h file, but the sample code gives the error as shown above by OP.

Regards,

Geo

Hi

It might not be the most right solution, but in my project, version 2.9.2 works fine with MKR1010 board and ThingerWifi101.h instead of ThingerWiFiNINA.h library.

Hey all.

It's been a few months now. Does anyone have any solutions to this? Aside from going back to 2.9.2 and ThingerWifi101.h

Hi

I am using Platformio, but the following helped me at the beginning of the sketch.

#include "Arduino.h"

#undef min
#undef max


void setup();
void loop();

Thinger Library 2.13.0

Source:Cause: error: macro "min" passed 3 arguments, but takes just 2 · Issue #3 · kekyo/gcc-toolchain · GitHub