com.sensorcon.sensordrone
Class CoreDrone

java.lang.Object
  extended by com.sensorcon.sensordrone.CoreDrone
Direct Known Subclasses:
Drone

public abstract class CoreDrone
extends java.lang.Object

The core class for the Sensordrone. This class allows you to interact with your Sensordrone and its sensor. This is an abstract class that is fairly implementation independent. It has to be extended by a class that is implementation dependent; all connection methods would be set up there.

Since:
1.1.1

Field Summary
 boolean adcStatus
          The current enabled/disabled status for measuring the ADC.
 float altitude_Feet
          The measured altitude in feet.
 float altitude_Meters
          The measured altitude in meters.
 boolean altitudeStatus
          The enabled/disabled status for measuring altitude.
 java.lang.String apiLibraryVersion
          The version of the API Library being used
 float batteryVoltage_Volts
          The measured value of the Sensordrone's battery voltage in Volts.
 float capacitance_femtoFarad
          The measured capacitance in femtoFarad.
 boolean capacitanceStatus
          The current enabled/disabled status for measuring capacitance.
static boolean DEBUG
          A boolean to toggle debug messages.
 DroneEventObject deConnected
          Used to notify the a connection was established
 DroneEventObject deDisconnected
          Used to notify that the device was disconnected
 int externalADC
          The measured ADC value from the external connector.
 float externalADC_Volts
          The measured ADC value from the external connector converted to Volts.
 int firmwareRevision
          The Sensordrone's firmware revision number.
 int firmwareVersion
          The Sensordrone's firmware version.
 int hardwareVersion
          The Sensordrone's hardware version.
 float humidity_Percent
          The measured relative percent humidity.
 boolean humidityStatus
          The enabled/disabled status for measuring humidity.
 float irTemperature_Celsius
          The measured IR temperature in Celsius.
 float irTemperature_Fahrenheit
          The measured IR temperature in Fahrenheit.
 float irTemperature_Kelvin
          The measured IR temperature in Kelvin.
 boolean irTemperatureStatus
          The current enabled/disabled status for measuring IR temperature.
 boolean isCharging
          A logical variable to indicate if the Sensordrone is charging or not.
 boolean isConnected
          Indicates if the Sensordrone is currently connected or not.
 java.lang.String lastMAC
          The MAC address of the last Sensordrone connected to via btConnect().
 float oxidizingGas_Ohm
          The measured oxidizing gas value (Ohm).
 boolean oxidizingGasStatus
          The current enabled/disable status for measuring oxidizing gas.
 float precisionGas_ppmCarbonMonoxide
          The measured gas value corresponding to parts per million of carbon monoxide.
 boolean precisionGasStatus
          The current enabled/disabled status
 float pressure_Atmospheres
          The measured pressure in Atmospheres.
 float pressure_Pascals
          The measured pressure in Pascals.
 float pressure_Torr
          The measured pressure in Torr.
 boolean pressureStatus
          The enabled/disabled status for measuring pressure.
static int QS_TYPE_ADC
          The quickSystem value to trigger External ADC properties.
static int QS_TYPE_ALTITUDE
          The quickSystem value to trigger Altitude properties.
static int QS_TYPE_CAPACITANCE
          The quickSystem value to trigger Capacitance properties.
static int QS_TYPE_HUMIDITY
          The quickSystem value to trigger Humidity properties.
static int QS_TYPE_IR_TEMPERATURE
          The quickSystem value to trigger IR Temperature properties.
static int QS_TYPE_OXIDIZING_GAS
          The quickSystem value to trigger Oxidizing Gas properties.
static int QS_TYPE_PRECISION_GAS
          The quickSystem value to trigger Precision Gas properties.
static int QS_TYPE_PRESSURE
          The quickSystem value to trigger Pressure properties.
static int QS_TYPE_REDUCING_GAS
          The quickSystem value to trigger Reducing Gas properties.
static int QS_TYPE_RGBC
          The quickSystem value to trigger RGBC properties.
