# Example showcasing analog output functionality of Rduino package
# wiring: see "LED" schematic in /Examples/Schematics
library(Rduino)
rduinoConnect(baud=38400,mode="n,8,1",upload=FALSE)
off <- getDpin(4)
while (!off) {
intensity <- floor(getApin(5) / 4)
setApin(11, intensity)
setApin(5, intensity)
off <- getDpin(4)
}
setDpin(11, 0)
setDpin(5, 0)
rduinoClose()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.