Can I read a PULSE_COUNTER type pin in the background?

I’m using the pulse counter mode to read pulses from a parallax x-band microwave sensor (behind a level shifter). It seems to work fine, but my code seems to be stopped while I do a read (reading for 1 second at a time right now).

Is there a way to read this in the background, so I can detect motion while I’m running the rest of my code?

(On my arduino I used an interrupt to do this)

there is not, although it has come up in discussion before

What I have tried in the past is to set up a callback function on a pin. this is totally different from using PULSE_COUNTER

pin.configure(DIGITAL_IN, function)

What you must do is use what you know about interrupts in arduino and try to accomplish this on the imp. imp does not have true interrupt so it will not work exactly the same way. if your device does not have a lot of other things to do and the timing is not critical, this may work.

Thanks, I’ll give that a try – in my application the number of pins I expect to receive is relatively low, so this might work.