Not able to send IR OR other value to Android / PC through SerialEvent or loop

Hi, Not able to send IR OR other value to Android / PC through SerialEvent or loop

That is right you can’t do that.

Hi ,

Im working on this project Arduino uno r3 where i want to send dynamic values generated by different sensors and send it through HC-06 bluetooth to android app .

It sends data from android/PC to ardunio board but does’nt send it back. Here’s the code

#include <SoftwareSerial.h>

char a = “abc”;

void setup() {

Serial.begin(9600);

}

void loop() {

}

void serialEvent() {
while (Serial.available()) {

char inChar = (char)Serial.read();

// Serial.write(inChar); // inChar writing through serial works fine

Serial.write(a); //this isnt working

}

}

Please HELP me understand … im not from IOT background…

char a = "abc";

What does the compiler have to say about that?

Please remember to use code tags when posting code, and don't start a new thread when you already have one on the same subject.