I am running into a problem with my Arduino. I want to be able to open up my Serial monitor on the Arduino IDE and be able to type something like hello, and have the Arduino respond with a set response for that so called command so I could create a chat bot so to speak.
Here is my code, could someone please help me?
byte byteRead;
void setup()
{
Serial.begin(9600);
}
void loop()
{
if (Serial.available()) {
byteRead = Serial.read();
if(byteRead =="hello") {
Serial.println("hello freind");
}
}