read speed of a motor using a sensor installed on a motor that reads pulses (rabbit bl4s100)

i am trying to read the “speed of a motor” using the digital inputs on the SBC, i tried using the program Pulse_capture.c with no luck; is there any example programs that shows the way it should be done, considering we have a sensor that is reading pulses from a rod installed on a motor which act as a trigger?(BL4S100 series)

Hello, I think you may use interrupts.c application under

The setCounter() function in BL4S1xx.lib can configure an input channel to count pulses. Maybe that would work for you? You could sample that counter at some frequency and use the change in reading to calculate the RPM for the motor.