i am trying to create a while loop that will run until keypress. I am using this code:
while (System.in.available() == 0){
// do something
}
unfortunately, this is not working. is there any way around it? what could be the reason for this? i should mention that during the loop i am printing things to the console, could this be the reason?
any help would be appreciated, thank you for your help.