05-07-2013 11:45 AM
I am learning Labview and my first challenge is to build a course for one of my daughters who is taking Anatomy in her nursing program. I would like to find an example of a vi that asks a question or shows a picture and the users selects A/B/C/D of which one is correct and three are incorrect. Hopefully someone from the collective can get me there close.
I'm thinking I would use an array which has the following elements using a 3 dimensional array. The three elements in index 0 would be {num, question, link to image}. I'm thinking several hundred questions. Also thinking of using a random number generator to randomly select the questions. Use a second array which shows {num, wrong answer}.
Request the collective point me to a vi which gets me close and I'll pick away at it. Eventually I want to move to test equipment but trying to start somewhat simple first.
Tony
05-08-2013 04:29 PM
Hi Tony,
I would recommend using an array of clusters, each cluster of two more clusters, one of them consisting of number, question, picture, and the other consisting of an answer. Then, use a for loop with a cluster indicator on the inside and wire the array which you have prepared into that for loop and it will auto index and go through one by one. Then you can have a time delay within the loop (let's say 10 seconds) to give her a chance to choose. Then the delay displays (from the second cluster). I hope this helps.
Regards,
Basil Beirouti
Applications Engineering
National Instruments
05-09-2013 03:29 AM - edited 05-09-2013 03:29 AM
I wrote a similar game about eight years ago and I see that I still have the code. If you want, I can upload it, but you should keep the following in mind:
Let me know if you want it or if you would rather proceed on your own.
05-10-2013 06:56 PM
I would like to get a copy. Thanks.
Tony
05-10-2013 06:57 PM
Interesting. Let me hack at this idea and I'll get back. Thanks.
Tony
05-12-2013 06:01 AM - edited 05-12-2013 06:07 AM
OK, so here's the game with the images and sounds which I got off the web back then. The main VI is called main.vi.
Keep in mind that besides the points I mentioned previously, it also requires some OpenG VIs. You can either install OpenG or remove them and find replacements. Also, it uses some relative paths which might require some changes to the code if you build an EXE, but I'll let you figure things out.
And yes, the sounds are just the WAVs that Windows had. It was for a five year old and any sound was good enough for my purposes.
05-13-2013 02:00 AM
I'd go with an array of clusters, the cluster needs 4 elements, a 2D picture and a radio button control for picture and answer and 2 hidden, path to picture and the correct answer.
A next button after button is selected and then it should be rather self explainatory.
/Y