trouble Shifting value into a variable
Gabrielroto
Posts: 7
OK here's what I got
x VAR Bit
y VAR Bit
z VAR Bit
PersVal VAR Nib
Mainloop1:
AUXIO
x = IN0
y = IN1
z = IN2
DEBUG ? x
DEBUG ? y
DEBUG ? z
DEBUG ? PersVal
DEBUG BIN x, BIN y, BIN z >> PersVal, CR
DEBUG ? PersVal
The three inputs are connected to pushbuttons. I can see the inputs change states in my debug window, but PersVal never gets updated - it remains zero. Is there a way to set the value of PersVal equal to the binary value of the pin states. I'm trying to give PersVal a range of 1 thru 5 using the three pins as binary digits. This is kind of hard to put into words so let me know if it makes sense or just try your best to help. Any response you guys have will be greatly appreciated.
x VAR Bit
y VAR Bit
z VAR Bit
PersVal VAR Nib
Mainloop1:
AUXIO
x = IN0
y = IN1
z = IN2
DEBUG ? x
DEBUG ? y
DEBUG ? z
DEBUG ? PersVal
DEBUG BIN x, BIN y, BIN z >> PersVal, CR
DEBUG ? PersVal
The three inputs are connected to pushbuttons. I can see the inputs change states in my debug window, but PersVal never gets updated - it remains zero. Is there a way to set the value of PersVal equal to the binary value of the pin states. I'm trying to give PersVal a range of 1 thru 5 using the three pins as binary digits. This is kind of hard to put into words so let me know if it makes sense or just try your best to help. Any response you guys have will be greatly appreciated.
Comments