I’m trying to calculate the low pulse time for a digital sensor that has an output like in the attached diagram. I’ve used a voltage divider to convert the 4v high into a 3.3v signal and that seems to be working fine. And I can read the low pulse duration with my arduino just fine using this: duration = pulseIn(pin, LOW);
The imp doesn’t seem to have something equivalent and I’m looking for some direction as I’m new to coding in Squirrel. I just need to know how long the low pulses are and be able to define a total sample time so I can calculate for what percent of the sample time the pulse was low.
Any help on how to do this in Squirrel on the imp would be appreciated!