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

Username:   Password: 
 RegisterRegister   
 with a joy stick, how do you make a dot with a radius of 15 appear on the corner of your screen? for a school sumitive
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cwlvc




PostPosted: Tue Jan 08, 2008 5:18 pm   Post subject: with a joy stick, how do you make a dot with a radius of 15 appear on the corner of your screen? for a school sumitive

ok, guys, plz help me. it's for a summitive. this should be easy for the pros because this is for beginers.

ok, i have a joy stick. i was asked to with a joy stick, that if i went up, a circle on the middle top would show. if i went left, a circle would show up in middle left, and so on(i got this part). but then we got a twist, and if we got it, we would get 100, and that's if we went top, and left at the sametime, we would have a circle showing at the top left corner. do you guys know what command i should put in?


so to get what this is what i wrote for the first part(which i got correct, now i need to add in the twist)

var val : int
loop
cls

parallelput(255)
val:= parallelget

if val = 160 then
locate (1,30)
drawfilloval (300,368,15,15,1)
delay (10) < this is 0.01 second right? that's what the delay should be, i think it's 10

elsif val = 144 then
locate (12,60)
drawfilloval (550,190,15,15,2)
delay 10


and so on...

and i ended this with...


else < the demand here is we're suppose to "clear the screen", so what do i put after "else"?


end if
end for

plz help guys Razz Wink Mr. Green
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Tue Jan 08, 2008 5:35 pm   Post subject: RE:with a joy stick, how do you make a dot with a radius of 15 appear on the corner of your screen? for a school sumitiv

The value the joystick sends to the parelle port (and what vlaue you need to send it) depends on the joystick so i don't think any one here can help you with out knowing more about the joystick being used (unless there is a standard for joysticks witch i am unaware of witch is quite posible).

It should also be noted that turing has comands speficly for joysticks rather then using the parrale port comands, however this is probly not what your teacher whonts.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
cwlvc




PostPosted: Tue Jan 08, 2008 6:20 pm   Post subject: Re: RE:with a joy stick, how do you make a dot with a radius of 15 appear on the corner of your screen? for a school sum

Dan @ Tue Jan 08, 2008 5:35 pm wrote:
The value the joystick sends to the parelle port (and what vlaue you need to send it) depends on the joystick so i don't think any one here can help you with out knowing more about the joystick being used (unless there is a standard for joysticks witch i am unaware of witch is quite posible).

It should also be noted that turing has comands speficly for joysticks rather then using the parrale port comands, however this is probly not what your teacher whonts.


the value for my joy stick

up = 160
down = 144
left = 0
right = 192
and when i press that button on top, it's 136
Nick




PostPosted: Tue Jan 08, 2008 6:22 pm   Post subject: RE:with a joy stick, how do you make a dot with a radius of 15 appear on the corner of your screen? for a school sumitiv

so it seems like you know what you're doing... maybe I misread your post but what is your question?
cwlvc




PostPosted: Tue Jan 08, 2008 6:28 pm   Post subject: Re: RE:with a joy stick, how do you make a dot with a radius of 15 appear on the corner of your screen? for a school sum

momop @ Tue Jan 08, 2008 6:22 pm wrote:
so it seems like you know what you're doing... maybe I misread your post but what is your question?


well, right now, i can only get the filled oval to top, left, right, and down by pressing up, down, left,right.

but what i need to do now is to know a command to tell the computer so when i push down on my joy stick top, AND left at the same time, i'll have a filled oval showing on my top left corner.
Clayton




PostPosted: Tue Jan 08, 2008 10:19 pm   Post subject: RE:with a joy stick, how do you make a dot with a radius of 15 appear on the corner of your screen? for a school sumitiv

Find out the value for when the joystick is in the up/left position?
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  [ 6 Posts ]
Jump to:   


Style:  
Search: