EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: thun3100 on September 27, 2024, 10:50:03 am
-
I having trouble with coding this with nRF. Can anybody help me please?
I want to make T1 to last for 4 seconds, while T2 is doubled that of T1, which is 8 seconds.
:-[ :-[
Thanks in advance!
-
More information is needed to answer this question. nRF only indicates you most likely want to do it with something from Nordic Semiconductor, but not a specific chip.
For someone not familiar with the Nordic line of MCU's a datasheet or reference manual is needed to be able to think up a solution for your problem.
-
If you are using nRF5 SDK APIs, there are functions like nrfx_pwm_simple_playback(), nrfx_pwm_complex_playback() etc. for those kind of jobs. You can initially set some frequencies and then it alters the PWM between them based on time.
https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.0.2/page/group_nrfx_pwm.html (https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.0.2/page/group_nrfx_pwm.html)