String a="";
void setup() {
Serial.begin(9600);
// put your setup code here, to run once:
}
void loop() {
while(a==""){
a=Serial.readString();
}
if (a.indexOf("hello")>=0){
Serial.println("hello whats your name?");
}
if (a.indexOf("ahmed")>=0){
Serial.println("hello ahmed nice to meet you \nmy name is comp tell me how old are you");
}
if (a.indexOf("years")>=0){
Serial.println("very nice");
}
a="";
// put your main code here, to run repeatedly:
}