mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Updated example for RFCOMM/SPP
This commit is contained in:
parent
d495336442
commit
5ce7cc2b55
1 changed files with 4 additions and 4 deletions
|
@ -4,11 +4,12 @@
|
|||
send me an e-mail: kristianl@tkjelectronics.com
|
||||
*/
|
||||
|
||||
#include <RFCOMM.h>
|
||||
#include <SPP.h>
|
||||
USB Usb;
|
||||
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
|
||||
/* You can create the instance of the class in two ways */
|
||||
RFCOMM SerialBT(&Usb); // This will set the name to the defaults: "Arduino" and the pin to "1234"
|
||||
//RFCOMM SerialBT(&Usb, "Lauszus' Arduino","0000"); // You can also set the name and pin like so
|
||||
SPP SerialBT(&Btd); // This will set the name to the defaults: "Arduino" and the pin to "1234"
|
||||
//SPP SerialBT(&Btd, "Lauszus's Arduino","0000"); // You can also set the name and pin like so
|
||||
|
||||
boolean firstMessage = true;
|
||||
|
||||
|
@ -34,5 +35,4 @@ void loop() {
|
|||
}
|
||||
else
|
||||
firstMessage = true;
|
||||
delay(5);
|
||||
}
|
Loading…
Reference in a new issue