static int QS_TYPE_TEMPERATURE
          The quickSystem value to trigger Temperature properties.
 float reducingGas_Ohm
          The measured reducing gas value (Ohm).
 boolean reducingGasStatus
          The current enabled/disable status for measuring reducing gas.
 float rgbcBlueChannel
          The measured blue channel of RGBC.
 float rgbcClearChannel
          The measured clear channel of RGBC.
 float rgbcColorTemperature
          The measured color temperature in Kelvin for broadband light
 float rgbcGreenChannel
          The measured green channel of RGBC.
 float rgbcLux
          The measured illuminance in Lux for broadband light
 float rgbcRedChannel
          The measured red channel of RGBC.
 boolean rgbcStatus
          The enabled/disabled status for measuring RGBC.
 float temperature_Celsius
          The measured temperature in Celsius.
 float temperature_Fahrenheit
          The measured temperature in Fahrenheit.
 float temperature_Kelvin
          The measured temperature in Kelvin.
 boolean temperatureStatus
          The enabled/disabled status for measuring Temperature
 java.io.PipedInputStream uartInputStream
          An input stream for the external UART.
 java.nio.ByteBuffer uartReadBuffer
          A ByteBuffer containing the contents from the last UART Read.
 java.io.PipedInputStream usbUartInputStream
          An inputstream for the usb UART.
 java.nio.ByteBuffer usbUartReadBuffer
          A ByteBuffer containing the contents from the last USB UART Read.
 
Constructor Summary
CoreDrone()
           
 
Method Summary
 boolean checkIfCharging()
          Checks if the Sensordrone is currently charging or not.
 void customEventNotify()
          A method to trigger a Custom Event in the DroneEventListener
 void customStatusNotifty()
          A method to trigger a Custom Status in the DroneStatusListener
 boolean disableADC()
          Disables measuring the ADC.
 boolean disableAltitude()
          Disables measuring of altitude.
 boolean disableCapacitance()
          Disables measuring capacitance.
 boolean disableHumidity()
          Disables measuring of humidity.
 boolean disableIRTemperature()
          Disables measuring of IR temperature.
 boolean disableOxidizingGas()
          Disables measuring of oxidizing gas.
 boolean disablePrecisionGas()
          Disables the measuring of gas with the precision gas sensor.
 boolean disablePressure()
          Disables measuring of pressure.
 boolean disableReducingGas()
          Disables measuring of reducing gas.
 boolean disableRGBC()
          Disables measuring RGBC.
 boolean disableTemperature()
          Disables measuring of temperature
 boolean enableADC()
          Enables measuring the ADC.
 boolean enableAltitude()
          Enables measuring of altitude.
 boolean enableCapacitance()
          Enables measuring capacitance.
 boolean enableHumidity()
          Enables measuring of humidity.
 boolean enableIRTemperature()
          Enables measuring of IR temperature.
 boolean enableOxidizingGas()
          Enables measuring of oxidizing gas.
 boolean enablePrecisionGas()
          Enables the measuring of gas with the precision gas sensor.
 boolean enablePressure()
          Enables measuring of pressure.
 boolean enableReducingGas()
          Enables measuring of reducing gas.
 boolean enableRGBC()
          Enables measuring RGBC Color and illuminance.
 boolean enableTemperature()
          Enables measuring of temperature.
 boolean measureAltitude()
          Measure altitude.
 boolean measureBatteryVoltage()
          Measures the Sensordrone's current battery voltage level.
 boolean measureCapacitance()
          Measures capacitance.
 boolean measureExternalADC()
          Measures the external ADC pin.
 boolean measureHumidity()
          Measures the humidity.
 boolean measureIRTemperature()
          Measures IR temperature.
 boolean measureOxidizingGas()
          Measures oxidizing gas.
 boolean measurePrecisionGas()
          Measures gas with the precision gas sensor.
 boolean measurePressure()
          Measures the current pressure.
 boolean measureReducingGas()
          Measures reducing gas.
 boolean measureRGBC()
          Measures RGBC channels, color temperature, and illuminance.
 boolean measureTemperature()
          Measures the current temperature.
 boolean quickDisable(int QS_TYPE)
          The Disable part of the quickSystem

The will call the appropriate disable method for the designated sensor QS_TYPE

 boolean quickEnable(int QS_TYPE)
          The Enable part of the quickSystem

