Changes

Jump to navigation Jump to search
Line 113: Line 113:  
There are two ways of addressing GPIO pins on a Pi.  
 
There are two ways of addressing GPIO pins on a Pi.  
   −
The code illustrates the issue  
+
The Documentation illustrates the issue  
   −
RPi.GPIO supports referring to GPIO pins using either the physical pin numbers on the GPIO connector or using the BCM channel names from the Broadcom SOC that the pins are connected to. For example, pin 24 is BCM channel GPIO8. To use physical board pin numbers, call:
+
<small>RPi.GPIO supports referring to GPIO pins using either the physical pin numbers on the GPIO connector or using the BCM channel names from the Broadcom SOC that the pins are connected to. For example, pin 24 is BCM channel GPIO8. To use physical board pin numbers, call:
    
GPIO.setmode(GPIO.BOARD)
 
GPIO.setmode(GPIO.BOARD)
Line 123: Line 123:  
GPIO.setmode(GPIO.BCM)
 
GPIO.setmode(GPIO.BCM)
   −
Either method will work. The BOARD number scheme has the advantage that the library is aware of the Raspberry Pi model it is running on and will work correctly even if the Broadcom SOC channel names change in the future.
+
Either method will work. The BOARD number scheme has the advantage that the library is aware of the Raspberry Pi model it is running on and will work correctly even if the Broadcom SOC channel names change in the future.</small>
    
In the zynth we use GPIO.setmode(GPIO.BCM)
 
In the zynth we use GPIO.setmode(GPIO.BCM)
1,019

edits

Navigation menu