From eed70438be985a529838a2561c223970a90ec829 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Mon, 25 Nov 2013 02:20:57 +0100 Subject: [PATCH] =?UTF-8?q?Set=20default=20pin=20to=20=E2=80=9C0000?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BTHID.h | 4 ++-- SPP.h | 4 ++-- examples/Bluetooth/PS3SPP/PS3SPP.ino | 2 +- examples/Bluetooth/SPPMulti/SPPMulti.ino | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BTHID.h b/BTHID.h index e6e168b6..21b92720 100644 --- a/BTHID.h +++ b/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 */ /** diff --git a/SPP.h b/SPP.h index 558f16bc..a38014f0 100644 --- a/SPP.h +++ b/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. diff --git a/examples/Bluetooth/PS3SPP/PS3SPP.ino b/examples/Bluetooth/PS3SPP/PS3SPP.ino index 214ce26a..3f9af1f3 100644 --- a/examples/Bluetooth/PS3SPP/PS3SPP.ino +++ b/examples/Bluetooth/PS3SPP/PS3SPP.ino @@ -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 diff --git a/examples/Bluetooth/SPPMulti/SPPMulti.ino b/examples/Bluetooth/SPPMulti/SPPMulti.ino index af32fd85..3388bd7b 100644 --- a/examples/Bluetooth/SPPMulti/SPPMulti.ino +++ b/examples/Bluetooth/SPPMulti/SPPMulti.ino @@ -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