My Bluetooth module isn't working and im pretty sure it has to do with the code because when I connect the module to any apps it works and the light stops blinking however the data that gets sent over to my serial monitor just says "?" it gives me a question mark instead of a 1 or a 0
My Bluetooth module isn't working and im pretty sure it has to do with the code because when I connect the module to any apps it works and the light stops blinking however the data that gets sent over to my serial monitor just says "?" it gives me a question mark instead of a 1 or a 0
int led = 13;
char data = 0;
void setup()
{
Serial.begin(9600);
pinMode(led, OUTPUT);
}
void loop()
{
if(Serial.available() > 0)
{
data = Serial.read();
Serial.print(data);
Serial.print("\n");
if(data == '1')
digitalWrite(led, HIGH);
else if(data == '0')
digitalWrite(led, LOW);
}
}