Package lejos.hardware
Interface Brick
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AudiogetAudio()return a Audio object which can be used to access the device's audio playbackLocalBTDevicegetBluetoothDevice()Get the local Bluetooth deviceGraphicsLCDgetGraphicsLCD()Get graphics access to the LCDKeygetKey(java.lang.String name)Get access to a specific Key (aka Button)KeysgetKeys()Get access to the keys (buttons)LEDgetLED()Get access to the LEDjava.lang.StringgetName()Get he name of the brickPortgetPort(java.lang.String portName)Return a port object for the request port name.PowergetPower()return a battery object which can be used to obtain battery voltage etc.TextLCDgetTextLCD()Get text access to the LCD using the default fontTextLCDgetTextLCD(Font f)Get text access to the LCD using a specified fontjava.lang.StringgetType()Get the type of brick, e.g.VideogetVideo()LocalWifiDevicegetWifiDevice()Get the local Wifi devicebooleanisLocal()Test whether the brick is a local onevoidsetDefault()Set this brick as the default one for static methods
-
-
-
Method Detail
-
getPort
Port getPort(java.lang.String portName)
Return a port object for the request port name. This allows access to the hardware associated with the specified port.- Parameters:
portName- The name of port- Returns:
- the request port
-
getPower
Power getPower()
return a battery object which can be used to obtain battery voltage etc.- Returns:
- A battery object
-
getAudio
Audio getAudio()
return a Audio object which can be used to access the device's audio playback- Returns:
- A Audio device
-
getVideo
Video getVideo()
-
getTextLCD
TextLCD getTextLCD()
Get text access to the LCD using the default font- Returns:
- the text LCD
-
getTextLCD
TextLCD getTextLCD(Font f)
Get text access to the LCD using a specified font- Parameters:
f- the font- Returns:
- the text LCD
-
getGraphicsLCD
GraphicsLCD getGraphicsLCD()
Get graphics access to the LCD- Returns:
- the graphics LCD
-
isLocal
boolean isLocal()
Test whether the brick is a local one- Returns:
- true iff brick is local
-
getType
java.lang.String getType()
Get the type of brick, e.g. "EV3", "NXT", "BrickPi"- Returns:
- the brick type
-
getName
java.lang.String getName()
Get he name of the brick- Returns:
- the name
-
getBluetoothDevice
LocalBTDevice getBluetoothDevice()
Get the local Bluetooth device- Returns:
- the local Bluetooth device
-
getWifiDevice
LocalWifiDevice getWifiDevice()
Get the local Wifi device- Returns:
- the local Wifi device
-
setDefault
void setDefault()
Set this brick as the default one for static methods
-
getKeys
Keys getKeys()
Get access to the keys (buttons)- Returns:
- an implementation of the Keys interface
-
getKey
Key getKey(java.lang.String name)
Get access to a specific Key (aka Button)- Parameters:
name- the key name- Returns:
- an implementation of the Key interface
-
getLED
LED getLED()
Get access to the LED- Returns:
- an implementation of the LED interface
-
-