I'm new to this, and working my way through some of it. I wasn't sure how to search it so I wasn't able to find any results, that I came across this forum. I apologize if it's something that's already been asked and answered but as I said I wasn't sure how to word it and couldn't find any results in my searches. I am currently working on tinkering with the RBG LED and wrote a code that in essence works. And this isn't the first project I've had this issue with.
First it prompts to enter the values 0 through 255 for the R pin of the LED in the serial monitor. That it does correctly.
I then have it prompt to enter a value for the G pin of the LED, which the serial monitor appears to enter a value of zero automatically and then skips to line three.
Line three works correctly asking to enter a value of 0 to 255 for the B pin.
It does this every two lines when you enter once. How do you get it to stop entering a value twice when you only hit enter once? I have delays in between which does not seem to help.
At a guess, you have the Line Ending of the Serial monitor set to send Carriage Return, Linefeed or both. These are still available() after the value entered is read. Your code, which you have not posted, interprets these as zero, hence the problem
Set the Serial monitor line ending to No Line Ending and try again
Okay I see where you're talking about, thank you so much! That worked perfectly. That was driving me crazy! So many of these things I've tried to do, it kept doing that. I couldn't figure out why seeing that the code was the exact same all the way through. Thank you so much again!
You described the symptoms of the problem well enough for me to recognise the probable cause and you are not the first person to make the mistake
One small point. Although the problem was not caused by your sketch, it is good practice to post the sketch when describing what could be code related problems, Obviously that is not required now but bear it in mind for future topics
Okay, I will certainly keep the sketch posting in mind. I just bought the R4 Wi-Fi and Bluetooth one so I'm sure I will have more questions! Thank you very much again.