ok so I sort of understand how the switch case works but I cant get the syntax quite right for what I want to do.
ok so I have a PIC controller that i am programming in C. I have three inputs A B and C. and an output X
What I want to do-
the Idea is that I want to make a variable (lets pick "n") and asign a number to that variable depending on what button (or imput A-C) is pressed. that number would then switch the case. so if imput A == 0 then n ==1 and if B == 0 then n == 2 etc. then depending on what n equals I want the corrisponding case # to run. then the Case 1 would give the output X a value of 1 and CASE 2 would give the output X a value of 2 etc.
I hope I made myself clear. I am new and would like a little help to get started! thanks for your help!