0

Example temp/Humidity script
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Example temp/Humidity script

by chorlton2080 on Sun Dec 30, 2018 12:12 pm

Hello

I'm using the example Adafruit IO code in the Arduino library and am having problems reflashing the Arduino code to my Huzzah after changing the WiFi password. It has previously worked. The error from the Arduino IDE is as follows:

Code: Select all | TOGGLE FULL SIZE
Arduino: 1.8.1 (Windows 10), Board: "Adafruit Feather HUZZAH ESP8266, 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp: In member function 'virtual bool Adafruit_MQTT_Client::sendPacket(uint8_t*, uint16_t)':

C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:84:38: error: no matching function for call to 'min(uint16_t&, int)'

       uint16_t sendlen = min(len, 250);

                                      ^

C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:84:38: note: candidates are:

In file included from c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:62:0,

                 from C:\Users\Stuart\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Arduino.h:254,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.h:25,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.h:26,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:22:

c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4226:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)

     min(initializer_list<_Tp> __l, _Compare __comp)

     ^

c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4226:5: note:   template argument deduction/substitution failed:

C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:84:38: note:   mismatched types 'std::initializer_list<_Tp>' and 'short unsigned int'

       uint16_t sendlen = min(len, 250);

                                      ^

In file included from c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:62:0,

                 from C:\Users\Stuart\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Arduino.h:254,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.h:25,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.h:26,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:22:

c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4221:5: note: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)

     min(initializer_list<_Tp> __l)

     ^

c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4221:5: note:   template argument deduction/substitution failed:

C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:84:38: note:   mismatched types 'std::initializer_list<_Tp>' and 'short unsigned int'

       uint16_t sendlen = min(len, 250);

                                      ^

In file included from c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:61:0,

                 from C:\Users\Stuart\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Arduino.h:254,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.h:25,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.h:26,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:22:

c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)

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

     ^

c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:239:5: note:   template argument deduction/substitution failed:

C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:84:38: note:   deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int')

       uint16_t sendlen = min(len, 250);

                                      ^

In file included from c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:61:0,

                 from C:\Users\Stuart\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Arduino.h:254,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.h:25,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.h:26,

                 from C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:22:

c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)

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

     ^

c:\users\stuart\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:193:5: note:   template argument deduction/substitution failed:

C:\Users\Stuart\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT_Client.cpp:84:38: note:   deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int')

       uint16_t sendlen = min(len, 250);

                                      ^

exit status 1
Error compiling for board Adafruit Feather HUZZAH ESP8266.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Does anyone have any ideas?

chorlton2080
 
Posts: 1
Joined: Sun Dec 17, 2017 12:10 pm

Re: Example temp/Humidity script

by adafruit_support_carter on Fri Jan 04, 2019 2:44 pm

Did you also update the ESP8266 BSP by any chance? What version are you currently using?

adafruit_support_carter
 
Posts: 9729
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.