Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

Beginners • Re: Pi5 & Servo problem

$
0
0
To use the RP1 PWM functions on a Pi5 (RP1 chip) on GPIO18 (default) we edit config.txt to add the pwm overlay, save, then reboot:

Code:

sudo nano /boot/firmware/config.txtdtoverlay=pwm
Then we can use a shell script to write to /sys/class/pwm/$CHIP/$PWM/period as shown in PhilE script in that post. viewtopic.php?t=359251
Also pinctrl can then see it

Code:

pi@pi:~/scripts $ pinctrl get 1818: a3    pd | lo // GPIO18 = PWM0_CHAN2
Here is PWM running on a Pi5 GPIO18
pwm GPIO18 with dtoverlay Pi5-8GB 1kHz.JPG

Statistics: Posted by neilgl — Sat Oct 11, 2025 8:18 pm



Viewing all articles
Browse latest Browse all 8609

Trending Articles