esp_arduino_stuff
This commit is contained in:
19
bluetooth_esp32/bluetooth_esp32.ino
Normal file
19
bluetooth_esp32/bluetooth_esp32.ino
Normal file
@@ -0,0 +1,19 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user