The will call the appropriate enable method for the designated sensor QS_TYPE

 boolean quickMeasure(int QS_TYPE)
          The Measure part of the quickSystem

The will call the appropriate measure method for the designated sensor QS_TYPE

 boolean quickStatus(int QS_TYPE)
          The Status part of the quickSystem

The will call the appropriate status method for the designated sensor QS_TYPE

 void registerDroneEventListener(DroneEventListener listener)
          Deprecated. Please use registerDroneListener
 void registerDroneListener(java.util.EventListener listener)
          The new, preferred way to register a DroneStatusListener, DroneEventListener, or DroneEventHandler
 void registerDroneStatusListener(DroneStatusListener listener)
          Deprecated. Please use registerDroneListener
 boolean setBaudRate_115200()
          Sets the baud rate of the UART pins to 115200.
 boolean setBaudRate_19200()
          Sets the baud rate of the UART pins to 19200.
 boolean setBaudRate_2400()
          Sets the baud rate of the UART pins to 2400.
 boolean setBaudRate_38400()
          Sets the baud rate of the UART pins to 38400.
 boolean setBaudRate_9600()
          Sets the baud rate of the UART pins to 9600.
 boolean setLEDs(int RED, int GREEN, int BLUE)
          Set the Sensordrone's left and right LED color concurrently.
 boolean setLeftLED(int RED, int GREEN, int BLUE)
          Set the Sensordrone's left LED color.
 boolean setRightLED(int RED, int GREEN, int BLUE)
          Set the Sensordrone's right LED color.
 boolean statusOfADC()
          Checks the current enabled/disabled status for measuring the ADC.
 boolean statusOfAltitude()
          Checks the current enabled/disabled status of measuring altitude.
 boolean statusOfCapacitance()
          Checks the enabled/disabled status for measuring capacitance.
 boolean statusOfHumidity()
          Checks the current enabled/disabled status for measuring humidity.
 boolean statusOfIRTemperature()
          Checks the current enabled/disabled status for measuring IR temperature.
 boolean statusOfOxidizingGas()
          Checks the current enabled/disabled status for measuring oxidizing gas.
 boolean statusOfPrecisionGas()
          Checks the current enabled/disabled status for measuring (precision) gas.
 boolean statusOfPressure()
          Checks the current enabled/disabled status for measuring pressure.
 boolean statusOfReducingGas()
          Checks the current enabled/disabled status for measuring reducing gas.
 boolean statusOfRGBC()
          Checks the current enabled/disabled status for measuring RGBC.
 boolean statusOfTemperature()
          Checks the current enabled/disabled status of measuring temperature
 boolean uartRead()
          Performs a UART read from the external UART pins.
 boolean uartWrite(byte[] data)
          Performs a UART write to the external UART pins.
 void unregisterDroneEventListener(DroneEventListener listener)
          Deprecated. please use unregisterDroneListener
 void unregisterDroneListener(java.util.EventListener listener)
          The new, preferred way to unregister a DroneStatusListener, DroneEventListener, or DroneEventHandler
 void unregisterDroneStatusListener(DroneStatusListener listener)
          Deprecated. Please use unregisterDroneListener
 boolean usbUartRead()
          Performs a UART read from the USB UART.
 boolean usbUartWrite(byte[] data)
          Performs a USB UART write to the USB UART.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
A boolean to toggle debug messages. This is not modifiable by users.

See Also:
Constant Field Values

apiLibraryVersion

public java.lang.String apiLibraryVersion
The version of the API Library being used


hardwareVersion

public int hardwareVersion
The Sensordrone's hardware version. This is updated on connect and is set to 0 when not connected.


firmwareVersion

public int firmwareVersion
The Sensordrone's firmware version. This is updated on connect and is set to 0 when not connected.


firmwareRevision

public int firmwareRevision
The Sensordrone's firmware revision number. This is updated on connect and is set to 0 when not connected.


deConnected

public DroneEventObject deConnected
Used to notify the a connection was established


deDisconnected

public DroneEventObject deDisconnected
Used to notify that the device was disconnected


