getDpin: Get digital pin

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Get the value of a digital pin

Usage

1
getDpin(pin)

Arguments

pin

the number of the pin to get (integer)

Value

the binary value of the pin.

Examples

 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)

Rduino documentation built on May 1, 2019, 7:32 p.m.

Related to getDpin in Rduino...