
-----------------------------------
Destro
Mon Oct 28, 2013 12:40 pm

Need help with parallelget.
-----------------------------------
What is it you are trying to achieve?


What is the problem you are having?



Describe what you have tried to solve this problem


-----------------------------------
DemonWasp
Mon Oct 28, 2013 1:54 pm

RE:Need help with parallelget.
-----------------------------------
Well, hopefully you know how to tell Turing to make noise ("music" would be generous) with Music.Play .

Presumably, you'll connect your breadboard to the computer via parallel port. Then, in Turing, you can use PC.ParallelGet to read from the parallel port and turn that into music.

Start with just one pin connected to one wire connected to a single button. Try to write a program that will wait until one of the buttons is pressed and will play a tone when that button is pressed.

Once you have one tone, adding other tones / wires / buttons should be pretty easy.

-----------------------------------
Destro
Tue Oct 29, 2013 10:18 am

RE:Need help with parallelget.
-----------------------------------
Sorry, I originally filled out the entire post, but I guess it wasn't submitted properly? 


What is the problem you are having? 
I do not know how to use the syntax in order to make parallelget work. I don't even have the slightest clue, since I am very new to turing.
The parallel port is: http://d4web.net/sths/TEJ/U04Interfacing/A02Input/images/pinout.gif

Describe what you have tried to solve this program?
Using the Turing Reference Manual, and the example provided (it didn't work for me). Asking my teacher (she was unsure herself :(   ). 
I tried "if parallelget = __". I tried setting parallelget as a variable. I honestly have no clue.

The code was:

const val : int := parallelget  % Read in the set of pin values
        put "Pin 10 is: ", (val div 64) mod 2
        put "Pin 11 is: ", (val div 128) mod 2
        put "Pin 12 is: ", (val div 32) mod 2
        put "Pin 13 is: ", (val div 16) mod 2
        put "Pin 15 is: ", (val div 8) mod 2




Alright, that is the rest of it. Thanks for the response DemonWasp, but I am still unsure on this. I know how Music.Play works as I have made a program which plays music by pressing keys on the keyboard. However, I have absolutely no idea on where to start with parallelget. If I had a proper example program using parallelget, I think I would be able to figure out how it works. Thanks again :)

-----------------------------------
DemonWasp
Tue Oct 29, 2013 2:49 pm

RE:Need help with parallelget.
-----------------------------------
That example should work. What error message are you getting? I need the exact error message.

Also, are you completely sure that the computer you're running this on even has a parallel port?
