HI team,
I am a beginner of Nordic nrf52840 DK, I would like to control the AC ceiling fan using the nrf52840 board with pwm library. As, I can see we can use either single channel or multi- channel for setting up the frequency of the pwm pin. In order to control the ac fan i am using zero crossing detector (H11AA1) so, that for every zero crossing the Triac(BT136) is triggered and pwm is set to the given duty cycle. But, what i am getting is only PWM sampling output, and the ZCD is always showing '0'. I am taking the ZCD as input assigned to gpio pin 30 and for every zero crossing i should get the given duty cycle output on GPIO pin 31 which is connected to load.
Kindly, give me suggestions or some kind of related code for getting the output.
Here, below is the code i am trying to execute.