Class Drone

  extended by com.sensorcon.sensordrone.CoreDrone
      extended by

public class Drone
extends CoreDrone

The Drone class allows you to control a Sensordrone and interact with the on-board sensors via Android

See Also:

Field Summary
Fields inherited from class com.sensorcon.sensordrone.CoreDrone
adcStatus, altitude_Feet, altitude_Meters, altitudeStatus, apiLibraryVersion, batteryVoltage_Volts, capacitance_femtoFarad, capacitanceStatus, DEBUG, deConnected, deDisconnected, externalADC, externalADC_Volts, firmwareRevision, firmwareVersion, hardwareVersion, humidity_Percent, humidityStatus, irTemperature_Celsius, irTemperature_Fahrenheit, irTemperature_Kelvin, irTemperatureStatus, isCharging, isConnected, lastMAC, oxidizingGas_Ohm, oxidizingGasStatus, precisionGas_ppmCarbonMonoxide, precisionGasStatus, pressure_Atmospheres, pressure_Pascals, pressure_Torr, pressureStatus, QS_TYPE_ADC, QS_TYPE_ALTITUDE, QS_TYPE_CAPACITANCE, QS_TYPE_HUMIDITY, QS_TYPE_IR_TEMPERATURE, QS_TYPE_OXIDIZING_GAS, QS_TYPE_PRECISION_GAS, QS_TYPE_PRESSURE, QS_TYPE_REDUCING_GAS, QS_TYPE_RGBC, QS_TYPE_TEMPERATURE, reducingGas_Ohm, reducingGasStatus, rgbcBlueChannel, rgbcClearChannel, rgbcColorTemperature, rgbcGreenChannel, rgbcLux, rgbcRedChannel, rgbcStatus, temperature_Celsius, temperature_Fahrenheit, temperature_Kelvin, temperatureStatus, uartInputStream, uartReadBuffer, usbUartInputStream, usbUartReadBuffer
Constructor Summary
          Our default Constructor
Method Summary
 boolean btConnect(java.lang.String MAC)
          Connect to a Sensordrone via Bluetooth.
 boolean disconnect()
          Disconnect from a Sensordrone.
 void disconnectNow()
          Disconnects from the Sensordrone (run from the thread the method was called in).
Methods inherited from class com.sensorcon.sensordrone.CoreDrone
checkIfCharging, customEventNotify, customStatusNotifty, disableADC, disableAltitude, disableCapacitance, disableHumidity, disableIRTemperature, disableOxidizingGas, disablePrecisionGas, disablePressure, disableReducingGas, disableRGBC, disableTemperature, enableADC, enableAltitude, enableCapacitance, enableHumidity, enableIRTemperature, enableOxidizingGas, enablePrecisionGas, enablePressure, enableReducingGas, enableRGBC, enableTemperature, measureAltitude, measureBatteryVoltage, measureCapacitance, measureExternalADC, measureHumidity, measureIRTemperature, measureOxidizingGas, measurePrecisionGas, measurePressure, measureReducingGas, measureRGBC, measureTemperature, quickDisable, quickEnable, quickMeasure, quickStatus, registerDroneEventListener, registerDroneListener, registerDroneStatusListener, setBaudRate_115200, setBaudRate_19200, setBaudRate_2400, setBaudRate_38400, setBaudRate_9600, setLEDs, setLeftLED, setRightLED, statusOfADC, statusOfAltitude, statusOfCapacitance, statusOfHumidity, statusOfIRTemperature, statusOfOxidizingGas, statusOfPrecisionGas, statusOfPressure, statusOfReducingGas, statusOfRGBC, statusOfTemperature, uartRead, uartWrite, unregisterDroneEventListener, unregisterDroneListener, unregisterDroneStatusListener, usbUartRead, usbUartWrite
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Drone()
Our default Constructor

Method Detail


public boolean btConnect(java.lang.String MAC)
Connect to a Sensordrone via Bluetooth.

MAC - The MAC address of the Sensordrone to connect to. The MAC address should be formatted as XX:XX:XX:XX:XX:XX (2 digits, colon, 2 digits, colon, ...).

Older versions of Android (pre-Gingerbread) will likely require a pin-code to connect. This pin code is 0000 (four zeros).

Returns true upon successful connection; false otherwise.


public boolean disconnect()
Disconnect from a Sensordrone.

Returns true upon successful disconnection.


public void disconnectNow()
Disconnects from the Sensordrone (run from the thread the method was called in). Useful if the job queue is overloaded, not responding, etc... This is mainly used as a "force" disconnect, as it will cause a race condition between disconnecting and any jobs are in the queue. If you have ever disconnected from the Sensordrone Control app, and wondered why the LED lights were still on --- this is why.