These are chat archives for esp8266/Arduino

May 2016
Ivan Grokhotkov
May 15 2016 05:32
Ticker isn't actually in interrupt — it can not preempt your code. It will only run between loops and during delays and yields.
May 15 2016 09:55
Is there a way to make it work? Calling yield() inside the callback also crashes.
Ivan Grokhotkov
May 15 2016 10:45
you shouldn't call delay, yield, or any other blocking function from Ticker callbacks
May 15 2016 10:59
ok, but how do i prevent crashing after printing 30 lines? Or do i have to finish the callback always in a certain amount of time?
Ivan Grokhotkov
May 15 2016 11:16
I'd rather not put printing into a ticker callback. I suppose you could set a flag from ticker callback, and then act upon the flag's value in loop
May 15 2016 12:08
The printing is just for checking whats going on...Actually, i have an array of multiple timers, linked to different modules (pwm, dht, analog reading, etc), which i continously check in the main loop and i thought i could replace that with ticker objects. But at this time, it seems to obscure for me and i will stick to the old fashioned way. Thanks for your help!
Clemens Kirchgatterer
May 15 2016 13:20
you could just do without timers. i prefere to just poll my modules and look if enough time has past since the last poll.
bool ICACHE_FLASH_ATTR mqtt_poll(void) {
  static uint32_t ms = 0;

  if ((millis() - ms) / 1000 > config->mqtt_interval) {
    ms = millis();

  return (true);
May 15 2016 13:59
Clemens, thanks for the suggestion - my actual code works like that (i even take care of the timer overflow :)). I just wanted to replace it with the tickers.
Michael Miller
May 15 2016 14:39
@M0ebiu5 I am curious why you made the comment about even taking care of timer overflow; as I have been having conversations with people who think they are but are not. The code @everslick has shown actually does correctly handle timer overflow AND is the normal way to do it to avoid pitfalls.
May 15 2016 15:14
You are right, sorry!
May 15 2016 15:55
hey guys, how can I do a post mortem to the esp?
I have been using a code that stops after 3h or something
when I'm "watching" it on the serial monitor it works fine
May 15 2016 16:42
can the esp be "overused"? It is a ping scanner
May 15 2016 17:26
Hello. My question is, does anyone know where and how to run the DTR pin on the MCP2200 adapter?
May 15 2016 17:41
Hello ! what might be the problem if i get following debug info.

```[HTTPS] begin...
[HTTP-Client][begin] url:
[HTTP-Client][begin] host: port: 443 url: /mcs/v2/devices/DO41xA6p/datapoints
[HTTP-Client][begin] httpsFingerprint: ‎f8 6c 68 45 ef 2f 0b cc d9 13 78 f6 1c 8a cb 3e 61 db fc bd
State: sending Client Hello (1)
State: receiving Server Hello (2)
State: receiving Certificate (11)
State: receiving Server Hello Done (14)
State: sending Client Key Exchange (16)
State: sending Finished (16)
State: receiving Finished (16)
[HTTP-Client] connected to
[HTTP-Client] transport level verify failed
Alert: close notify
[HTTP-Client][returnError] error(-1): connection refused

[HTTP-Client][returnError] error(-4): not connected
[HTTP-Client][end] tcp is closed

I dont have a clue why transport level verify failed
May 15 2016 18:34
hey guys, can esp8266 turn down because of too much heat?