Components / BluetoothSerial

Dependents:   Shield_Seeed_Bluetooth

Fork of BluetoothSerial by Yihui Xiong

Embed: (wiki syntax)

« Back to documentation index

BluetoothSerial Class Reference

BluetoothSerial Class Reference

The BluetoothSerial class. More...

#include <BluetoothSerial.h>

Public Member Functions

void setup ()
 Setup bluetooth module(serial port baud rate)
void setup (int baud)
 Setup bluetooth module(serial port baud rate)
void master (const char *name, uint8_t autoc=0)
 Set bluetooth module as a master.
void slave (const char *name, uint8_t autoc=0, uint8_t oaut=1)
 Set bluetooth module as a slave.
void pin (int pin=0)
 Set pin for the bluetooth connection.
void pin (const char *pin)
 Set pin for the bluetooth connection.
int connect (const char *name)
 Inquire bluetooth devices and connect the specified device.
int connect ()
 Make the bluetooth module inquirable and available to connect, used in slave mode.

Detailed Description

The BluetoothSerial class.

Definition at line 17 of file BluetoothSerial.h.


Member Function Documentation

int connect ( const char *  name )

Inquire bluetooth devices and connect the specified device.

Definition at line 84 of file BluetoothSerial.cpp.

int connect (  )

Make the bluetooth module inquirable and available to connect, used in slave mode.

Definition at line 50 of file BluetoothSerial.cpp.

void master ( const char *  name,
uint8_t  autoc = 0 
)

Set bluetooth module as a master.

Parameters:
namedevice name
autoc1: auto-connection, 0 not

Definition at line 22 of file BluetoothSerial.cpp.

void pin ( int  pin = 0 )

Set pin for the bluetooth connection.

Parameters:
pinpin string

Definition at line 38 of file BluetoothSerial.cpp.

void pin ( const char *  pin )

Set pin for the bluetooth connection.

Parameters:
pinpin string

Definition at line 44 of file BluetoothSerial.cpp.

void setup (  )

Setup bluetooth module(serial port baud rate)

Definition at line 11 of file BluetoothSerial.cpp.

void setup ( int  baud )

Setup bluetooth module(serial port baud rate)

Parameters:
baudbaud rate

Definition at line 16 of file BluetoothSerial.cpp.

void slave ( const char *  name,
uint8_t  autoc = 0,
uint8_t  oaut = 1 
)

Set bluetooth module as a slave.

Parameters:
namedevice name
autoc1: auto-connection, 0 not
oaut1: permit paired device to connect, 0: not

Definition at line 30 of file BluetoothSerial.cpp.