10-01-2024, 11:19 AM
It looks like that script is using Broadcom physical pin numbering and not GPIO channel numbering otherwise there would be this line of code
so in your command
Pin 21 refers to physical pin number 21 on the 40-pin header. This maps to GPIO 9 (MISO). According to the link below GPIO 9 is part of the SPI (Serial Peripheral Interface) and MISO stands for Master In Slave Out.
https://www.tomshardware.com/reviews/ras...,6122.html
I don't know what this means since I don't have much experience with GPIO programming but maybe a pin other than 21 needs to be used?
Code:
# Use SoC pin (GPIO channel) numbering
GPIO.setmode(GPIO.BCM)
so in your command
Code:
python3 ca_amp_ctrl_rpigpio.py --pin 21 ampon
Pin 21 refers to physical pin number 21 on the 40-pin header. This maps to GPIO 9 (MISO). According to the link below GPIO 9 is part of the SPI (Serial Peripheral Interface) and MISO stands for Master In Slave Out.
https://www.tomshardware.com/reviews/ras...,6122.html
I don't know what this means since I don't have much experience with GPIO programming but maybe a pin other than 21 needs to be used?