|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ridgesoft.intellibrain.IntelliBrainIrReceiver
public class IntelliBrainIrReceiver
Class to interface to the infrared receiver on the IntelliBrain main board.
The infrared receiver senses infrared light modulated at 38 kHz, which is the frequency many TV and home electronics remote controls use.
The infrared receiver can be used to:
This class also provides a method to detect if the IR receiver is currently receiving a 38 kHz modulated infrared signal. This can be used to detect objects by sensing reflections of modulated infrared light transmitted from a 38 kHz modulated infrared LED.
The IntelliBrain expansion board includes a modulated LED and provides for two modulated infrared LEDs to be added and controlled using digital ports 17 and 18.
By using modulated infrared signals, the receiver is much less susceptible to interference from ambient infrared light.
SonyIrRemote
,
Mvp1IrRemote
,
IntelliBrain.getIrReceiver()
,
IntelliBrain.getExpansionIrLed()
,
IntelliBrainExpDigitalIO
,
IntelliBrainExpDigitalIO.setModulatedOutput()
Method Summary | |
---|---|
void |
initialize(int startMin,
int startMax,
int shortMin,
int threshold,
int longMax,
int numberOfBits,
boolean invertBits,
boolean reverseBits)
Initializes the infrared receiver. |
boolean |
isReceiving()
Sample this digital input from the IR demodulator. |
int |
read()
Reads the next received value from the receiver if data is available. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Method Detail |
---|
public void initialize(int startMin, int startMax, int shortMin, int threshold, int longMax, int numberOfBits, boolean invertBits, boolean reverseBits)
The infrared receiver supports infrared protocols which transmit data by transmitting a long start pulse followed by short and long data bit pulses.
initialize
in interface IrReceiver
startMin
- minimum start bit time in microsecondsstartMax
- maximum start bit time in microsecondsshortMin
- minimum short pulse duration in microsecondsthreshold
- duration threshold distinguishing a short pulse from a long pulselongMax
- maximum long pulse duration in microsecondsnumberOfBits
- number of data bits following the start bitinvertBits
- true if short pulses are ones, false if short pulses are zerosreverseBits
- true if data is transmitted least significant bit firstpublic boolean isReceiving()
public int read()
read
in interface IrReceiver
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |