Posts: 192
Joined: Wed Nov 26, 2014 5:13 pm

need to respond to alarm signal pwm

Sat Nov 17, 2018 9:22 am

Hi, I'm generating a pwm signal on an I/O output that signals an alarm & that is working fine:

Code: Select all

I can see the pwm on the scope, just fine

Now I also need the rpi to do something each time the pwm output pin goes hi. I can't sit & waste time monitoring the pin due to other programming items needing to run, & I also need a somewhat fast response (before that next pwm hi pulse occurs...maybe a 1-2ms)
Can some sort of interrupt be set up to monitor this pwm output & react when it pulses hi? For example, maybe I want to read & print something each time my pwm signal goes high, then go back to what I was doing.

Return to “General discussion”