From 425df109ca5acb578f1f49664c451442186fed1d Mon Sep 17 00:00:00 2001 From: BigTire Date: Wed, 16 Nov 2022 17:18:17 +0100 Subject: [PATCH] Bluetooth connection esp32. --- .../bluetooth_connect.ino | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) rename bluetooth_connect.ino => bluetooth_connect/bluetooth_connect.ino (95%) diff --git a/bluetooth_connect.ino b/bluetooth_connect/bluetooth_connect.ino similarity index 95% rename from bluetooth_connect.ino rename to bluetooth_connect/bluetooth_connect.ino index 168ea9d..fd7ed41 100644 --- a/bluetooth_connect.ino +++ b/bluetooth_connect/bluetooth_connect.ino @@ -92,11 +92,6 @@ String sendData="Hi from esp32!\n"; void loop() { if(! SerialBT.isClosed() && SerialBT.connected()) { - if( SerialBT.write((const uint8_t*) sendData.c_str(),sendData.length()) != sendData.length()) { - Serial.println("tx: error"); - } else { - Serial.printf("tx: %s",sendData.c_str()); - } if(SerialBT.available()) { Serial.print("rx: "); while(SerialBT.available()) { @@ -111,4 +106,4 @@ void loop() { Serial.println("not connected"); } delay(1000); -} +} \ No newline at end of file