Malý repozitář pro ukládáni programu pro práci s ESP32
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
563 B

#include <BluetoothSerial.h>
String device_name = "ESP-VasePrijmeni";
BluetoothSerial SerialBT;
void setup() {
Serial.begin(115200);
SerialBT.begin(device_name);
//SerialBT.deleteAllBondedDevices(); //ten vymaže všechny spárované zařízení (vhodne pro "čistý start")
Serial.printf("Zarizeni ma jmeno \"%s\" a ma zapnuty Bluetooth. \n Najděte si zařízeni.",device_name.c_str());
}
void loop() {
if(Serial.available()){
SerialBT.write(Serial.read());
}
if(SerialBT.available()) {
Serial.write(SerialBT.read());
}
delay(20);
}