i attempted to measure voltage at a point  by opening and closing a switch with interrupt in arduino uno board.  i need to measure the voltage after 100 ms from the instant of opening of the switch and to measure the voltage after 100 ms of the closing of the switch.

The interrupt exactly interrupt at every 4 seconds to open the switch but the problem is the opening time interval of the switch varies for every cycle. 20ms, 50ms etc.,. i attached the code. please help me to rectify the problem.

Similar questions and discussions