These are chat archives for esp8266/Arduino

Aug 2017
Aug 08 2017 00:13
@nmenoni You could use Ticker to set up an interrupt. Then your timing won't be dependent on variations in your code execution.
Aug 08 2017 06:59
@nmenoni Using a delay is possibly the worst way to implement periodic data sending or taking sensor readings because it blocks other code whilst the delay code is running. As mentioned you could use ticker alternatively Google 'Non blocking delays on Arduino' There are some examples and explanations of the process. you can use the millis() function for example or a Real Time Clock (RTC) to send data at specific times.
Aug 08 2017 15:48
Ok! I will investigate these methods. Thanks!
Aug 08 2017 16:10
isnT it possible to make a new delay-command in the arduino-ide?
wich replaces the standart delay with a delay using millis?
Michael Miller
Aug 08 2017 16:36
BUT, the issue is to allow other things to continue to work while you wait. See ticker above, I also created an Arduino one some time ago (before esp8266) Github/Makuna/Task to wrap up the concept.
While using Delay() is a nice teaching concept, it is a poor design to use for anything other than examples.