String my = "this is red light i need space" , si, read1 , tem="t";
char text, tm="t";
int len;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println();
char buf[32] = "this is red light i need space";
Serial.print("Char array: ");
Serial.println(buf);
String s = String(buf);
Serial.print("String: ");
Serial.println(s);
if (my == s) {
Serial.println("equal ");
}
}
void loop() {
if (Serial.available() > 0) {
read1 = Serial.readString();
text = read1.charAt(2);
Serial.println(text);
if(text==tm){Serial.println("temp");}
len = read1.toInt();
Serial.println(len);
if (len == 25000) {
Serial.println("equal");
}
}
}
No comments:
Post a Comment