Description Usage Arguments Value Examples
Get the value of a digital pin
1 | getDpin(pin)
|
pin |
the number of the pin to get (integer) |
the binary value of the pin.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
rduinoConnect()
# LED remains on until button is pressed
setDpin(5,1)
isPressed<-getDpin(4)
while (!isPressed){ isPressed<-getDpin(4) }
setDpin(5,0)
rduinoClose()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.