Poll
Question: terminate program
exit - 1 (100%)
send serial input to exit - 0 (0%)
Total Voters: 1

Pages: [1]   Go Down
Author Topic: serial Exit  (Read 369 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how i terminate my continus loop
i want press a button through serial monitor to accept keyboard key to terminate the program if i press "Q"

thanks
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49086
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i want press a button through serial monitor to accept keyboard key to terminate the program if i press "Q"
Permission granted. Go right ahead.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8501
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When you receive the Q do a "while(1);". That will effectively stop your program as the processor will be stuck in an endless loop.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: