|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ridgesoft.intellibrain.IntelliBrain
public class IntelliBrain
This class serves as the main point of access to features of the IntelliBrain robotics controller.
IntelliBrain and IntelliBrain 2 robotics controllers are based on the Atmel ATmega128 microcontroller. On the IntelliBrain 2 robotics controller, the ATmega128 ports are used as follows:
Port A
Port B
Port C
Port D
Port E
Port F
Port G
Port A
Port B
Port C
Port D
Port E
Port F
Port G
Field Summary | |
---|---|
static int |
MODEL_IntelliBrain
|
static int |
MODEL_IntelliBrain_2
|
Method Summary | |
---|---|
static IntelliBrainAnalogInput |
getAnalogInput(int portNumber)
Gets the IntelliBrainAnalogInput object for the specified input port. |
static DigitalInput |
getBatteryInput()
Gets the IntelliBrain controller battery digital input. |
static Speaker |
getBuzzer()
Gets the Speaker object for the buzzer. |
static SerialPort |
getCom1()
Gets the SerialPort object for COM1. |
static SerialPort |
getCom2()
Gets the SerialPort object for COM2. |
static EEPROM |
getCpuEEPROM()
Gets the EEPROM object for the CPU EEPROM. |
static IntelliBrainDigitalIO |
getDigitalIO(int portNumber)
Gets the IntelliBrainDigitalIO object for the specified digital port. |
static EEPROM |
getExpansionEEPROM()
Gets the EEPROM object for the expansion board EEPROM. |
static LED |
getFaultLed()
Gets the LED object for the fault LED (red) on the main board. |
static I2CMaster |
getI2CMaster()
Gets the I2CMaster object for the I2C bus. |
static LED |
getIrLed()
Gets the LED object for the infrared LED on the IntelliBrain 2 controller or the expansion board on the original IntelliBrain controller. |
static IntelliBrainIrReceiver |
getIrReceiver()
Gets the IrRreceiver object for the infrared receiver on the main board. |
static Display |
getLcdDisplay()
Gets the Display object for the LCD. |
static int |
getModel()
Gets the model number of the IntelliBrain controller. |
static Motor2 |
getMotor(int motor)
Gets the motor object for a particular motor. |
static OutputStream |
getOutputStream()
Gets the OutputStream for the LCD. |
static Servo |
getServo(int servo)
Gets the Servo object for the specified servo. |
static IntelliBrainShaftEncoder |
getShaftEncoder(int encoder)
Gets the IntelliBrainShaftEncoder object for a particular quadrature shaft encoder. |
static PushButton |
getStartButton()
Gets the PushButton object for the START button. |
static LED |
getStatusLed()
Gets the LED object for the status LED (green) on the main board. |
static PushButton |
getStopButton()
Gets the PushButton object for the STOP button. |
static AnalogInput |
getThumbWheel()
Gets the AnalogInput object for the thumbwheel. |
static LED |
getUserLed(int ledNumber)
Gets the LED object for the specified LED on the IntelliBrain 2 board or the expansion board on the original IntelliBrain controller. |
static boolean |
isExpansionBoardPresent()
Indicates if the IntelliBrain expansion board is present. |
static void |
setTerminateOnStop(boolean terminateOnStop)
Configures whether the virtual machine terminates the program when the STOP button is pressed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Field Detail |
---|
public static final int MODEL_IntelliBrain
public static final int MODEL_IntelliBrain_2
Method Detail |
---|
public static IntelliBrainAnalogInput getAnalogInput(int portNumber)
An analog input port may alternatively be used as a digital input.
Analog port 3 is used to multiplex the expansion analog ports, therefore, it cannot be used directly if the expansion board is present.
Analog ports 1, 2 on the main board and 8 - 11 on the expansion board have a .1uF capacitor attached for noise reduction.
Analog ports 12 - 15 on the expansion board allow the software selectable pull-up on analog port 3 (multiplexing port) to be enabled while sampling. The pull-up is only enabled while the port is being sampled, so it will only be useful for inputs that have very low capacitance. The software pull-up is not supported on ports 8 - 11 because of the capacitors installed on those port.
portNumber
- the number of the analog port
public static DigitalInput getBatteryInput()
The input will return true if the battery is meeting the current power demands and false otherwise.
The J2 jumper (under the LCD) must be inserted to connect the low battery indicator to the IO3 port. When J2 is inserted, IO3 must not be used as a sensor input.
public static Speaker getBuzzer()
The IntelliBrain buzzer can play frequencies in the range of 120 Hz to 9.3 kHz. The granularity of steps between tones that can be played increases with frequency and is about 2 kHz at the highest frequencies.
public static SerialPort getCom1()
This method will cause communication between the virtual machine and the host computer to be disabled, giving your program exclusive access to the COM1 port.
public static SerialPort getCom2()
public static EEPROM getCpuEEPROM()
This CPU EEPROM provides 4000 bytes of persistent storage.
Note: 96 bytes of EEPROM are reserved for internal use and are not accessible to applications. This leaves 4000 bytes for applications.
public static IntelliBrainDigitalIO getDigitalIO(int portNumber)
The port is configured as an input by default.
Pulse input measurement is supported on ports 3 through 6.
portNumber
- the number of the digital port
public static EEPROM getExpansionEEPROM()
The expansion board EEPROM provides 64K bytes of storage.
public static LED getFaultLed()
public static I2CMaster getI2CMaster()
The I2CMaster object provides the interface to communicate with devices attached to any I2C port.
public static LED getIrLed()
This LED is modulated at 38 kHz. When it is set to on, it toggles on and off at 38 kHz.
public static IntelliBrainIrReceiver getIrReceiver()
public static Display getLcdDisplay()
The Display object may be used to print to a specific line or character position. Alternatively, the getOutputStream method can be used to print scrolling text to the LCD.
public static int getModel()
public static Motor2 getMotor(int motor)
motor
- number of the motor (1 - 4)
public static OutputStream getOutputStream()
This can be used in conjuntion with a PrintStream object to print scrolling output to the LCD.
The LCD can be addressed in line and character mode by using the getLcdDisplay method.
public static Servo getServo(int servo)
servo
- number of the sero (1 - 8).
public static IntelliBrainShaftEncoder getShaftEncoder(int encoder)
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 1000 counts per second.
On the IntelliBrain robotics controller, the encoder rate value is updated every 128 milliseconds. The maximum value the getRate method can return is 7.
encoder
- number of the encoder (1 to 4)public static PushButton getStartButton()
public static LED getStatusLed()
public static PushButton getStopButton()
public static AnalogInput getThumbWheel()
public static LED getUserLed(int ledNumber)
By default the LEDs are motor status indicators.
Calling this method disconnects the LED from the motor control so it may be used for other purposes.
ledNumber
- 1 through 4 on IntelliBrain 2, 1 through 8 on
IntelliBrain expansion board, numbered left to right
public static boolean isExpansionBoardPresent()
public static void setTerminateOnStop(boolean terminateOnStop)
The initial setting is true.
terminateOnStop
- true if the program should terminate when the STOP button is
pressed
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |