What is the command for checking my own output status? Making a quizz machine.

Lobobo

Member
Hello guys,

I am programming a quiz pannel where I have few questions and few answers written on it and for each question there's buttons representing answers. For each question I have two wrong and one right answer. Everytime when I get right push button (next to right answer) pressed I light up a LED next to the question. I want to make pannel decoration nicely flash in the end when all answers been answered correctly. So after every right answer light up I would like to check my other LED outputs are they on or off. If they all on, it means a victory. It gives me an error when I type code:
Code:
check_for_victory:
if LED_1 = 1 and LED_2  = 1 and LED_3  = 1 then
gosub Vyctory_LED_Dance
endif
return
Please advice how to write a code for checking outputs.
Thank you.
 

techElder

Well-known member
Could it be that the subroutine LABLE "gosub Vyctory_LED_Dance" is not spelled the same as the ACTUAL label on the subroutine?
 

Lobobo

Member
Could it be that the subroutine LABLE "gosub Vyctory_LED_Dance" is not spelled the same as the ACTUAL label on the subroutine?
Just checked. It's copy - paste... Still syntax error on the first line where if is. I think it's because LED_1 and LED_2 and LED_3 are outputs, the question in "if" command mst be different from the one when we check the input status...
 

techElder

Well-known member
It would be easier to help if you would post your complete code with SYMBOL definitions. My crystal ball is busy ... ;)
 

lbenson

Senior Member
Code:
low  C.0
high C.1
low  C.2
high C.4

b0 = outpinsC

sertxd("%000",#bit4,"x",#bit2,#bit1,#bit0,cr,lf)
sertxd output: "%0001x010"
 
Top