Package lejos.hardware.sensor
Class MindsensorsBTSense
- java.lang.Object
-
- lejos.hardware.sensor.MindsensorsBTSense
-
public class MindsensorsBTSense extends java.lang.ObjectSupport for the Mindsensors BTSense application- Author:
- Lawrie Griffiths
-
-
Constructor Summary
Constructors Constructor Description MindsensorsBTSense()Connection to the BTSense application and identify device as EV3
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetReply(int offset)SensorModegetSensorMode(char sensorType)Get a SensorMode object for a specific sensor mode and request data from phonevoidprocessData()Process data from the phone applicationvoidsendCmd(java.lang.String cmd)Send a command to the phone application, with a transaction id
-
-
-
Method Detail
-
getSensorMode
public SensorMode getSensorMode(char sensorType) throws java.io.IOException, java.lang.InterruptedException
Get a SensorMode object for a specific sensor mode and request data from phone- Parameters:
sensorType- the single character sensor mode identifier- Returns:
- the SensorMode implementation
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
sendCmd
public void sendCmd(java.lang.String cmd) throws java.io.IOExceptionSend a command to the phone application, with a transaction id- Parameters:
cmd-- Throws:
java.io.IOException
-
getReply
public int getReply(int offset) throws java.io.IOException- Throws:
java.io.IOException
-
processData
public void processData() throws java.io.IOExceptionProcess data from the phone application- Throws:
java.io.IOException
-
-