{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/2295","repository_url":"https://api.github.com/repos/esp8266/Arduino","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/2295/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/2295/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/2295/events","html_url":"https://github.com/esp8266/Arduino/issues/2295","id":166165573,"number":2295,"title":"WiFi messes up SimpleTimer","user":{"login":"Gorkde","id":19655801,"avatar_url":"https://avatars.githubusercontent.com/u/19655801?v=3","gravatar_id":"","url":"https://api.github.com/users/Gorkde","html_url":"https://github.com/Gorkde","followers_url":"https://api.github.com/users/Gorkde/followers","following_url":"https://api.github.com/users/Gorkde/following{/other_user}","gists_url":"https://api.github.com/users/Gorkde/gists{/gist_id}","starred_url":"https://api.github.com/users/Gorkde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gorkde/subscriptions","organizations_url":"https://api.github.com/users/Gorkde/orgs","repos_url":"https://api.github.com/users/Gorkde/repos","events_url":"https://api.github.com/users/Gorkde/events{/privacy}","received_events_url":"https://api.github.com/users/Gorkde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-18T18:52:38Z","updated_at":"2016-07-18T18:56:50Z","closed_at":null,"body":"ESP8266 12-F\r\nV2.3.0\r\n\r\nOnce The Timers are defined before WiFi connection the Timers are messed up at the beginning.\r\nAs soon as I put them below they work.\r\n\r\nThis wouldn't be that bad except when WiFi disconnects and reconnects randomly for some reason I assume this will probably happen again and can cause multiple problems (server flooding in my case).\r\n\r\n![unbenannt](https://cloud.githubusercontent.com/assets/19655801/16926611/bb9c7254-4d29-11e6-8421-ffdcfe99d591.png)\r\n\r\n```\r\n#include <SimpleTimer.h>\r\n#include <ESP8266WiFi.h>\r\n\r\n#define WLANname \"XXX\"\r\n#define WLANpw \"XXX\"\r\n#define authToken \"XXX\"\r\n\r\n// Timer definieren\r\nSimpleTimer Timer;\r\n\r\n// Timer ID's initialisieren\r\nint Timer_A_ID = 0;\r\nint Timer_B_ID = 0;\r\nint Timer_C_ID = 0;\r\n\r\nunsigned long TESTmillis1 = 0;\r\nunsigned long TESTmillis2 = 0;\r\nunsigned long TESTmillis3 = 0;\r\n\r\nvoid setup()\r\n{\r\n  Serial.begin(115200);\r\n  delay (200);\r\n\r\n  Timer_A_ID = Timer.setInterval(1000L, Test1);\r\n  Timer_B_ID = Timer.setInterval(1000L, Test2);\r\n  Timer_C_ID = Timer.setInterval(1000L, Test3);\r\n \r\n  WiFi.begin(WLANname, WLANpw);\r\n  while (WiFi.status() != WL_CONNECTED) {yield();}\r\n\r\n  TESTmillis1 = millis();\r\n  TESTmillis2 = millis();\r\n  TESTmillis3 = millis();\r\n\r\n  Serial.println(\"\\nSTART\");\r\n}\r\n\r\nvoid loop()\r\n{\r\n  Timer.run();\r\n}\r\n\r\nvoid Test1()\r\n{\r\n  Serial.println(\"Timer - 1\");\r\n  Serial.println((millis() - TESTmillis1));\r\n  TESTmillis1 = millis();\r\n}\r\n\r\nvoid Test2()\r\n{\r\n  Serial.println(\"Timer - 2\");\r\n  Serial.println((millis() - TESTmillis2));\r\n  TESTmillis2 = millis();\r\n}\r\n\r\nvoid Test3()\r\n{\r\n  Serial.println(\"Timer - 3\");\r\n  Serial.println((millis() - TESTmillis3));\r\n  TESTmillis3 = millis();\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/233424043","html_url":"https://github.com/esp8266/Arduino/issues/2295#issuecomment-233424043","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/2295","id":233424043,"user":{"login":"Gorkde","id":19655801,"avatar_url":"https://avatars.githubusercontent.com/u/19655801?v=3","gravatar_id":"","url":"https://api.github.com/users/Gorkde","html_url":"https://github.com/Gorkde","followers_url":"https://api.github.com/users/Gorkde/followers","following_url":"https://api.github.com/users/Gorkde/following{/other_user}","gists_url":"https://api.github.com/users/Gorkde/gists{/gist_id}","starred_url":"https://api.github.com/users/Gorkde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gorkde/subscriptions","organizations_url":"https://api.github.com/users/Gorkde/orgs","repos_url":"https://api.github.com/users/Gorkde/repos","events_url":"https://api.github.com/users/Gorkde/events{/privacy}","received_events_url":"https://api.github.com/users/Gorkde/received_events","type":"User","site_admin":false},"created_at":"2016-07-18T18:56:50Z","updated_at":"2016-07-18T18:56:50Z","body":"I don't need to but\r\n\r\nA) This should be working\r\nB) If there's a problem for the first connect I assume this will also happen after a random disconnect and reconnect later (as I already wrote above)"}}
{"actor":{"display_login":"Gorkde"}}