Mouse_TV_Monitor.spin trouble
El Paisa
Posts: 375
I am trying to run Mouse_TV_Monitor.spin ·but·the only thing that get is the banner "MouseCoodinates".
and nothing happens afterwards.
I changed VideoDisplay(3) to VideoDisplay(12).
I am using the demo board with a mouse connected.
Is a new version?
Please somebody help me!!.
and nothing happens afterwards.
I changed VideoDisplay(3) to VideoDisplay(12).
I am using the demo board with a mouse connected.
Is a new version?
Please somebody help me!!.
Comments
In the program there is not provisions to· insert the mouse port numbers.
I tried to insert "·mouse.start(24, 25)" in various locations but still·the same problem.·
Can you post your code?
Dropping to DOS and doing a dir/s/p Mouse_TV_Monitor.spin in the root directory yields no results for finding that particular file.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
This is the file.
Your start routine only: starts the TV, sets the colours, send the string to the TV, then sends a new line. It then stops! What do you want it to do next?
For example, if you want a continuous display of mouse coordinates you'll need to do something like the following (Note, I'm not near a PChip, so can't check I'm right...):
·The important bit is the Repeat block - this is an endless loop...
·Hope that helps.
*** Edit:
Also, as Mike said, the version of mouse.spin I have (see attached)·has got a PUB start(dpin, cpin) routine. I've added the call in my code above. NO. WAIT. I see what's happened, you appear to have copied mouse.spin into your code, and renamed the mouse object's start routine to "mouse_start". You've forgotten to call that start routine -- I've added the call above.
If you need to keep the mouse routines in your code (which you should only need to do if you've made changes -- and even then I'd keep them in their own file called (say) mouse2.spin) then the above should work. Otherwise, your OBJ declaration should be: mouse : "mouse2", and the start routine would then be: mouse.start_mouse( dd, cc ).
I think that's right...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
Post Edited (simonl) : 10/6/2006 3:32:10 PM GMT
All I want is to run the Mouse_TV_Monitor and use all the mouse functions.
This file Mouse_TV_Monitor is not mine, I copied from the forum right after the propeller was released.
I hope Beau or Mike take a look at the file and modified so it will run.
I know how busy you are,·for this I really apologize.
Could you take a quick view at the attached Mouse_TV_Monitor program and tell
me what I have to do to having running?.
This program is doing exactly what it was written to do, essentially display the words "MouseCoordinates" and stop. Even though it includes a copy of the mouse driver, nothing calls the mouse routines. The program actually doesn't do anything with the mouse. I suspect you got a "non-working" early copy of someone's program.
The graphics_demo program included with the Propeller Tool does illustrate the use of some of the mouse routines. I suggest you start there.
Mike
I really appreciate your prompt response.
I ask form you is a program that displays the mouse functions that Mouse_TV_Monitor shows like,
PUB present : type
'' Check if mouse present - valid ~2s after start
'' returns mouse type:
''
''·· 3 = five-button scrollwheel mouse
''·· 2 = three-button scrollwheel mouse
''·· 1 = two-button or three-button mouse
''·· 0 = no mouse connected
· type := par_present·····
···
PUB button(b) : state
'' Get the state of a particular button
'' returns t|f
· state := -(par_buttons >> b & 1)
· VideoDisplay.bin(state,8)···
PUB buttons : states
'' Get the states of all buttons
'' returns buttons:
''
''·· bit4 = right-side button
''·· bit3 = left-side button
''·· bit2 = center/scrollwheel button
''·· bit1 = right button
''·· bit0 = left button
· VideoDisplay.bin(states,8)
The Graphics_Demo only shows two mouse functions Mouse_button(0) and Mouse_button(1).
According to Chip Gracey, there are five (5) mouse functions.
I would like to see those five functions.
I really appreciate your help.
Mike