Cours:SaéSBC robotAutonome : Différence entre versions
(→pi5 et pwm) |
|||
Ligne 10 : | Ligne 10 : | ||
*https://forums.raspberrypi.com/viewtopic.php?t=359251 | *https://forums.raspberrypi.com/viewtopic.php?t=359251 | ||
− | * | + | *pwmchip2 |
**channel 2 => gpio18 | **channel 2 => gpio18 | ||
+ | ***echo 2 > /sys/class/pwm/pwmchip2/export | ||
+ | ***modifier duty_cyle et period | ||
+ | **channel 3 => gpio19 | ||
***echo 2 > /sys/class/pwm/pwmchip2/export | ***echo 2 > /sys/class/pwm/pwmchip2/export | ||
***modifier duty_cyle et period | ***modifier duty_cyle et period |
Version du 24 septembre 2024 à 14:36
pi5 et pwm
- config : modifier le fichier /boot/firmware/config.txt
dtoverlay=pwm-2chan,pin=18,pin2=19
- vérif :
dtoverlay=pwm-2chan,pin=18,pin2=19
- https://gist.github.com/Gadgetoid/b92ad3db06ff8c264eef2abf0e09d569
- https://community.element14.com/products/raspberry-pi/m/files/148385
- https://forums.raspberrypi.com/viewtopic.php?t=359251
- pwmchip2
- channel 2 => gpio18
- echo 2 > /sys/class/pwm/pwmchip2/export
- modifier duty_cyle et period
- channel 3 => gpio19
- echo 2 > /sys/class/pwm/pwmchip2/export
- modifier duty_cyle et period
- channel 2 => gpio18
</source>