getDpin {Rduino} | R Documentation |
Get digital pin
Description
Get the value of a digital pin
Usage
getDpin(pin)
Arguments
pin |
the number of the pin to get (integer) |
Value
the binary value of the pin.
Examples
## 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)
[Package Rduino version 0.1 Index]