Detecting varying PWM states

Here are two ideas that require little software and should not interfere with your current code but you will need some hardware:

  • If you have an ADC available you can turn the signal into an analog signal using a simple RC-filter.
  • If you have a timer/counter with external input you can use that to detect the PWM signal.
1 Like