powered by
Set a digital pin to on or off
setDpin(pin, value)
the number of the pin to set (integer)
the value to which to set the pin (binary)
# 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() # } # NOT RUN { # }
Run the code above in your browser using DataLab