QS_TYPE_ALTITUDE

public static final int QS_TYPE_ALTITUDE
The quickSystem value to trigger Altitude properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_CAPACITANCE

public static final int QS_TYPE_CAPACITANCE
The quickSystem value to trigger Capacitance properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_HUMIDITY

public static final int QS_TYPE_HUMIDITY
The quickSystem value to trigger Humidity properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_IR_TEMPERATURE

public static final int QS_TYPE_IR_TEMPERATURE
The quickSystem value to trigger IR Temperature properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_OXIDIZING_GAS

public static final int QS_TYPE_OXIDIZING_GAS
The quickSystem value to trigger Oxidizing Gas properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_PRECISION_GAS

public static final int QS_TYPE_PRECISION_GAS
The quickSystem value to trigger Precision Gas properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_PRESSURE

public static final int QS_TYPE_PRESSURE
The quickSystem value to trigger Pressure properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_REDUCING_GAS

public static final int QS_TYPE_REDUCING_GAS
The quickSystem value to trigger Reducing Gas properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_RGBC

public static final int QS_TYPE_RGBC
The quickSystem value to trigger RGBC properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_TEMPERATURE

public static final int QS_TYPE_TEMPERATURE
The quickSystem value to trigger Temperature properties.

Since:
1.1.1
See Also:
Constant Field Values

QS_TYPE_ADC

public static final int QS_TYPE_ADC
The quickSystem value to trigger External ADC properties.

Since:
1.1.1
See Also:
Constant Field Values

temperature_Celsius

public float temperature_Celsius
The measured temperature in Celsius.

Since:
1.1.1

temperature_Fahrenheit

public float temperature_Fahrenheit
The measured temperature in Fahrenheit.

Since:
1.1.1

temperature_Kelvin

public float temperature_Kelvin
The measured temperature in Kelvin.

Since:
1.1.1

temperatureStatus

public boolean temperatureStatus
The enabled/disabled status for measuring Temperature

Since:
1.1.1

humidity_Percent

public float humidity_Percent
The measured relative percent humidity.

Since:
1.1.1

humidityStatus

public boolean humidityStatus
The enabled/disabled status for measuring humidity.

Since:
1.1.1

pressure_Atmospheres

public float pressure_Atmospheres
The measured pressure in Atmospheres.

Since:
1.1.1

pressure_Pascals

public float pressure_Pascals
The measured pressure in Pascals.

Since:
1.1.1

pressure_Torr

public float pressure_Torr
The measured pressure in Torr.

Since:
1.1.1

pressureStatus

public boolean pressureStatus
The enabled/disabled status for measuring pressure.

Since:
1.1.1

altitude_Feet

public float altitude_Feet
The measured altitude in feet.

Since:
1.1.1

altitude_Meters

public float altitude_Meters
The measured altitude in meters.

Since:
1.1.1

altitudeStatus

public boolean altitudeStatus
The enabled/disabled status for measuring altitude.

Since:
1.1.1

rgbcRedChannel

public float rgbcRedChannel
The measured red channel of RGBC.

Since:
1.1.1

rgbcGreenChannel

public float rgbcGreenChannel
The measured green channel of RGBC.

Since:
1.1.1

rgbcBlueChannel

public float rgbcBlueChannel
The measured blue channel of RGBC.

Since:
1.1.1

rgbcClearChannel

public float rgbcClearChannel
The measured clear channel of RGBC.

Since:
1.1.1

rgbcLux

public float rgbcLux
The measured illuminance in Lux for broadband light

Since:
1.1.1

rgbcColorTemperature

public float rgbcColorTemperature
The measured color temperature in Kelvin for broadband light

Since:
1.1.1

rgbcStatus

public boolean rgbcStatus
The enabled/disabled status for measuring RGBC.

Since:
1.1.1

capacitance_femtoFarad

public float capacitance_femtoFarad
The measured capacitance in femtoFarad.

Since:
1.1.1

capacitanceStatus

public boolean capacitanceStatus
The current enabled/disabled status for measuring capacitance.

Since:
1.1.1

oxidizingGas_Ohm

