public class BrickletSegmentDisplay4x7 extends Device
Modifier and Type | Class and Description |
---|---|
static interface |
BrickletSegmentDisplay4x7.CounterFinishedListener
This listener is triggered when the counter (see
startCounter(short, short, short, long) ) is
finished. |
class |
BrickletSegmentDisplay4x7.Segments |
Device.Identity
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEVICE_DISPLAY_NAME |
static int |
DEVICE_IDENTIFIER |
static byte |
FUNCTION_GET_COUNTER_VALUE |
static byte |
FUNCTION_GET_IDENTITY |
static byte |
FUNCTION_GET_SEGMENTS |
static byte |
FUNCTION_SET_SEGMENTS |
static byte |
FUNCTION_START_COUNTER |
Constructor and Description |
---|
BrickletSegmentDisplay4x7(java.lang.String uid,
IPConnection ipcon)
Creates an object with the unique device ID \c uid.
|
Modifier and Type | Method and Description |
---|---|
void |
addCounterFinishedListener(BrickletSegmentDisplay4x7.CounterFinishedListener listener)
Adds a CounterFinished listener.
|
int |
getCounterValue()
Returns the counter value that is currently shown on the display.
|
Device.Identity |
getIdentity()
Returns the UID, the UID where the Bricklet is connected to,
the position, the hardware and firmware version as well as the
device identifier.
|
BrickletSegmentDisplay4x7.Segments |
getSegments()
Returns the segment, brightness and color data as set by
setSegments(short[], short, boolean) . |
void |
removeCounterFinishedListener(BrickletSegmentDisplay4x7.CounterFinishedListener listener)
Removes a CounterFinished listener.
|
void |
setSegments(short[] segments,
short brightness,
boolean colon)
The 7-segment display can be set with bitmaps.
|
void |
startCounter(short valueFrom,
short valueTo,
short increment,
long length)
Starts a counter with the *from* value that counts to the *to*
value with the each step incremented by *increment*.
|
getAPIVersion, getResponseExpected, setResponseExpected, setResponseExpectedAll
public static final int DEVICE_IDENTIFIER
public static final java.lang.String DEVICE_DISPLAY_NAME
public static final byte FUNCTION_SET_SEGMENTS
public static final byte FUNCTION_GET_SEGMENTS
public static final byte FUNCTION_START_COUNTER
public static final byte FUNCTION_GET_COUNTER_VALUE
public static final byte FUNCTION_GET_IDENTITY
public BrickletSegmentDisplay4x7(java.lang.String uid, IPConnection ipcon)
public void setSegments(short[] segments, short brightness, boolean colon) throws TinkerforgeException
TinkerforgeException
public BrickletSegmentDisplay4x7.Segments getSegments() throws TinkerforgeException
setSegments(short[], short, boolean)
.TinkerforgeException
public void startCounter(short valueFrom, short valueTo, short increment, long length) throws TinkerforgeException
setSegments(short[], short, boolean)
.TinkerforgeException
public int getCounterValue() throws TinkerforgeException
TinkerforgeException
public Device.Identity getIdentity() throws TinkerforgeException
getIdentity
in class Device
TinkerforgeException
public void addCounterFinishedListener(BrickletSegmentDisplay4x7.CounterFinishedListener listener)
public void removeCounterFinishedListener(BrickletSegmentDisplay4x7.CounterFinishedListener listener)
Copyright © 2020 Tinkerforge GmbH. All rights reserved.