I have 2 input pins that can be either both off, either one on, or both on. Each combination needs a specific number applied to it.
both off = 0
portb.6 on = 2
portb.7 on = 10
portb.6 and portb.7 on = 19

So if both pins where high variable SETPOINT = 19.

I've tried if then statements but I cant get them to work.
I tried while wend hoping that while the pin or combo is high the correct value is used but I cant get that to work either.

Any ideas?