
-----------------------------------
chroncile
Sun Jan 11, 2009 8:05 pm

Need help with parallelput
-----------------------------------
Hi, I'm supposed to make a program that has two modes, a test and a quiz mode. When the user is taking the quiz, the LED lights on the breadboard are suppose to turn off every 1 second using parallelput. The quiz is multiple choice and its GUI so there are four boxes from which the user can choose. Also, I have to use mousewhere and not buttonwait for it since buttonwait will it so that the LED lights wont go off.

-----------------------------------
Laplace's Demon
Sun Jan 11, 2009 8:20 pm

Re: Need help with parallelput
-----------------------------------
Alright...all you've done here is tell us what your project is. Do you have any code to post for us? Do you have any specific questions? This forum is not to be used to bum code, it is used to answer specific questions pertaining to existing code.

If you have any reasonable specific questions and can provide us with the code you have written so far, we could help out.

-----------------------------------
chroncile
Sun Jan 11, 2009 8:34 pm

RE:Need help with parallelput
-----------------------------------
yes, how do i make it so when the user is answering the questions, the LED lights go off. Im suppose to use 4 LED lights and one by one, they turn off meaning a second has passed by and when they all turn off, the program goes to the next question, here is my code so far:


var counter : int := 0
var total : int := 0
var answer1, answer2, answer3, answer4 : string
var result1, result2, result3, result4 : string
var x, y, bnum, bud : int
var button : int
var font1 : int
font1 := Font.New ("serif:12")

put " " : 29, "Welcome to Mind Blaster!"
put "--------------------------------------------------------------------------------"
put skip
put "There are two options to choose from:"
put "   - The Test Mode"
put "   - The Quiz Mode"
put skip

put "- The test mode will consist of hard questions."
put "- The quiz mode will consist of easy questions with little time"
put "  to complete them."

put skip

drawfillbox (250, 50, 120, 125, black)
drawfillbox (450, 50, 320, 125, brightblue)
Font.Draw ("Test Mode", 150, 80, font1, white)
Font.Draw ("Quiz Mode", 350, 80, font1, white)

loop
    buttonwait ("down", x, y, bnum, bud)
    exit when x >= 120 and x = 50 and y = 120 and x = 50 and y = 320 and x = 50 and y = 160 and x = 200 and y = 320 and x = 200 and y = 160 and x = 150 and y = 320 and x = 150 and y 