Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Controlling a ball with controller and parallel port
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mikeelio




PostPosted: Mon Jan 20, 2014 6:26 pm   Post subject: 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

Turing:


<Add your code here>



Please specify what version of Turing you are using
4.1.1 i think
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Jan 20, 2014 11:09 pm   Post subject: 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: