Yes, I noted the missing curly braces before compiling and corrected it. Still got the error in post #17
Post the EXACT code that you are compiling, and details of what board type you are using and what board type you have selected in the IDE.
Also, post the full compiler output, and use triple backticks in the same way as when you post code.
Pete.
The code is:
#include <SimpleTimer.h>
SimpleTimer timer;
const int irPin = 5;
const int buzzerPin = 16;
void setup() {
Serial.begin(9600);
pinMode(irPin, INPUT);
pinMode(buzzerPin, OUTPUT);
timer.setInterval(1000L, Sensor);
}
int irValue;
void Sensor() {
irValue = digitalRead(irPin);
Serial.println("Irvalues are here");
Serial.println(irValue);
if(irValue == 1) {
digitalWrite(buzzerPin, HIGH);
}
else {
digitalWrite(buzzerPin, LOW);
}
}
void loop() {
timer.run();
}
The board type that I am using is Node MCU ESP8266 WIFI .
The selected board in the IDE is Generic ESP8266 Module.
The output when compiling is :
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\unordered_map:63:37: error: expected '>' before '<' token
63 | typename _Pred = std::equal_to<_Key>>
| ^
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\unordered_map:66:53: error: wrong number of template arguments (5, should be at least 2)
66 | polymorphic_allocator<pair<const _Key, _Tp>>>;
| ^
In file included from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\unordered_map:47,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:61,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\pstl\glue_algorithm_defs.h:13,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\algorithm:74,
from C:\Users\rhabp\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/Arduino.h:229,
from C:\Users\rhabp\AppData\Local\Temp\arduino-sketch-A6098E7C667F3396D818AB2F990C347D\sketch\Edgent_ESP8266.ino.cpp:1:
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\unordered_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Hash, class _Pred> class std::unordered_map'
102 | class unordered_map
| ^~~~~~~~~~~~~
In file included from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:61,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\pstl\glue_algorithm_defs.h:13,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\algorithm:74,
from C:\Users\rhabp\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/Arduino.h:229,
from C:\Users\rhabp\AppData\Local\Temp\arduino-sketch-A6098E7C667F3396D818AB2F990C347D\sketch\Edgent_ESP8266.ino.cpp:1:
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\unordered_map:68:29: error: 'equal_to' in namespace 'std' does not name a template type; did you mean 'equal'?
68 | typename _Pred = std::equal_to<_Key>>
| ^~~~~~~~
| equal
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\unordered_map:68:37: error: expected '>' before '<' token
68 | typename _Pred = std::equal_to<_Key>>
| ^
In file included from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\pstl\glue_algorithm_defs.h:13,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\algorithm:74,
from C:\Users\rhabp\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/Arduino.h:229,
from C:\Users\rhabp\AppData\Local\Temp\arduino-sketch-A6098E7C667F3396D818AB2F990C347D\sketch\Edgent_ESP8266.ino.cpp:1:
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional: In member function '_Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...)':
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:500:13: error: 'forward_as_tuple' is not a member of 'std'
500 | std::forward_as_tuple(std::forward<_Args>(__args)...),
| ^~~~~~~~~~~~~~~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:64:1: note: 'std::forward_as_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
63 | # include <array>
+++ |+#include <tuple>
64 | # include <utility>
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional: In member function '_Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const':
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:512:13: error: 'forward_as_tuple' is not a member of 'std'
512 | std::forward_as_tuple(std::forward<_Args>(__args)...),
| ^~~~~~~~~~~~~~~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:512:13: note: 'std::forward_as_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional: In member function '_Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile':
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:530:13: error: 'forward_as_tuple' is not a member of 'std'
530 | std::forward_as_tuple(std::forward<_Args>(__args)...),
| ^~~~~~~~~~~~~~~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:530:13: note: 'std::forward_as_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional: In member function '_Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile':
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:542:13: error: 'forward_as_tuple' is not a member of 'std'
542 | std::forward_as_tuple(std::forward<_Args>(__args)...),
| ^~~~~~~~~~~~~~~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:542:13: note: 'std::forward_as_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional: In member function 'std::_Bind_result<_Result, _Functor(_Bound_args ...)>::result_type std::_Bind_result<_Result, _Functor(_Bound_args ...)>::operator()(_Args&& ...)':
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:626:13: error: 'forward_as_tuple' is not a member of 'std'
626 | std::forward_as_tuple(std::forward<_Args>(__args)...),
| ^~~~~~~~~~~~~~~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:626:13: note: 'std::forward_as_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional: In member function 'std::_Bind_result<_Result, _Functor(_Bound_args ...)>::result_type std::_Bind_result<_Result, _Functor(_Bound_args ...)>::operator()(_Args&& ...) const':
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:637:13: error: 'forward_as_tuple' is not a member of 'std'
637 | std::forward_as_tuple(std::forward<_Args>(__args)...),
| ^~~~~~~~~~~~~~~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:637:13: note: 'std::forward_as_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional: In member function 'std::_Bind_result<_Result, _Functor(_Bound_args ...)>::result_type std::_Bind_result<_Result, _Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile':
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:648:13: error: 'forward_as_tuple' is not a member of 'std'
648 | std::forward_as_tuple(std::forward<_Args>(__args)...),
| ^~~~~~~~~~~~~~~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:648:13: note: 'std::forward_as_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional: In member function 'std::_Bind_result<_Result, _Functor(_Bound_args ...)>::result_type std::_Bind_result<_Result, _Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile':
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:659:13: error: 'forward_as_tuple' is not a member of 'std'
659 | std::forward_as_tuple(std::forward<_Args>(__args)...),
| ^~~~~~~~~~~~~~~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:659:13: note: 'std::forward_as_tuple' is defined in header '<tuple>'; did you forget to '#include <tuple>'?
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional: At global scope:
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:966:32: error: 'equal_to' was not declared in this scope; did you mean 'equal'?
966 | struct __is_byte_like<_Tp, equal_to<_Tp>>
| ^~~~~~~~
| equal
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:966:41: error: template argument 2 is invalid
966 | struct __is_byte_like<_Tp, equal_to<_Tp>>
| ^~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:966:44: error: expected unqualified-id before '>' token
966 | struct __is_byte_like<_Tp, equal_to<_Tp>>
| ^~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:970:32: error: 'equal_to' was not declared in this scope; did you mean 'equal'?
970 | struct __is_byte_like<_Tp, equal_to<void>>
| ^~~~~~~~
| equal
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:970:45: error: template argument 2 is invalid
970 | struct __is_byte_like<_Tp, equal_to<void>>
| ^~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:978:33: error: 'equal_to' was not declared in this scope; did you mean 'equal'?
978 | struct __is_byte_like<byte, equal_to<byte>>
| ^~~~~~~~
| equal
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:978:42: error: template argument 2 is invalid
978 | struct __is_byte_like<byte, equal_to<byte>>
| ^~~~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:978:46: error: expected unqualified-id before '>' token
978 | struct __is_byte_like<byte, equal_to<byte>>
| ^~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:982:33: error: 'equal_to' was not declared in this scope; did you mean 'equal'?
982 | struct __is_byte_like<byte, equal_to<void>>
| ^~~~~~~~
| equal
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:982:46: error: template argument 2 is invalid
982 | struct __is_byte_like<byte, equal_to<void>>
| ^~
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:999:68: error: 'equal_to' does not name a type; did you mean 'equal'?
999 | template<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>>
| ^~~~~~~~
| equal
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:999:76: error: expected '>' before '<' token
999 | template<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>>
| ^
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:1108:33: error: 'equal_to' does not name a type; did you mean 'equal'?
1108 | typename _BinaryPredicate = equal_to<>>
| ^~~~~~~~
| equal
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:1108:41: error: expected '>' before '<' token
1108 | typename _BinaryPredicate = equal_to<>>
| ^
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:1164:33: error: 'equal_to' does not name a type; did you mean 'equal'?
1164 | typename _BinaryPredicate = equal_to<>>
| ^~~~~~~~
| equal
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:1164:41: error: expected '>' before '<' token
1164 | typename _BinaryPredicate = equal_to<>>
| ^
In file included from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:59,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\pstl\glue_algorithm_defs.h:13,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\algorithm:74,
from C:\Users\rhabp\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/Arduino.h:229,
from C:\Users\rhabp\AppData\Local\Temp\arduino-sketch-A6098E7C667F3396D818AB2F990C347D\sketch\Edgent_ESP8266.ino.cpp:1:
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\std_function.h: In instantiation of 'class std::function<void(unsigned int, unsigned int)>':
C:\Users\rhabp\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/Updater.h:242:52: required from here
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\std_function.h:303:11: error: invalid use of incomplete type 'struct std::_Maybe_unary_or_binary_function<void, unsigned int, unsigned int>'
303 | class function<_Res(_ArgTypes...)>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:58,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\pstl\glue_algorithm_defs.h:13,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\algorithm:74,
from C:\Users\rhabp\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/Arduino.h:229,
from C:\Users\rhabp\AppData\Local\Temp\arduino-sketch-A6098E7C667F3396D818AB2F990C347D\sketch\Edgent_ESP8266.ino.cpp:1:
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\refwrap.h:55:12: note: declaration of 'struct std::_Maybe_unary_or_binary_function<void, unsigned int, unsigned int>'
55 | struct _Maybe_unary_or_binary_function { };
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:59,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\pstl\glue_algorithm_defs.h:13,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\algorithm:74,
from C:\Users\rhabp\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/Arduino.h:229,
from C:\Users\rhabp\AppData\Local\Temp\arduino-sketch-A6098E7C667F3396D818AB2F990C347D\sketch\Edgent_ESP8266.ino.cpp:1:
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\std_function.h: In instantiation of 'class std::function<void(unsigned char)>':
C:\Users\rhabp\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/Updater.h:243:46: required from here
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\std_function.h:303:11: error: invalid use of incomplete type 'struct std::_Maybe_unary_or_binary_function<void, unsigned char>'
303 | class function<_Res(_ArgTypes...)>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\functional:58,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\pstl\glue_algorithm_defs.h:13,
from c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\algorithm:74,
from C:\Users\rhabp\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/Arduino.h:229,
from C:\Users\rhabp\AppData\Local\Temp\arduino-sketch-A6098E7C667F3396D818AB2F990C347D\sketch\Edgent_ESP8266.ino.cpp:1:
c:\users\rhabp\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\refwrap.h:55:12: note: declaration of 'struct std::_Maybe_unary_or_binary_function<void, unsigned char>'
55 | struct _Maybe_unary_or_binary_function { };
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\rhabp\Desktop\Edgent_ESP8266\Edgent_ESP8266.ino: In function 'void setup()':
C:\Users\rhabp\Desktop\Edgent_ESP8266\Edgent_ESP8266.ino:15:32: error: no matching function for call to 'SimpleTimer::setInterval(long int, void (&)())'
15 | timer.setInterval(1000L, Sensor);
| ^
In file included from C:\Users\rhabp\Desktop\Edgent_ESP8266\Edgent_ESP8266.ino:1:
c:\Users\rhabp\Documents\Arduino\libraries\SimpleTimer/SimpleTimer.h:23:10: note: candidate: 'void SimpleTimer::setInterval(uint64_t)'
23 | void setInterval(uint64_t interval);
| ^~~~~~~~~~~
c:\Users\rhabp\Documents\Arduino\libraries\SimpleTimer/SimpleTimer.h:23:10: note: candidate expects 1 argument, 2 provided
C:\Users\rhabp\Desktop\Edgent_ESP8266\Edgent_ESP8266.ino: In function 'void loop()':
C:\Users\rhabp\Desktop\Edgent_ESP8266\Edgent_ESP8266.ino:39:7: error: 'class SimpleTimer' has no member named 'run'
39 | timer.run();
| ^~~
exit status 1
Compilation error: no matching function for call to 'SimpleTimer::setInterval(long int, void (&)())'
So you didnβt like my advice about using indents sensibly to make your code more readable?
It appears from your compiler messages that youβre attempting to compile a Blynk Edgent exampleβ¦
I suggest that you create a new sketch in the Arduino IDE, remove the generic void setup and void loop code that is automatically added, paste the code that youβve posted above, select NodeMCU as your board type rather than Generic ESP8266, then compile that sketch.
Pete.
nah, still not working. Showing the same error.
Well, when I compile your code I get this:
. Variables and constants in RAM (global, static), used 28416 / 80192 bytes (35%)
β SEGMENT BYTES DESCRIPTION
β ββ DATA 1496 initialized variables
β ββ RODATA 944 constants
βββ BSS 25976 zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 60319 / 65536 bytes (92%)
β SEGMENT BYTES DESCRIPTION
β ββ ICACHE 32768 reserved space for flash instruction cache
βββ IRAM 27551 code in IRAM
. Code in flash (default, ICACHE_FLASH_ATTR), used 236564 / 1048576 bytes (22%)
β SEGMENT BYTES DESCRIPTION
βββ IROM 236564 code in flash
Maybe you have some corrupted libraries in your IDE?
Pete.
I think so yes.
Let me reinstall my IDE.
I re installed my libraries and it compiled successfully.