getApin {Rduino} | R Documentation |
Get the value of an analog pin
getApin(pin)
pin |
the number of the pin to get (integer) |
the value of the pin.
## Not run: rduinoConnect() # set position of servo to position of potentiometer off<-getDpin(4) while (!off) { angle<-getApin(5) angle<- 1.68 * angle + 575 setServo(9,angle) off<-getDpin(4) } offServo() rduinoClose() ## End(Not run)