rpi_get | R Documentation |
Returns the value of one or more specified board-level pin number (0-40). Stops if the pin is not a valid data line.
rpi_get(pin_number)
pin_number |
a Raspberry Pi GPIO board level pin number between 1 and 40. For example, Pin #1 is located upper left and provides 3.3 volts. Pin #40 is located lower right and is the location of GPIO21. |
named vector with the value of each pin number.
## Not run: rpi_get(1) # produces error since pin #1 is not data
rpi_get(40) # returns a named vector of the state of GPIO21. i.e. return["GPIO21"] = 1
rpi_get(c(7, 40)) # returns a named vector of values from pins 7 and 40
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.