30 lines
545 B
Arduino
30 lines
545 B
Arduino
|
const byte LED = 13;
|
||
|
const byte BTPWR = 12;
|
||
|
String nombreBT= "FznBTS";
|
||
|
char velocidad ='4';//9600
|
||
|
String pass="11111";
|
||
|
|
||
|
void setup() {
|
||
|
pinMode(LED,OUTPUT);
|
||
|
pinMode(BTPWR, OUTPUT);
|
||
|
digitalWrite(LED, LOW);
|
||
|
digitalWrite(BTPWR, HIGH);
|
||
|
Serial.begin(9600);
|
||
|
Serial.print("AT");
|
||
|
delay(1000);
|
||
|
Serial.print("AT+NAME");
|
||
|
Serial.print(nombreBT);
|
||
|
delay(1000);
|
||
|
Serial.print("AT+BAUD");
|
||
|
Serial.print(velocidad);
|
||
|
delay(1000);
|
||
|
Serial.print("AT+PIN");
|
||
|
Serial.print(pass);
|
||
|
delay(1000);
|
||
|
digitalWrite(LED,HIGH);
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
|
||
|
}
|