Dear all
what am trying to do is transmitting the code through IR LED which is being sent from laptop to B.T shield using SSCOM3.2
while(Bt.available() && Bt.read() == 0 ) {
Bt.print("Transmitting");
while (Bt.available() == 0) {
}
delay(50);
while (Bt.available() > 0 ) {
readString += (char)Bt.read();
}
value = readString.toInt();
Serial.println(value);
Bt.println(value); //Serial.println
for (int i = 0; i < 3; i++) {
irsend.sendNEC(value,32);
delay(40);
}
readString = "";
My condition is simple. if the first character the shield receive is being 0 then enter the transmitting mode, go in a while loop till u finish reading the whole string "bt.available> 0" save it to variable "value" then transmit "value". if the 1st character isn't 0 then go to the receiving mode and start detecting what is being send. ( the receiving works perfectly )
my problem now is that SCOM3.2 doesn't allow me to send and the IDE 1.0.5 lags when trying to connect to the Bluetooth port. so am n't sure if it's transmitting problem issue or SSCOM3.2?
any help is appreciated, also if u would like to modify it please do
please note that this code used to work fine using the serial port.