These are chat archives for esp8266/Arduino

Jul 2017
Bert Melis
Jul 06 2017 10:28
I'm looking for a code example to get an timer interrupt, once, in the range of 200 microseconds from the current time. The Ticker lib only has msec resolution. Any ideas where to look?
Clemens Kirchgatterer
Jul 06 2017 13:44
@bertmelis can you not just busy wait for 200 us ?
how close to exactly 200 us do you need to get?
Bert Melis
Jul 06 2017 15:57
I probably can wait, but it's for the sport. Anyway, I can do it with the timer0/1 functions. Unfortunately it's not compatible with the ESP32
The goal in the end is to make the modbusmaster lib non blocking and have correct timings for the half duplex enable pin.
Michael Miller
Jul 06 2017 16:37
@bertmelis Most low level bus oriented communications are not cross platform compatible, not sure why you require compatibility with Esp8266 and Esp32. For non blocking on Esp8266, you either have to use the hardware UART or DMA support; on Esp32 look at the RMT.