rpi_pinToBCM | R Documentation |
Look up a board pin number and return BCM_line and line_name Pin number is the physical board of the Raspberry pi.
rpi_pinToBCM(pin_number)
pin_number |
The pin as found on the Raspberry Pi board. Numbered from 1 to 40. |
This checks for a valid range of pins (1:40) and for valid input/output lines. This prevents trying to read a 3.3v or ground line.
a named vector. bcm_line = broadcom line connected to this pin pin_name = broadcom name such as RXD1 or GPIO21
rpi_pinToBCM(1) # produces error since pin #1 is not data
rpi_pinToBCM(40) # returns a named vector where bcm_line = 21 and pin_name = GPIO21
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.