Sensor timing

Hey everyone,
i’m working on a project, where I’ve got 4 sensors and would like to know on how to determine the time at which the first sensor is triggered and the time at which the last sensor is triggered and would like to know how to perform integration of analog values on the arduino I.D.E

Thank You all in advance

Can't give definitive answer without details of the sensors, but probably you would poll them in loop(), using a variable called previousSensor1 and currentSensor1 say, and compare the new one to the old one to see if it fired. Seeing as they're analog, you would probably check if it changed by more than some threshold value.

If it fired, set a variable called say sensor1FiredTime to millis().

Do that for all of them.

To integrate, well I guess you just average the values of sensor1 and 2, 2 and 3, and 3 and 4, and multiply by the gap between 1/2, 2/3 and 3/4 then add them up.

That's very rough... if you want turnkey code you'll need to go to Gigs and Collaborations, otherwise post the code you have so far in Programming Questions, and you'll get some specific help with specific questions.

edit: Forgot to say, check the StateChangeDetection example to see how to compare an old value to a new one. It's digital, but you can modify it for analog with a threshold, rather than just comparing to see if they changed.

i'm using 4 piezo electric sensors

Common threads merged.