mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Set default pin to “0000”
This commit is contained in:
parent
253b43c06f
commit
eed70438be
4 changed files with 6 additions and 6 deletions
4
BTHID.h
4
BTHID.h
|
@ -72,9 +72,9 @@ public:
|
|||
* Constructor for the BTHID class.
|
||||
* @param p Pointer to the BTD class instance.
|
||||
* @param pair Set this to true in order to pair with the device. If the argument is omitted then it will not pair with it. One can use ::PAIR to set it to true.
|
||||
* @param pin Write the pin to BTD#btdPin. If argument is omitted, then "1234" will be used.
|
||||
* @param pin Write the pin to BTD#btdPin. If argument is omitted, then "0000" will be used.
|
||||
*/
|
||||
BTHID(BTD *p, bool pair = false, const char *pin = "1234");
|
||||
BTHID(BTD *p, bool pair = false, const char *pin = "0000");
|
||||
|
||||
/** @name BluetoothService implementation */
|
||||
/**
|
||||
|
|
4
SPP.h
4
SPP.h
|
@ -96,9 +96,9 @@ public:
|
|||
* Constructor for the SPP class.
|
||||
* @param p Pointer to BTD class instance.
|
||||
* @param name Set the name to BTD#btdName. If argument is omitted, then "Arduino" will be used.
|
||||
* @param pin Write the pin to BTD#btdPin. If argument is omitted, then "1234" will be used.
|
||||
* @param pin Write the pin to BTD#btdPin. If argument is omitted, then "0000" will be used.
|
||||
*/
|
||||
SPP(BTD *p, const char* name = "Arduino", const char* pin = "1234");
|
||||
SPP(BTD *p, const char *name = "Arduino", const char *pin = "0000");
|
||||
|
||||
/**
|
||||
* Used to provide Boolean tests for the class.
|
||||
|
|
|
@ -19,7 +19,7 @@ USB Usb;
|
|||
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
|
||||
|
||||
/* You can create the instances of the bluetooth services in two ways */
|
||||
SPP SerialBT(&Btd); // This will set the name to the defaults: "Arduino" and the pin to "1234"
|
||||
SPP SerialBT(&Btd); // This will set the name to the defaults: "Arduino" and the pin to "0000"
|
||||
//SPP SerialBTBT(&Btd,"Lauszus's Arduino","0000"); // You can also set the name and pin like so
|
||||
PS3BT PS3(&Btd); // This will just create the instance
|
||||
//PS3BT PS3(&Btd,0x00,0x15,0x83,0x3D,0x0A,0x57); // This will also store the bluetooth address - this can be obtained from the dongle when running the sketch
|
||||
|
|
|
@ -18,7 +18,7 @@ uint8_t buffer[50];
|
|||
|
||||
void setup() {
|
||||
for (uint8_t i = 0; i < length; i++)
|
||||
SerialBT[i] = new SPP(&Btd); // This will set the name to the default: "Arduino" and the pin to "1234" for all connections
|
||||
SerialBT[i] = new SPP(&Btd); // This will set the name to the default: "Arduino" and the pin to "0000" for all connections
|
||||
|
||||
Serial.begin(115200);
|
||||
while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
|
||||
|
|
Loading…
Reference in a new issue