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.