Shop OBEX P1 Docs P2 Docs Learn Events
Anybody have a Mouse Demo for Mouse.spin from the OBEX? — Parallax Forums

Anybody have a Mouse Demo for Mouse.spin from the OBEX?

ElectricAyeElectricAye Posts: 4,561
edited 2009-05-13 13:15 in Propeller 1
Hi everyone,

I've been looking over Mouse.spin and dreaming big dreams of actually using it someday. It's not, however, intuitively obvious to me how to implement most of its methods. The lack of comments, too, makes it fun to gaze at for hours upon hours... like listening to dolphin squeaks and trying to guess what they're saying to each other. Anybody know if there's a nice Demo for this software? or maybe have something that is Demo-esque?

many thanks,
Mark


smile.gif

Comments

  • mosquito56mosquito56 Posts: 387
    edited 2009-05-12 15:22
    Look for program -- Pc_interface on obex. Has nice program with mouse to proterminal, colors and draws lines and boxes with the mouse.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
  • AribaAriba Posts: 2,690
    edited 2009-05-12 18:31
    The PC_Interface is not in the Obex, it is part of the PropTerminal:
    http://forums.parallax.com/showthread.php?p=649540

    The Graphics-Demo and Graphics_Palette uses the mouse, and show how to use the delta methodes.

    Here is simple demo with the absolute methodes:
    {{ Mouse Demo }}
    
    CON
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
    OBJ
      ms     :       "Mouse"
      TV     :       "TV_Text"      'or VGA_Text with Basepin 16
      
    PUB Main | b
    
      'start the terminal
      TV.start(12)                  '<-- TV Basepin
     
      'start the mouse
      ms.start(24, 25)
    
      repeat
          'show mouse state
          TV.out(1)                 'Home
          TV.out("B")
          TV.out(":")
          TV.dec(ms.buttons)
          TV.out(" ")
          TV.out("X")
          TV.out(":")
          TV.dec(ms.abs_x)
          TV.out(" ")
          TV.out("Y")
          TV.out(":")
          TV.dec(ms.abs_y)
          TV.out(" ")
          TV.out("Z")
          TV.out(":")
          TV.dec(ms.abs_z)
          TV.out(" ")
          TV.out(" ")
    
          waitcnt(clkfreq/10 + cnt)
    
    



    Andy
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-05-12 20:17
    Thanks, Andy, and mosquito,

    I'll give this code a try. I greatly appreciate your posting this code.


    smile.gif
    Mark
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-05-13 13:15
    Ariba said...

    ...Here is simple demo with the absolute methodes:
    ...

    Andy,
    thank you! thank you!
    This is exactly the kind of simple code I needed to get started with this. I got it working and I can't tell you how happy you've made my morning!

    smile.gifsmile.gifsmile.gifsmile.gifsmile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Watching the world pass me by, one photon at a time.
Sign In or Register to comment.