20 lines
390 B
C++
20 lines
390 B
C++
#include "BluetoothSerial.h"
|
|
|
|
BluetoothSerial SerialBT;
|
|
|
|
void setup() {
|
|
Serial.begin(115200);
|
|
SerialBT.begin("ESP32test"); //Name des ESP32
|
|
Serial.println("Der ESP32 ist bereit. Verbinde dich nun über Bluetooth.");
|
|
}
|
|
|
|
void loop() {
|
|
if (Serial.available()) {
|
|
SerialBT.write(Serial.read());
|
|
}
|
|
if (SerialBT.available()) {
|
|
Serial.write(SerialBT.read());
|
|
}
|
|
delay(25);
|
|
}
|