Bluetooth Classic and Low Energy with Arduino IDE and ESP32
Welcome to Another Article...! Today's article will show how to use both Bluetooth Classic and Bluetooth Low Energy which featured in ESP32. Bluetooth feature in ESP32 allow data to be exchanged between it and an Android smartphone. STEP 1: Required Hardware and Software 1. ESP32 Development Board 2. PC (with Arduino IDE) 3. BMP280 sensor (any sensor will suffice) 4. Jumper wires 5. Breadboard 6. Android Smartphone (with Serial Bluetooth Terminal) STEP 2: Circuit Assembling Since BMP280 using I2C protocol, I will be using 4 pins. The pins are shown in picture below. STEP 3: Source Code The code will be shown below. We include 3 libraries, those are "Wire.h" for I2C, "Adafruit_BMP280.h" for BMP280, and "BluetoothSerial.h" for bluetooth. Then initialize variable needed. For the setup, begin the serial and serial Bluetooth. I will be using "ESP32" for its name. Then initialize the BMP280 sensor. For the loop, it will print in Serial Bluetooth ...