Search in sources :

Example 1 with BlueCoveManager

use of com.neuronrobotics.sdk.wireless.bluetooth.BlueCoveManager in project java-bowler by NeuronRobotics.

the class BluetoothConector method main.

/**
 * @param args
 */
public static void main(String[] args) {
    DyIO dyio;
    BlueCoveManager manager = new BlueCoveManager();
    String[] devices = manager.getAvailableSerialDevices(true);
    System.out.println("Devices: ");
    for (String d : devices) {
        System.out.println(d);
    }
    if (devices.length > 0) {
        System.out.println("Connecting to : " + devices[0]);
        dyio = new DyIO(new BluetoothSerialConnection(manager, devices[0]));
        dyio.connect();
        if (dyio.ping())
            System.out.println("All OK!");
    }
    System.exit(0);
}
Also used : BluetoothSerialConnection(com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection) BlueCoveManager(com.neuronrobotics.sdk.wireless.bluetooth.BlueCoveManager) DyIO(com.neuronrobotics.sdk.dyio.DyIO)

Aggregations

DyIO (com.neuronrobotics.sdk.dyio.DyIO)1 BlueCoveManager (com.neuronrobotics.sdk.wireless.bluetooth.BlueCoveManager)1 BluetoothSerialConnection (com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection)1