Hello everybody,
I am using sdk14.2, s132 with Nrf52832. I want to define the pin of the NRF52 as the input and decode the incoming pwm signal. For example, I have a signal at 100 Hz and the duty cycle is as follows; {70%, 80%, 90%, 60%, 50%, 40%, 30%}. After I connect this signal to PIN 2, I want to keep the duty cycle into an array, and I want to keep the frequency into a variable. I have found an example that reads frequency from previously asked question. But in this question, the duty cycle is not read, only the frequency is read.
I plotted a pwm signal for an example;
I want to assign frequency and duty cycle to these variables.
uint32_t frequency;
uint8_t duty_cycle[7];
When I give this signal, result should be like this;
frequency =100,
duty_cycle = {70,80,90,60,50,40,30}.
Do you have any suggestions?