public float oxidizingGas_Ohm
The measured oxidizing gas value (Ohm).

Since:
1.1.1

reducingGas_Ohm

public float reducingGas_Ohm
The measured reducing gas value (Ohm).

Since:
1.1.1

oxidizingGasStatus

public boolean oxidizingGasStatus
The current enabled/disable status for measuring oxidizing gas.

Since:
1.1.1

reducingGasStatus

public boolean reducingGasStatus
The current enabled/disable status for measuring reducing gas.

Since:
1.1.1

precisionGas_ppmCarbonMonoxide

public float precisionGas_ppmCarbonMonoxide
The measured gas value corresponding to parts per million of carbon monoxide.

Since:
1.1.1

precisionGasStatus

public boolean precisionGasStatus
The current enabled/disabled status

Since:
1.1.1

irTemperature_Celsius

public float irTemperature_Celsius
The measured IR temperature in Celsius.

Since:
1.1.1

irTemperature_Fahrenheit

public float irTemperature_Fahrenheit
The measured IR temperature in Fahrenheit.

Since:
1.1.1

irTemperature_Kelvin

public float irTemperature_Kelvin
The measured IR temperature in Kelvin.

Since:
1.1.1

irTemperatureStatus

public boolean irTemperatureStatus
The current enabled/disabled status for measuring IR temperature.

Since:
1.1.1

uartReadBuffer

public java.nio.ByteBuffer uartReadBuffer
A ByteBuffer containing the contents from the last UART Read.

Since:
1.1.1

uartInputStream

public java.io.PipedInputStream uartInputStream
An input stream for the external UART.

Since:
1.1.2

usbUartReadBuffer

public java.nio.ByteBuffer usbUartReadBuffer
A ByteBuffer containing the contents from the last USB UART Read.

Since:
1.1.1

usbUartInputStream

public java.io.PipedInputStream usbUartInputStream
An inputstream for the usb UART.

Since:
1.1.2

externalADC

public int externalADC
The measured ADC value from the external connector. 12 bit resolution to from 0 to 3.0 Volts

Since:
1.1.1

externalADC_Volts

public float externalADC_Volts
The measured ADC value from the external connector converted to Volts.

Since:
1.1.1

adcStatus

public boolean adcStatus
The current enabled/disabled status for measuring the ADC.

Since:
1.1.1

batteryVoltage_Volts

public float batteryVoltage_Volts
The measured value of the Sensordrone's battery voltage in Volts. Updated by the method getBatteryVoltage().

Since:
1.1.1

isCharging

public boolean isCharging
A logical variable to indicate if the Sensordrone is charging or not. Updated by the method isCharging().


lastMAC

public java.lang.String lastMAC
The MAC address of the last Sensordrone connected to via btConnect(). Note, if you are connected, then it is the current MAC address.

Since:
1.1.1

isConnected

public boolean isConnected
Indicates if the Sensordrone is currently connected or not. This is software controlled! It is set true upon successful completion of a connect command, and false upon a successful disconnect command. If communication is lost, or hangs, a disconnect routine is also called which will update this.

Since:
1.1.1
Constructor Detail

CoreDrone

public CoreDrone()
Method Detail

quickEnable

public boolean quickEnable(int QS_TYPE)
The Enable part of the quickSystem

The will call the appropriate enable method for the designated sensor QS_TYPE

Parameters:
QS_TYPE -
Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

quickDisable

public boolean quickDisable(int QS_TYPE)
The Disable part of the quickSystem

The will call the appropriate disable method for the designated sensor QS_TYPE

Parameters:
QS_TYPE -
Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

quickMeasure

public boolean quickMeasure(int QS_TYPE)
The Measure part of the quickSystem

The will call the appropriate measure method for the designated sensor QS_TYPE

Parameters:
QS_TYPE -
Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

quickStatus

public boolean quickStatus(int QS_TYPE)
The Status part of the quickSystem

The will call the appropriate status method for the designated sensor QS_TYPE

Parameters:
QS_TYPE -
Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enableTemperature

public boolean enableTemperature()
Enables measuring of temperature.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disableTemperature

public boolean disableTemperature()
Disables measuring of temperature

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfTemperature

