i am fairly new to arduino, and i am having a great time learning all the new and exciting things you can do with it, however i am having a great deal
of trouble communicating with my serial port via my code.
I would like to write a code that will present the following in the serial port
" Please enter the number of cars you have"
" Please enter your age"
“Please enter a random number”
After each statement, the user inputs a number
I have set up my code , so that i am using arduinos string to int function. However for some reason, when i run the code it prints the first question, allows me to anser it, then prints the second question, allows me to answers it, then prints the second question again and again each time i press enter. It is not printing the 3rd question at all.
Please see attached code
i cannot seem to find the error…
Serial__port_example.ino (801 Bytes)