#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED) If there is an error associated with it then ensure its proper enablement.
![one wire library one wire library](https://download.mikroe.com/documents/compilers/mikroc/pic/help/img/schemes/scheme_ow.gif)
Then, we will ensure whether the Bluetooth is enabled or not.
#One wire library serial
Through this library we will use the functionalities needed for two-way serial communication. We will first include the BluetoothSerial library. Serial.println("The device started, now you can pair it with bluetooth!") SerialBT.begin("ESP32test") //Bluetooth device name #error Bluetooth is not enabled! Please run `make menuconfig` to and enable it A new file will open which will contain the following program code.Open your Arduino IDE and click on File > Examples > BluetoothSerial > SerialtoSerialBT.
![one wire library one wire library](https://i2.wp.com/randomnerdtutorials.com/wp-content/uploads/2019/07/ds18b20_esp8266_multiple_bb.png)
It will demonstrate how two devices can be connected through serial communication. This is already available in the Bluetooth Serial library. We will use an example sketch from the Arduino IDE. Before proceeding further, make sure you have the ESP32 add on installed in your IDE.
#One wire library install
Install App ESP32 Bluetooth Transmit Data to Andriod AppĪrduino IDE does not come with the ESP32 installed by default. Go to the Play Store and download the application by the name: Serial Bluetooth terminal. We will also use a Bluetooth terminal application to pair the two devices together. So, make sure you have an android phone at hand.
![one wire library one wire library](http://invent.module143.com/wp-content/uploads/2017/12/temperature-probe-1.png)
Throughout this guide, we will use an android smartphone that will connect to another device which will be our ESP32 development board. In this tutorial, we will focus on Classic Bluetooth which is designed for a connection-oriented one-to-one two-way data transfer. Apart from Wi-Fi, the ESP32 comes with ICs which allow both kinds of Bluetooth connections, Classic and BLE (Bluetooth Low Energy). Having a range of approximately 100m for data transfer, it uses a standard serial protocol for its communication which makes it extremely easy to configure with the ESP32 module. It is the generic Bluetooth protocol that is used short-range transmission of data between linked devices wirelessly.