public boolean statusOfTemperature()
Checks the current enabled/disabled status of measuring temperature

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureTemperature

public boolean measureTemperature()
Measures the current temperature.

Updates temperature_Celsius, temperature_Fahrenheit, and temperature_Kelvin.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enableHumidity

public boolean enableHumidity()
Enables measuring of humidity.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disableHumidity

public boolean disableHumidity()
Disables measuring of humidity.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfHumidity

public boolean statusOfHumidity()
Checks the current enabled/disabled status for measuring humidity.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureHumidity

public boolean measureHumidity()
Measures the humidity. Updates humidity_Percent.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enablePressure

public boolean enablePressure()
Enables measuring of pressure.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disablePressure

public boolean disablePressure()
Disables measuring of pressure.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfPressure

public boolean statusOfPressure()
Checks the current enabled/disabled status for measuring pressure.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measurePressure

public boolean measurePressure()
Measures the current pressure.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enableAltitude

public boolean enableAltitude()
Enables measuring of altitude.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disableAltitude

public boolean disableAltitude()
Disables measuring of altitude.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfAltitude

public boolean statusOfAltitude()
Checks the current enabled/disabled status of measuring altitude.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureAltitude

public boolean measureAltitude()
Measure altitude. Updates altitude_Feet, and altitude_Meters.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enableRGBC

public boolean enableRGBC()
Enables measuring RGBC Color and illuminance.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disableRGBC

public boolean disableRGBC()
Disables measuring RGBC.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfRGBC

public boolean statusOfRGBC()
Checks the current enabled/disabled status for measuring RGBC.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureRGBC

public boolean measureRGBC()
Measures RGBC channels, color temperature, and illuminance.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enableCapacitance

public boolean enableCapacitance()
Enables measuring capacitance.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disableCapacitance

public boolean disableCapacitance()
Disables measuring capacitance.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfCapacitance

public boolean statusOfCapacitance()
Checks the enabled/disabled status for measuring capacitance.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureCapacitance

public boolean measureCapacitance()
Measures capacitance.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enableOxidizingGas

public boolean enableOxidizingGas()
Enables measuring of oxidizing gas.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disableOxidizingGas

public boolean disableOxidizingGas()
Disables measuring of oxidizing gas.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enableReducingGas

public boolean enableReducingGas()
Enables measuring of reducing gas.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disableReducingGas

public boolean disableReducingGas()
Disables measuring of reducing gas.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfOxidizingGas

public boolean statusOfOxidizingGas()
Checks the current enabled/disabled status for measuring oxidizing gas.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfReducingGas

public boolean statusOfReducingGas()
Checks the current enabled/disabled status for measuring reducing gas.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureOxidizingGas

public boolean measureOxidizingGas()
Measures oxidizing gas.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureReducingGas

public boolean measureReducingGas()
Measures reducing gas.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enablePrecisionGas

public boolean enablePrecisionGas()
Enables the measuring of gas with the precision gas sensor.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disablePrecisionGas

public boolean disablePrecisionGas()
Disables the measuring of gas with the precision gas sensor.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfPrecisionGas

public boolean statusOfPrecisionGas()
Checks the current enabled/disabled status for measuring (precision) gas.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measurePrecisionGas

public boolean measurePrecisionGas()
Measures gas with the precision gas sensor.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

enableIRTemperature

public boolean enableIRTemperature()
Enables measuring of IR temperature.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disableIRTemperature

public boolean disableIRTemperature()
Disables measuring of IR temperature.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfIRTemperature

public boolean statusOfIRTemperature()
Checks the current enabled/disabled status for measuring IR temperature.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureIRTemperature

public boolean measureIRTemperature()
Measures IR temperature.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

setLeftLED

public boolean setLeftLED(int RED,
                          int GREEN,
                          int BLUE)
Set the Sensordrone's left LED color.

Parameters:
RED - 0-255
GREEN - 0-255
BLUE - 0-255
Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

setRightLED

public boolean setRightLED(int RED,
                           int GREEN,
                           int BLUE)
Set the Sensordrone's right LED color.

