Description
set the PIN code of bluetooth module
Syntax
btPIN(int x)
Parameters
x : the PIN code of bluetooth
Usages
btPIN(1234)
Examples in arduino
#include "AppGosu.h"
AppGosu app;
int LED = 13;
void setup() {
pinMode(LED,OUTPUT);
digitalWrite(LED, LOW); // LED off
app.start();
app.nop(); app.nop(); app.nop();
delay(1000);
app.btPIN(1234);
delay(300);
}
void loop() {
digitalWrite(LED, LOW); // LED off
delay(700);
digitalWrite(LED, HIGH); // LED on
delay(700);
}
// Pin code range
// 1000 ~ 9999
//
// 1. open RX(D0)
// 2. Upload
// 3. Press reset
by AppGosu
-----------------------------------------
No comments:
Post a Comment