Interrupts and Sensors

Does the Arduino Uno and similar boards have the ability to process simultaneous sensor events? For example, three microphones receive a sound and two of them receive it at the exact same moment, which in turn triggers an interrupt function associated with each sensor. The function stores the time in a variable with micros(). Do the interrupt functions get there time individually from one on the timers on the board before sending to the processor? And will the Uno processor store them as being identical?

Uno has one processor core. It can only do one thing at once. It also only has 2 interrupt pins. (More pins can be used as interrupts, but in that case they don't each have individual interrupt code, which makes them slower to react because some time has to be spent figuring out which pin caused the interrupt.)

So even if the sensors detect at the same instant, the interrupts will be executed one after another and micros() time will probably be slightly different.

Also the micros() time cannot measure 1us on Uno. The smallest time difference that can be measured is 4us I think.

ALL computers, main frame, mini, and your PC all prioritize interrupts and process them based on time and priority.

Theoretically, you might use the “capture” feature of (multiple) timers to grab time stamps of more than one event simultaneously.
(Not directly supported by any arduino libraries, afaik.)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.