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

C I am not but I'm learning trying to figure a menu out and the best way to go.

$
0
0
I was thinking I have 4 button test box for input and going to use the LCD for outputing menu
would select case be the best way what get's me about C is the using printf
Code (Text):
  1. nt a = 1;
  2. int b = 2;
  3. int c = 3;
  4.  
  5. switch ( a ) {
  6. case b:
  7.   /* Code */
  8.   break;
  9. case c:
  10.   /* Code */
  11.   break;
  12. default:
  13.   /* Code */
  14.   break;
  15. }

Viewing all articles
Browse latest Browse all 4928

Trending Articles