connect() - 1scale1/sweetbt GitHub Wiki

Description

Tries to establish a connection to the given MAC address device.

Syntax

connect( MAC );

Parameters

MAC: The unique MAC address of the BlueTooth device to connect with

Returns

none

Examples

import se.onescaleone.sweetblue.*;

SweetBlue bt;

void setup(){
  bt = new SweetBlue( this );
  bt.connect( "00:00:00:00:00:00" );
}

void draw(){
}

Note

The connection runs asynchronously, which means that establishing a connection might take a few seconds. During this time no writing or reading should be done to the device.

See also...

pinMode()