|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ridgesoft.intellibrain.IntelliBrainShaftEncoder
public class IntelliBrainShaftEncoder
IntelliBrain specific quadrature shaft encoder reader.
Each shaft encoder uses a pair of digital inputs to implement a quadrature shaft encoder. The two pins should be connected to two digital sensors that generate a quadrature signal. The two sensors should be 90 degrees out of phase. If the counter counts in the opposite direction of what is expected, swap the two inputs.
Shaft encoders on the IntelliBrain robotics controller are sampled once per millisecond. Therefore, the maximum counting rate which is supported is 500 counts per second.
Method Summary | |
---|---|
int |
getCounts()
Reads the current shaft encoder counter value. |
int |
getRate()
Read the current rate of the encoder counter. |
void |
initialize(IntelliBrainDigitalIO port1,
IntelliBrainDigitalIO port2)
Initializes the encoder. |
String |
toString()
Returns a String with the decimal value of the encoder counter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait |
Method Detail |
---|
public int getCounts()
getCounts
in interface ShaftEncoder
public int getRate()
Shaft encoders on the IntelliBrain robotics controller are sampled once per millisecond. Therefore, the maximum rate which is supported is 500 counts per second. The maximum value this function can return is 7.
getRate
in interface ShaftEncoder
public void initialize(IntelliBrainDigitalIO port1, IntelliBrainDigitalIO port2)
port1
- digital input port for the one quadrature signalport2
- digital input port for the other quadrature signalpublic String toString()
toString
in class Object
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |