Page 1 of 4 1234 LastLast
Results 1 to 10 of 37

Thread: Making a Pan Tilt work with Joy stick

  1. #1
    Daniel Guest

    Making a Pan Tilt work with Joy stick

    Does anybody know how to make the Phidget servo 4 motor work with the computer joyu stick? O need a little help on it. Thanks Daniel my e mail [email protected]

  2. #2
    Join Date
    Sep 2006
    Location
    Carol Stream, Illinois
    Posts
    1,695
    Images
    118
    Rep Power
    107

    Re: Making a Pan Tilt work with Joy stick

    Hey Daniel,

    The Phidget 4motor servo controller interfaces with the computer via USB through an API. Research how to take readings from a joystick using your computer and bring those values into the programming language you are using with the Phidget 4motor controller.

    I used DirectX Direct Input a coupe years back. When I downloaded the DirectX SDK, I found a really cool example that showed me how to interface with a joystick using C#.

    I think this is the link (it's been updated since I downloaded it):

    http://www.microsoft.com/downloads/d...displaylang=en

    �In the long history of humankind (and animal kind, too) those who learned to collaborate and improvise most effectively have prevailed�
    - Charles Darwin

  3. #3
    Join Date
    Sep 2006
    Location
    Carol Stream, Illinois
    Posts
    1,695
    Images
    118
    Rep Power
    107

    Re: Making a Pan Tilt work with Joy stick

    Here's a short little clip of us controlling a robotic arm via DirectX Direct Input:


    �In the long history of humankind (and animal kind, too) those who learned to collaborate and improvise most effectively have prevailed�
    - Charles Darwin

  4. #4
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    97

    Re: Making a Pan Tilt work with Joy stick

    I work with Max/MSP...so this may not apply for you,

    You could take the x and y data from the joystick using the (hi) object. This will probably come in as values either from 0 - 1 or 0 - 128 for both X, and Y. First convert this data into 0 - 180 for the full range of the servo. You can simply connect that data stream directly to the phidgetservo object, the X assigned to the servo output used for panning, and the Y assigned to the servo output for tilt...Or you could find the change in X and Y coupled with a threshold, and use that. The latter would be a bit harder to get working, but would offer much more valuable information, and stable control.

    I'll try to post a program using the mouse instead of a joystick this weekend. I would use a joystick, but the data from the hi object varies from device to device.

  5. #5
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    97

    Re: Making a Pan Tilt work with Joy stick

    Ok...so I kind of went overboard with this one. First of all today while I was supposed to be teaching the kidlets, I got wiicontrol working as a Mac Application using MAX/MSP. You can see it work in the youtube video below. Next, I made a mouse controlled version for the Mac called Mousecontrol. Finally I moved mousecontrol over to my PC and got that working as an EXE file called mini.
    Here are some screen shots of Wiicontrol:


    Check out the video here:

    You can download Wiicontrol (mac only):
    http://www.myhitechlife.net/robotcho...wiicontrol.zip
    You can download mousecontrol (pc version)
    www.myhitechlife.net/mickey.zip

    Hope this helps.

  6. #6
    Join Date
    Sep 2006
    Location
    Carol Stream, Illinois
    Posts
    1,695
    Images
    118
    Rep Power
    107

    Re: Making a Pan Tilt work with Joy stick

    That is too cool db, thanks I love seeing these Wiimote applications in action!

    Too bad I don't have a Mac

    �In the long history of humankind (and animal kind, too) those who learned to collaborate and improvise most effectively have prevailed�
    - Charles Darwin

  7. #7
    Join Date
    Feb 2008
    Location
    Chicago, IL
    Posts
    9
    Rep Power
    37

    Re: Making a Pan Tilt work with Joy stick

    I actually just did this recently.

    My setup: Logitech PS3 controller with USB interface, SSC-32 controller

    My program is based on this C# USB HID Device component here: http://www.codeproject.com/KB/cs/USB_HID.aspx

    Basically the sample program will let you read data from the HID device (the joystick), then I move the stick around to see which part of data corresponds to which channel, then I modified the program to send command to SSC-32 to control the position of the servos

    My original idea is to use a PC based console to send command to Nokia N810 over wifi, then N810relays the command to SSC-32 using a bluetooth-serial adapter, but I found there's some delay in command transmission with this approach. Considering wifi & bt both uses 2.4G band and have similar RF power, I might just hook the bluetooth-serial adapter to PC directly

  8. #8
    Join Date
    Dec 2007
    Location
    Portland, OR
    Posts
    3,198
    Images
    952
    Rep Power
    141

    Re: Making a Pan Tilt work with Joy stick

    Would you mind sharing your project folder/file on your USB joystick/ssc-32 program? I'm trying to learn C# and would love to see a working example with the SSC-32.

    You can email it to me at alter.[email protected].

    Thanks!

  9. #9
    Join Date
    Sep 2006
    Location
    Carol Stream, Illinois
    Posts
    1,695
    Images
    118
    Rep Power
    107

    Re: Making a Pan Tilt work with Joy stick

    You can email it to me at [email protected].
    Or upload it here as an attachment

    We're also looking into adding a Software Projects section here in the TRC. It's just a matter of finding the one we like the most. That'll be another great resource here!

    �In the long history of humankind (and animal kind, too) those who learned to collaborate and improvise most effectively have prevailed�
    - Charles Darwin

  10. #10
    Join Date
    Dec 2007
    Location
    Portland, OR
    Posts
    3,198
    Images
    952
    Rep Power
    141

    Re: Making a Pan Tilt work with Joy stick

    Uploading would probably be preferable anyway, gmail can be a bitch about attachments (it's antivirus has denied people sending projects before)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Contest Entry Holographic Halloween Robot
    By Rodger Cleye in forum Project Showcase
    Replies: 7
    Last Post: 11-06-2007, 04:37 PM
  2. Kondo web page translated.
    By Droid Works in forum Humanoids, Walkers & Crawlers
    Replies: 4
    Last Post: 10-06-2007, 06:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •