public abstract static class GPIO.Callbacks extends java.lang.Object implements MetaWearController.ModuleCallbacks
Constructor and Description |
---|
GPIO.Callbacks() |
Modifier and Type | Method and Description |
---|---|
Module |
getModule()
Get the module the notification represents
|
void |
pinChangeDetected(byte pin,
byte state)
Called when the pin has changed state
|
void |
receivedAnalogInputAsAbsReference(byte pin,
short value)
Called when the analog value of a GPIO pin has been read as an absolute reference.
|
void |
receivedAnalogInputAsAbsValue(byte pin,
short value)
Deprecated.
As of v1.6, use
receivedAnalogInputAsAbsReference(byte, short) .
This method was incorrectly named as it does not accurately reflect what the meaning of the data |
void |
receivedAnalogInputAsAbsValue(short value)
Deprecated.
As of v1.4, use
receivedAnalogInputAsAbsValue(byte, short) .
Firmware v1.0.0 on broadcasts the gpio pin along with the analog data |
void |
receivedAnalogInputAsSupplyRatio(byte pin,
short value)
Called when the analog value of a GPIO pin has been read as a supply ratio (ADC value)
|
void |
receivedAnalogInputAsSupplyRatio(short value)
Deprecated.
As of v1.4, use
receivedAnalogInputAsSupplyRatio(byte, short) .
Firmware v1.0.0 on broadcasts the gpio pin along with the analog data |
void |
receivedDigitalInput(byte value)
Deprecated.
As of v1.4, use
receivedDigitalInput(byte, byte) .
Firmware v1.0.0 on broadcasts the gpio pin along with the digital data |
void |
receivedDigitalInput(byte pin,
byte value)
Called when the digital value of a GPIO pin has been read
|
public final Module getModule()
MetaWearController.ModuleCallbacks
getModule
in interface MetaWearController.ModuleCallbacks
Module
@Deprecated public void receivedAnalogInputAsAbsValue(short value)
receivedAnalogInputAsAbsValue(byte, short)
.
Firmware v1.0.0 on broadcasts the gpio pin along with the analog datavalue
- Voltage in mV@Deprecated public void receivedAnalogInputAsAbsValue(byte pin, short value)
receivedAnalogInputAsAbsReference(byte, short)
.
This method was incorrectly named as it does not accurately reflect what the meaning of the datapin
- GPIO pin the data is fromvalue
- Voltage in mVpublic void receivedAnalogInputAsAbsReference(byte pin, short value)
pin
- GPIO pin the data is fromvalue
- Voltage in mV@Deprecated public void receivedAnalogInputAsSupplyRatio(short value)
receivedAnalogInputAsSupplyRatio(byte, short)
.
Firmware v1.0.0 on broadcasts the gpio pin along with the analog datavalue
- 10 bit representation of the voltage where 0 = 0V and 1023 = 3Vpublic void receivedAnalogInputAsSupplyRatio(byte pin, short value)
pin
- GPIO pin the data is fromvalue
- 10 bit representation of the voltage where 0 = 0V and 1023 = 3V@Deprecated public void receivedDigitalInput(byte value)
receivedDigitalInput(byte, byte)
.
Firmware v1.0.0 on broadcasts the gpio pin along with the digital datavalue
- Either 0 or 1public void receivedDigitalInput(byte pin, byte value)
pin
- GPIO pin the data is fromvalue
- 0 for low, 1 for highpublic void pinChangeDetected(byte pin, byte state)
pin
- GPIO pin that was activestate
- State that the pin is now in: 1 = high, 0 = low