ArduinoA
Arduino7mo ago
Kaito

I've got a hypothetical code setup: Arduino nano, the ADC is set to trigger an interrupt at every c

I've got a hypothetical code setup:

Arduino nano, the ADC is set to trigger an interrupt at every conversion. In the ADC interrupt ISR, I compare it to a value, and if it passes, I disable the ADC until I turn it on later.

The reason for this is because I want the ISR to flip a flag that I'll later handle in the main loop, but until then I don't see a need to have the interrupt trigger every time. Once is enough.

Besides the ASC taking 25(?) clock cycles to start up again, is there anything wrong with this idea?
Was this page helpful?