Parameters:
RED - 0-255
GREEN - 0-255
BLUE - 0-255
Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

setLEDs

public boolean setLEDs(int RED,
                       int GREEN,
                       int BLUE)
Set the Sensordrone's left and right LED color concurrently.

Parameters:
RED - 0-255
GREEN - 0-255
BLUE - 0-255
Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

setBaudRate_2400

public boolean setBaudRate_2400()
Sets the baud rate of the UART pins to 2400.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

setBaudRate_9600

public boolean setBaudRate_9600()
Sets the baud rate of the UART pins to 9600.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

setBaudRate_38400

public boolean setBaudRate_38400()
Sets the baud rate of the UART pins to 38400.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

setBaudRate_19200

public boolean setBaudRate_19200()
Sets the baud rate of the UART pins to 19200.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

setBaudRate_115200

public boolean setBaudRate_115200()
Sets the baud rate of the UART pins to 115200.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

uartRead

public boolean uartRead()
Performs a UART read from the external UART pins.

Clears and updates uartReadBuffer.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

uartWrite

public boolean uartWrite(byte[] data)
Performs a UART write to the external UART pins. There is a limit of 32 bytes per uartWrite.

Parameters:
data - The data to be sent.
Returns:
Returns true on successful communication to the CoreDrone. Will return false if sending more than 32 bytes at a time.
Since:
1.1.1

usbUartRead

public boolean usbUartRead()
Performs a UART read from the USB UART. Operates at baud rate 9600. Clears and updates usbUartBuffer.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

usbUartWrite

public boolean usbUartWrite(byte[] data)
Performs a USB UART write to the USB UART. There is a limit of 32 bytes per usbUartWrite. Operates at baud rate 9600.

Parameters:
data - The data to be sent.
Returns:
Returns true on successful communication to the CoreDrone. Will return false if more than 32 bytes are sent at a time.
Since:
1.1.1

enableADC

public boolean enableADC()
Enables measuring the ADC.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

disableADC

public boolean disableADC()
Disables measuring the ADC.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

statusOfADC

public boolean statusOfADC()
Checks the current enabled/disabled status for measuring the ADC.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureExternalADC

public boolean measureExternalADC()
Measures the external ADC pin.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

measureBatteryVoltage

public boolean measureBatteryVoltage()
Measures the Sensordrone's current battery voltage level. Triggers a low battery status event (DroneStatusEventListener) if the measured voltage is below 3.25V.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

checkIfCharging

public boolean checkIfCharging()
Checks if the Sensordrone is currently charging or not.

Returns:
Returns true on successful communication to the CoreDrone.
Since:
1.1.1

customEventNotify

public void customEventNotify()
A method to trigger a Custom Event in the DroneEventListener

Since:
1.1.1

customStatusNotifty

public void customStatusNotifty()
A method to trigger a Custom Status in the DroneStatusListener

Since:
1.1.1

registerDroneEventListener

public void registerDroneEventListener(DroneEventListener listener)
Deprecated. Please use registerDroneListener

Register the DroneEventListener

Parameters:
listener -
Since:
1.1.1

unregisterDroneEventListener

public void unregisterDroneEventListener(DroneEventListener listener)
Deprecated. please use unregisterDroneListener

Unregister the DroneEventListener

Parameters:
listener -
Since:
1.1.1

registerDroneStatusListener

public void registerDroneStatusListener(DroneStatusListener listener)
Deprecated. Please use registerDroneListener

Register the DroneStatusListener

Parameters:
listener -
Since:
1.1.1

unregisterDroneStatusListener

public void unregisterDroneStatusListener(DroneStatusListener listener)
Deprecated. Please use unregisterDroneListener

Unregister the DroneStatusListener

Parameters:
listener -
Since:
1.1.1

registerDroneListener

public void registerDroneListener(java.util.EventListener listener)
The new, preferred way to register a DroneStatusListener, DroneEventListener, or DroneEventHandler

Parameters:
listener -

unregisterDroneListener

public void unregisterDroneListener(java.util.EventListener listener)
The new, preferred way to unregister a DroneStatusListener, DroneEventListener, or DroneEventHandler

Parameters:
listener -