BOARD vs BCM
1309 Views - Created 28/04/2019
28/04/2019
Posted by:
supernono
hello
i trying to use a servo pi board all run nice with the example
is it possible to use the the GPIO.setmode(GPIO.BCM) mode ?
i find in ServoPi.py file in
line 141 : GPIO.setmode(GPIO.BOARD)
line 142,284,294 : GPIO.setup(7, GPIO.OUT)
can i tweak these 4 line to run BCM mode ?
i trying to use a servo pi board all run nice with the example
is it possible to use the the GPIO.setmode(GPIO.BCM) mode ?
i find in ServoPi.py file in
line 141 : GPIO.setmode(GPIO.BOARD)
line 142,284,294 : GPIO.setup(7, GPIO.OUT)
can i tweak these 4 line to run BCM mode ?
Hello, There shouldn't be any problems with using BCM mode to access the GPIO port.
You should just need to change line 141 to GPIO.setmode(GPIO.BCM) and update all references to GPIO 7 to be 4 instead.
You should just need to change line 141 to GPIO.setmode(GPIO.BCM) and update all references to GPIO 7 to be 4 instead.
29/04/2019
Posted by:
supernono
ok i try this
thank you andrew
thank you andrew
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.