setApin: Set analog pin

Description Usage Arguments Examples

View source: R/functions.R

Description

Set a analog pin to on or off

Usage

1
setApin(pin, value)

Arguments

pin

the number of the pin to set (integer)

value

the value to which to set the pin (real)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
rduinoConnect()
# gradually increase intensity of LED
for (i in seq(1,256,by=5)) 
{
  setApin(11,i)
  Sys.sleep(0.05)
}
rduinoClose()

## End(Not run)

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