Next: Arduino Servo Functions, Previous: Arduino I2C Functions, Up: Function Reference [Contents][Index]
Free resources of a encoder object.
dev - object to free
See also: rotartEncoder.
Display the rotary encoder object in a verbose way,
obj - the arduino rotary encoder object created with rotaryEncoder
See also: rotaryEncoder.
read count value from the rotary encoder.
subsubheading Inputs obj - rotary encoder object created with rotaryEncoder call.
name, value - optional name,value pairs
Valid option name pairs currently are:
Reset the count after reading (if true)
count - returned count read from the encoder.
time - seconds since arduino started
See also: rotaryEncoder, resetCount.
read rotational speed from the rotary encoder.
obj - rotary encoder object created with rotaryEncoder call.
speed - returned speed in revolutions per minute read from the encoder.
See also: rotaryEncoder, resetCount.
Create a rotaryEncoder object controlled by the input pins.
ar - connected arduino object.
chanApin - pin used for channel A
chanBpin - pin used for channel B
ppr - count of encoder pulsed required for a full revolution of the encoder.
obj - created rotary encoder object
a = arduino (); enc = rotaryEncoder(a, "d2", "d3", 180);
The rotaryEncoder object has the following public properties:
The parent (arduino) for this device
pins used by this object
Number of pulses used per rotation
See also: arduino.
subref for rotaryEncoder
See also: rotaryEncoder.
Next: Arduino Servo Functions, Previous: Arduino I2C Functions, Up: Function Reference [Contents][Index]