MKR1000 Wifi Thinger.IO

I try to use MKR1000 to connect to thinger.io. Using example from arduino MKR1000

#include <ThingerWifi101.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"

ThingerWifi101 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();
}

of course I do change the username, deviceid, credential and password.
but I got the following error…


Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino MKR1000"

Build options changed, rebuilding all
In file included from c:\users\asystect\appdata\local\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 c:\users\asystect\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\string:40,

                 from c:\users\asystect\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\stdexcept:39,

                 from c:\users\asystect\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\array:39,

                 from c:\users\asystect\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\tuple:39,

                 from c:\users\asystect\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\functional:54,

                 from C:\Users\Asystect\Documents\Arduino\libraries\thinger.io\src/thinger/thinger_resource.hpp:33,

                 from C:\Users\Asystect\Documents\Arduino\libraries\thinger.io\src/thinger/thinger.h:29,

                 from C:\Users\Asystect\Documents\Arduino\libraries\thinger.io\src/ThingerClient.h:28,

                 from C:\Users\Asystect\Documents\Arduino\libraries\thinger.io\src/ThingerWifi.h:27,

                 from C:\Users\Asystect\Documents\Arduino\libraries\thinger.io\src/ThingerWifi101.h:28,

                 from C:\Users\Asystect\Documents\Arduino\libraries\thinger.io\examples\Arduino\ArduinoMKR1000\ArduinoMKR1000.ino:1:

c:\users\asystect\appdata\local\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)

                                                        ^

c:\users\asystect\appdata\local\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
Error compiling for board Arduino/Genuino MKR1000.

What did I do wrong?
Thank you in advance.

Hello @twentybb,

It appears to be any problem with your behavior, because I have just updated all libraries and I have successfully compiled this example for the MRK1000 board. Try cleaning your folders and your Arduino IDE installation, with an executable version maybe, and download only the libraries you need in a different workspace.

is a bit cumbersome but in these cases, it’s the better way to proceed. You can also try on a different computer

hope it helps

Dear Jtrinc26. Thank you for your reply. I appreciate your help sir.
I do try to uninstall, delete all folder and reinstall arduino IDE, but it doesnt solve. I try to use older version (2 step older) of library, now it works. But I know its not a good solution. It can works is enough for me. Thanks to you

Great news @twentybb! you can try also going to Thinger.io Platform GitHub repository and downloading “Arduino-Library-master” which is the most up-to-date beta version, that includes a lot of fixes, maybe it works too