Results 1 to 8 of 8

Thread: Programing the Parallax Servo Controller (USB)

  1. Programing the Parallax Servo Controller (USB)

    OK, Ive been working on a project and heve everything done, except the software. But let me first give you a rundown on the robot it-self. It has differential steering with the wheels powered by servos. The servos then run to the Parallax Servo Controller (USB) (root of the problem), and the controller connects to a laptop that sits on top. (I chose to use a laptop for two reasons. 1. ease of use 2. internet controlled.) I also have a pan and tilt system with a web cam on it.

    The pan and tilt system needs software too.I would then run the software on the laptop and connect to it using remote desktop connection or similar program. But thats my program no software. So i need an easy to use software where i click and old on the button and it moves it that direction.
    Here is just an idea of what it would look like

    So if someone is willing to write me a program that would be great or simply tell me how. I know a little (and its really a little) in Virtual Basic.

    Thanks for your time.
    $DO || ! $DO ; trytry: command not found (aka "Do or do not. There is no try.")
    Blog of my Internet Controlled Robot here
    http://forums.trossenrobotics.com/blog.php?b=43

  2. #2
    Join Date
    Sep 2006
    Location
    Chicago Illinois
    Posts
    682
    Images
    174
    Rep Power
    83

    Re: Programing the Parallax Servo Controller (USB)

    Hey,

    This is a pretty good set up. It's very close to the first mobile robot I built using phidgets. I suggest downloading the express versions of the MS languages which are free.
    http://www.microsoft.com/express/

    You can take your time learning how to build a form like the one you have planned. Programming is scary at first, but once you start getting a little bit accomplished it rapidly gets easier. I think you will have far more enjoyment building robotics if you are empowered yourself to keep adding to the code. It is easier to get started with some sample code though, having a template to work off of helps a lot. For this reason I would highly recommend looking into the Phidget 4 servo controller since there is plenty of sample code for the Phidgets and more programmers out there using them. But maybe someone has some Visual Basic samples out there for the Parallax board that can get you started using that one.

  3. #3
    Join Date
    Sep 2006
    Location
    Chicago Illinois
    Posts
    682
    Images
    174
    Rep Power
    83

    Re: Programing the Parallax Servo Controller (USB)

    Check this out! Just what you need, Express samples and everything

    http://forums.parallax.com/forums/de...x?f=5&m=212536

    Be sure to also follow the link to another thread half way down the page.

    cheers!

  4. #4

    Re: Programing the Parallax Servo Controller (USB)

    I am having a buddy help me break it down for me today. I will post what we find out. The issue is converting the SPBASIC programming code into something that VB can output. If you follow the examples in the documents posted above you can create a great sliding scale controller. Sadly that will not work for my needs. As I said I will post the sample code we come up with.

  5. Re: Programing the Parallax Servo Controller (USB)

    Hey misiu, thanks a lot. I kinda got it figured out using roborealm, but it still doesnt do exactly what i want it to do.
    $DO || ! $DO ; trytry: command not found (aka "Do or do not. There is no try.")
    Blog of my Internet Controlled Robot here
    http://forums.trossenrobotics.com/blog.php?b=43

  6. #6

    Re: Programing the Parallax Servo Controller (USB)

    Why dont you post what you have and when i get up and running We can compare notes.

  7. Re: Programing the Parallax Servo Controller (USB)

    ok sorry this reply has taken so long, ive been away from my laptop.

    Ok time to get started. Roborealm was the easiest way i could find to accomplish what i need it to do. And strangely enough using an xbox 360 controller was easier than programing the buttons on a keyboard. Ill also give you the saved project for roborealm.

    Ok im not sure if your with fimilure with a 360 controller so ill make a picture to help you out.






    As far as RoboRealm goes I set variables so when the joystick reaches a certain y axis it tells the paralax servo controller program thats in roborealm to move to a certain position. The pan and tilt was a little different because the d pad on the controller is treated like a hat switch and not a joystick. But looking at my code it should be that hard to figure out.



    I could get this picture as big as i wanted it so here is the link http://i119.photobucket.com/albums/o.../roborealm.jpg

    Here is the code i used. Its mostly all copied and pasted from a tutorial project on the website.
    Code:
     set the initial move to nothing
    move=129
    mover=128
    
    
    
    ' if the joystick is to the right assign bit 2
    if GetVariable("left_y") < -300 then
      move = 1
    ' otherwise if it is to the left assign bit 3
    elseif GetVariable("left_y") > 300 then
      move = 254
    end if
    
    ' if the joystick is to the right assign bit 2
    if GetVariable("right_y") < -300 then
      mover = 254
    ' otherwise if it is to the left assign bit 3
    elseif GetVariable("right_y") > 300 then
      mover = 1
    end if
    
    ' if the joystick is to the right assign bit 2
    if GetVariable("pat") = 0 then
      tilt = 2 + (tilt)
    ' otherwise if it is to the left assign bit 3
    elseif GetVariable("pat") = 18000 then
      tilt = (tilt) - 2
    end if
    
    ' if the joystick is to the right assign bit 2
    if GetVariable("pat") = 9000 then
      pan = 2 + (pan)
    ' otherwise if it is to the left assign bit 3
    elseif GetVariable("pat") = 27000 then
      pan = (pan) - 2
    end if
    
    ' if back botton on controller is pressed resets pan
    if GetVariable("center") = 1 then
     pan = 128
    end if
    
    ' if back botton on controller is pressed resets tilt 
    if GetVariable("center") = 1 then
     tilt = 128
    end if
    
    ' if back botton on controller is pressed resets mover
    if GetVariable("center") = 1 then
     mover = 128
    end if
    
    ' if back botton on controller is pressed resets move
    if GetVariable("center") = 1 then
     move = 129
    end if
    
    ' the results are in the single
    ' variable move. Assign that
    ' back into RoboRealm so we
    ' can use it in other modules
    SetVariable "move", move 
    
    ' the results are in the single
    ' variable move. Assign that
    ' back into RoboRealm so we
    ' can use it in other modules
    SetVariable "mover", mover 
    
    ' the results are in the single
    ' variable move. Assign that
    ' back into RoboRealm so we
    ' can use it in other modules
    SetVariable "tilt", tilt
    
    ' the results are in the single
    ' variable move. Assign that
    ' back into RoboRealm so we
    ' can use it in other modules
    SetVariable "pan", pan
    Well thats basicly it in a nutshell. If you have any questions dont hesitate to ask. I dont need it but if you want some help translating the xbox controller to a keyboard i would be glad to help. Its something i should probably get done anyway.
    $DO || ! $DO ; trytry: command not found (aka "Do or do not. There is no try.")
    Blog of my Internet Controlled Robot here
    http://forums.trossenrobotics.com/blog.php?b=43

  8. #8

    Re: Programing the Parallax Servo Controller (USB)

    Sorry it took me a little while to respond. My friend was able to put together a DLL that made communicating with the servos significantly easier. However he was hesitant to let me pubish it. Although if your still interested in getting your hands on it send me a PM and ill send you the DLL and the way its used. Very very easy

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need Help With 4 Servo Controller
    By mterm in forum DYNAMIXEL & Robot Actuators
    Replies: 5
    Last Post: 02-05-2008, 05:27 PM
  2. servo controller
    By hotrodled in forum Robotics General Discussion
    Replies: 13
    Last Post: 01-30-2008, 01:59 PM
  3. Phidget 1 servo controller & 12 v?
    By Mach in forum DYNAMIXEL & Robot Actuators
    Replies: 2
    Last Post: 12-17-2007, 01:13 AM
  4. Kondo web page translated.
    By Droid Works in forum Humanoids, Walkers & Crawlers
    Replies: 4
    Last Post: 10-06-2007, 06:49 PM
  5. Programming a Continious Rot Servo
    By Sirstrafe in forum Software and Programming
    Replies: 3
    Last Post: 04-27-2007, 10:11 AM

Posting Permissions

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