setDpin: Set digital pin

Description Usage Arguments Examples

View source: R/functions.R

Description

Set a digital pin to on or off

Usage

1
setDpin(pin, value)

Arguments

pin

the number of the pin to set (integer)

value

the value to which to set the pin (binary)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
rduinoConnect()
# flash LED rapidly
for (i in 0:9) 
{
  setDpin(8,1)
  Sys.sleep(0.05)
  setDpin(8,0)
  Sys.sleep(0.05)
}
rduinoClose()

## End(Not run)

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