Learn R Programming

Rduino (version 0.1)

setApin: Set analog pin

Description

Set a analog pin to on or off

Usage

setApin(pin, value)

Arguments

pin

the number of the pin to set (integer)

value

the value to which to set the pin (real)

Examples

Run this code
# NOT RUN {
rduinoConnect()
# gradually increase intensity of LED
for (i in seq(1,256,by=5)) 
{
  setApin(11,i)
  Sys.sleep(0.05)
}
rduinoClose()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab