Open markdeegan opened 3 days ago
Keep in mind I think the main loop needs a delay on sockets etc - otherwise it just hammers webservices with requests at a faster rate than the chip can potentially send them. So you may need a semiphore or something - or you could end up stacking the requests in your interupt. Regardless I'd be interested to see how that investigation on interupts plays out. Could be a powerful addition to the workflow.
Sure. I undertand that timing for networtking is important. I don't want to add to the timing issues with trvialities like flashing LEDs etc. I'd rather one or other, both even, if appropriate, of those functions is pushed to interrupt-driven as opposed to polling and potentially blocking things wiht a delay() call.
I have previously written timing stuff that uses either traditional delay() functions, or is completely interrupt-driven. The latter can be very useful.
I don’t like using the delay() function if I can avoid it. Particularly not in something networked, that might have its’ own timeout behaviours. So, I’m going to look at anywhere that is used and seek to replace the actions (usually switching an LED on or off, or changing colours) to interrupt-driven so that the delay() does not actually delay the main loop or any other methods it might6 call.