Closed vsmaldino closed 1 year ago
Thanks for the issue, I will look at it asap but that might be next year
I have no experience with ticker, do you have a link that explainis what it is / how it works / repo ?
Can you compile and run the examples?
https://github.com/sstaub/Ticker This one?
Thanks for the issue, I will look at it asap but that might be next year
I have no experience with ticker, do you have a link that explainis what it is / how it works / repo ?
For Ticker you can start here: https://techtutorialsx.com/2021/08/07/esp32-ticker-library/ https://circuits4you.com/2018/01/02/esp8266-timer-ticker-example/
Can you compile and run the examples?
Yes sure. If you look at my code, "setup" calls the "test" and it works fine (see the output). The problem is when "test" is called by the ticker (tckRead.attach(3.0, test);)
https://github.com/sstaub/Ticker This one?
I'm using the standard Ticker library
https://github.com/sstaub/Ticker This one?
I'm using the standard Ticker library
Where can I find the standard Ticker?
https://github.com/sstaub/Ticker This one?
I'm using the standard Ticker library
Where can I find the standard Ticker?
It is included in the "ESP8266 Boards" kit I imported within Arduino IDE using "Boards Manager"
thanks,
Did some reading in the library code (no experience with esp8266)
Can you try tckRead.attach_scheduled(3.0, test); instead of tckRead.attach(3.0, test);
The comments states different context. The CTX context fails so the idea is to try another (to better understand the detailed working).
// callback will be called at following loop() after ticker fires
void attach_scheduled(float seconds, callback_function_t callback)
{
_callback_function = [callback]() { schedule_function(callback); };
_attach_ms(1000UL * seconds, true);
}
// callback will be called in SYS ctx when ticker fires
void attach(float seconds, callback_function_t callback)
{
_callback_function = std::move(callback);
_attach_ms(1000UL * seconds, true);
}
@vsmaldino did you test the above ?
As I got no response I close the issue
Wemos D1R2 - ver. 0.4.17 The Library doesn't work if used within a function called by a Ticker, the board generates an exception and restarts. Output: `dhtnew_test.ino LIBRARY VERSION: 0.4.17
User exception (panic/abort/assert) --------------- CUT HERE FOR EXCEPTION DECODER ---------------
Panic core_esp8266_main.cpp:137 __yield
Code:
(updated code tags for syntax highlight)