diff --git a/01_bluetoothSerial/01_bluetoothSerial.ino b/01_bluetoothSerial/01_bluetoothSerial.ino new file mode 100644 index 0000000..9618b5b --- /dev/null +++ b/01_bluetoothSerial/01_bluetoothSerial.ino @@ -0,0 +1,20 @@ +#include +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); +} diff --git a/README.md b/README.md index 0b56662..52753c1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ # ive3_2425 -Malý repozitář pro ukládáni programu pro práci s ESP32 \ No newline at end of file +Malý repozitář pro ukládáni programu pro práci s ESP32 + + +## Používaný software + +- [Arduino IDE](https://www.arduino.cc/en/software) + + +### Arduino IDE + +- potřeba nainstalovat si **ESP32 by Espressif** Board knihovnu +- Používáme *ESP32 Dev module* nebo *DOIT ESP32 DEVKIT V1* \ No newline at end of file