i'm having some issues with the BluetoothSerial library, i'm pretty sure my code should be okay, but when i compile it, it says that SerialBT was not declared in this scope
here's my bluetooth configuration code: (my other code basically just runs those functions)
#include <BluetoothSerial.h>
void BT_setup(){
// put your setup code here, to run once:
Serial.begin(115200);
BluetoothSerial SerialBT;
SerialBT.begin("Luna", true);
}
void connection(){
if(SerialBT.connect()){
lcd.setCursor(3, 1);
lcd.print("Connected!");
int connection_status = 1;
}
else{
lcd.setCursor(0, 1);
lcd.print("Connection error");
}
}
void connection() has the same problem as BT_setup()
the problem it spits out is:
C:\Users\Luna\Documents\Arduino\lcd_and_soundboard\BTSerial_config.ino: In function 'void connection()':
C:\Users\Luna\Documents\Arduino\lcd_and_soundboard\BTSerial_config.ino:16:6: error: 'SerialBT' was not declared in this scope
if(SerialBT.connect()){
^~~~~~~~
C:\Users\Luna\Documents\Arduino\lcd_and_soundboard\BTSerial_config.ino:16:6: note: suggested alternative: 'Serial2'
if(SerialBT.connect()){
^~~~~~~~
Serial2
Multiple libraries were found for "BluetoothSerial.h"
Used: C:\Users\Luna\Documents\Arduino\libraries\BluetoothSerial
Not used: C:\Users\Luna\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.16\libraries\BluetoothSerial
exit status 1
Compilation error: 'SerialBT' was not declared in this scope