public class BrickletAnalogOut extends Device
Device.Identity
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEVICE_DISPLAY_NAME |
static int |
DEVICE_IDENTIFIER |
static byte |
FUNCTION_GET_IDENTITY |
static byte |
FUNCTION_GET_MODE |
static byte |
FUNCTION_GET_VOLTAGE |
static byte |
FUNCTION_SET_MODE |
static byte |
FUNCTION_SET_VOLTAGE |
static short |
MODE_100K_TO_GROUND |
static short |
MODE_1K_TO_GROUND |
static short |
MODE_500K_TO_GROUND |
static short |
MODE_ANALOG_VALUE |
Constructor and Description |
---|
BrickletAnalogOut(java.lang.String uid,
IPConnection ipcon)
Creates an object with the unique device ID \c uid.
|
Modifier and Type | Method and Description |
---|---|
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.
|
short |
getMode()
Returns the mode as set by
setMode(short) . |
int |
getVoltage()
Returns the voltage as set by
setVoltage(int) . |
void |
setMode(short mode)
Sets the mode of the analog value.
|
void |
setVoltage(int voltage)
Sets the voltage.
|
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_VOLTAGE
public static final byte FUNCTION_GET_VOLTAGE
public static final byte FUNCTION_SET_MODE
public static final byte FUNCTION_GET_MODE
public static final byte FUNCTION_GET_IDENTITY
public static final short MODE_ANALOG_VALUE
public static final short MODE_1K_TO_GROUND
public static final short MODE_100K_TO_GROUND
public static final short MODE_500K_TO_GROUND
public BrickletAnalogOut(java.lang.String uid, IPConnection ipcon)
public void setVoltage(int voltage) throws TinkerforgeException
setMode(short)
).TinkerforgeException
public int getVoltage() throws TinkerforgeException
setVoltage(int)
.TinkerforgeException
public void setMode(short mode) throws TinkerforgeException
setVoltage(int)
is applied)
* 1: 1k Ohm resistor to ground
* 2: 100k Ohm resistor to ground
* 3: 500k Ohm resistor to ground
Setting the mode to 0 will result in an output voltage of 0 V. You can jump
to a higher output voltage directly by calling setVoltage(int)
.TinkerforgeException
public short getMode() throws TinkerforgeException
setMode(short)
.TinkerforgeException
public Device.Identity getIdentity() throws TinkerforgeException
getIdentity
in class Device
TinkerforgeException
Copyright © 2020 Tinkerforge GmbH. All rights reserved.