//I am getting an error while comparing strings and printing another string. Here's the program
#include <SoftwareSerial.h>
#include <VirtualWire.h>
char incomingByte = 0;
String a;
String spd="speedlimit50";
String spd1="speedlimit30";
void setup(){
// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
Serial.begin(9600);
}
void loop(){
while(Serial.available()){
a=Serial.readString();
Serial.println(a);
}
}
int b=50;
int ret=strcmp(a, b);
void send (char *spd){
if(ret==0){
vw_send((uint8_t *)spd, strlen(spd));
vw_wait_tx(); // Wait until the whole message is gone
}
}