Hi
I have my bluetooth working (can send messages and they appear in the Arduino monitor..)
baud rate is 115200
But the Led won't light on when sending value"1" ... ?
led is correctly plugged in.
Any Ideas
Thanks a lot
Philippe
#include <SoftwareSerial.h>
SoftwareSerial HMSoft(6,7);
const char LED = 9 ;
String messageRecu;
void setup() {
Serial.begin(115200);
HMSoft.begin(115200);
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);
}
void loop()
{
while(HMSoft.available())
{
delay(10);
char c = HMSoft.read();
messageRecu += c;
}
if (messageRecu.length() >0)
{
Serial.println(messageRecu);
if (messageRecu == "1")
{digitalWrite(LED, HIGH);}
if (messageRecu == "0")
{digitalWrite(LED, LOW);}
messageRecu="";
}
}