Gadget for a quiz

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
kirstom14
Posts: 40
Joined: Thu Nov 15, 2007 9:13 am
Contact:

Gadget for a quiz

Post by kirstom14 »

I want to make a gadget that is going to be used in a quiz. The quiz have 4 teams. The first team that presses the switch first, will answer. That is when pressed, an LED referring to that team will light up, and the other switches must be disabled until the system is reset through a reset switch.

This file attached is what I've done already.

What can I do?

Thanks
Attachments
BUZZER.fcf
(9.5 KiB) Downloaded 311 times
tomcat14

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Gadget for a quiz

Post by Steve »

In a situation like this, it may be useful to think of the flow of the program as a series of states. For your program, you may only have 2 states:

1) reset state, waiting for a switch to be pressed.

2) question answered, displaying the contestant who answered first.

The program should begin in state 1. When a button is pressed, it should move on to state 2. To move back to state 1, the reset button must be pressed.

So, state 1 turns off all LED indicators. It then enters a loop and reads the state of the inputs. Whenever an input is pressed, the program will leave this loop and move on to state 2.

In state 2, the appropriate LED will be turned on. Then, it will enter a loop and wait until the reset button has been pressed. Once the reset button has been pressed, the program will jump back to the beginning of state 1.


I hope this suggestion helps.

kirstom14
Posts: 40
Joined: Thu Nov 15, 2007 9:13 am
Contact:

Re: Gadget for a quiz

Post by kirstom14 »

I tried what you have said. And if I have understood well than the program should look like the attached one.
But the problem with what I've done is that it is not resetting.
Attachments
BUZZER.fcf
(10 KiB) Downloaded 304 times
tomcat14

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Gadget for a quiz

Post by Steve »

I've attached a program that might work better...
Attachments
BUZZER.fcf
(7.5 KiB) Downloaded 353 times

kirstom14
Posts: 40
Joined: Thu Nov 15, 2007 9:13 am
Contact:

Re: Gadget for a quiz

Post by kirstom14 »

Thanks. I understood where the problem was. And it is working up to my requirements.

Thanks again
tomcat14

Post Reply