RoboJDETM v2.0

com.ridgesoft.intellibrain
Class IntelliBrainIrReceiver

java.lang.Object
  extended by com.ridgesoft.intellibrain.IntelliBrainIrReceiver
All Implemented Interfaces:
IrReceiver

public class IntelliBrainIrReceiver
extends Object
implements IrReceiver

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 implements the IrReceiver interface, which enables it to receive input from a infrared remote control. To do so, use this class in conjunction with a class such as the SonyIrRemote class.

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.

See Also:
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

initialize

public void initialize(int startMin,
                       int startMax,
                       int shortMin,
                       int threshold,
                       int longMax,
                       int numberOfBits,
                       boolean invertBits,
                       boolean reverseBits)
Initializes the infrared receiver.

The infrared receiver supports infrared protocols which transmit data by transmitting a long start pulse followed by short and long data bit pulses.

Specified by:
initialize in interface IrReceiver
Parameters:
startMin - minimum start bit time in microseconds
startMax - maximum start bit time in microseconds
shortMin - minimum short pulse duration in microseconds
threshold - duration threshold distinguishing a short pulse from a long pulse
longMax - maximum long pulse duration in microseconds
numberOfBits - number of data bits following the start bit
invertBits - true if short pulses are ones, false if short pulses are zeros
reverseBits - true if data is transmitted least significant bit first

isReceiving

public boolean isReceiving()
Sample this digital input from the IR demodulator.

Returns:
true if the input bit is set, otherwise false

read

public int read()
Reads the next received value from the receiver if data is available. This method returns -1 if there is no data.

Specified by:
read in interface IrReceiver
Returns:
value received since the last call or -1 if no new data has been received

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com