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

Automation, sensing and robotics • Re: Rasberry Pi 5 PWM Example code

$
0
0
adding/changing config.txt to enable PWM on i.e. GPIO12/13

Code:

#dtparam=audio=ondtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4
results in

Code:

pi@cm4nanob:~ $ pinctrl get 12,1312: a0    pd | lo // GPIO12 = PWM0_013: a0    pd | lo // GPIO13 = PWM0_1
then read viewtopic.php?p=2347652#p2347652 for another method of using PWM

Statistics: Posted by aBUGSworstnightmare — Sat Nov 29, 2025 10:53 am



Viewing all articles
Browse latest Browse all 8041

Trending Articles