How to make the while loop stop when writing "Begin o Start" on serial

i want to input commands and store in variables until i write ready or go.

Serial.print ("Ready: ");
while(Serial.available() == “Yes”){
go = true;
if (go = true);
Serial.println (“GO”);

can somebody help me to fix the code to keep reading variables and input until write Yes or ready or go

while(Serial.available() == "Yes")

Serial.available() returns the number of bytes available to read, not a string so this test will never be true

go = true;
if (go = true);

I am as certain as I can be that once you have set go to true then it will be true

For advice on receiving and dealing with strings take a look at Serial input basics - updated

while(Serial.available() == "Yes"){

The available() method returns the number of characters to be read. 0 or 7 or 12 or 63 will NEVER equal "Yes".

go = true;
if (go = true);

Since you just assigned true to go, it is silly to (incorrectly) compare go to true.

Look at the (Serial Input Basics - updated - Introductory Tutorials - Arduino Forum) tutorial.

sorry for my lack of knowledge i just need a way to do it, a way of making the program wait until i input a comand to begin.

Any idea?

Any idea?

Start by reading this Serial input basics - updated

Writing an effective program to get user input is not a trivial exercise. Often the user input code is longer than the rest of the program.

There is a simple user input example in Planning and Implementing a Program


If your program truly has nothing useful to do during user input then you can use code like...

  Serial.print("Enter a number >");
  while(!Serial.available());  //wait forever for a user input
  int i = Serial.parseInt();

But even the slow Arduinos are running 16 million instructions per second waiting for your slow fingers to reach the keyboard. There is always something useful to be done, such as checking the motors didn't drive past their limits or blinking the blinky lights to let you know it is waiting for you. So anything but the simplest school project should use Robin's method which does not tie up the processor waiting.