
-----------------------------------
mikeelio
Mon Jan 20, 2014 6:26 pm

Controlling a ball with controller and parallel port
-----------------------------------
What is it you are trying to achieve?
To connect my controller using parallelget from parallel port to make a ball move up down left and right


What is the problem you are having?
I dont know how to connect it for parallel get to connect to the ball plz help its due tom and idk what to do


Describe what you tried to solve this problem
everything this is my final resort now 


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
var position : int
loop

for counter : 0 .. 700

drawfilloval (10, 20, 20, 20, 7) %Circle
delay (5)
drawfilloval (10, 20, 20, 20, 0) % Circle

position := parallelget 
if position =104 then %Command telling ball to move up

elsif position =88 then %Command telling ball to move down

elsif position =248 then %Command telling ball to move left

elsif position =56 then %Command telling ball to move right


end if
end for
end loop







Please specify what version of Turing you are using
4.1.1 i think

-----------------------------------
Tony
Mon Jan 20, 2014 11:09 pm

RE:Controlling a ball with controller and parallel port
-----------------------------------
It might help to figure out what the actual values coming in are. E.g.
[code]
position := parallelget 
put "parallelget is reading: ", position
[/code]
