Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4924

Unwanted looping in Arduino code!!

$
0
0
Hello AACs ..

I am totally new to Arduino, just bear with me please ...
I was trying to code a simple arduino game that can read the resultant number from the player's mind, simple and pure mathematics which will always yield the number "3". Problem is, I would like to hang the code until the user types "ok" then presses ENTER in the serial monitor window, but after the program reaches the line :
Code (Text):
  1. Serial.println("Type ""ok"" and press ENTER when you've already choosen a number . . ....
Unwanted looping in Arduino code!!

Viewing all articles
Browse latest Browse all 4924

Trending Articles