Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By cal
#21669 Moin,

you can use interrupts for sure.
But as you would not do access your harddisk in an interrupt handler some restrictions apply here, too.
Make a shared data structure that is used to exchange data between interrupt code and main loop.
The typical uart drivers use that for reading serial data for example.
The nodemcu firmware provides a lua environment. Lua code can't called from interrupt ASAIK. But the driver part of the firmware makes use of interrupts for timers, uart, pwm etc. Shared data structures allow to decouple that.

Cal
User avatar
By cal
#21670
FlyingHacker wrote:I was basing that off of this:

https://github.com/esp8266/Arduino#timing-and-delays

Hopefully I am interpreting things correctly.


I agree with you. The espduino provided delay function is translating the delay into continuations that fit the basic event model.

https://github.com/esp8266/Arduino/blob ... 6_wiring.c

The continuation stuff looks like an interesting read.

So it's like leaving the main loop without leaving it.

Cool,
Cal
User avatar
By Marty
#21689 Cal and Flying Hacker,

Thanks a lot for the information. As you can surely tell, I'm a novice at all of this.

I didn't really understand the ramifications of the information in the "Timing and Delays" section when I first read it. Now it makes sense and gives me a path to try the interrupts again. Hate to do data polling.

Marty