Shop OBEX P1 Docs P2 Docs Learn Events
2-Axis Joystick + Wireless = Boe-Bot Control — Parallax Forums

2-Axis Joystick + Wireless = Boe-Bot Control

triddletriddle Posts: 3
edited 2012-11-25 20:45 in Robotics
yeah.gif·I am trying to set-up one Basic stamp board to use the 2-Axis joystick and wireless to control my Boe-Bot. Has anyone tried this with any luck? All·I have been able to accomplish is it will rotate left and right. I have not figured out how the reverse the signal for the servos to get the forward and reverse. Thank you for any help with this.

Comments

  • GWJaxGWJax Posts: 267
    edited 2010-04-25 13:06
    If you can send your code I can help out a bit with your problem. What joystick are you using and are you sure that you have 4 directional control " right, left, up and down" or just right and left, which it sounds like you have. If you do, do you have the internal schematics on the joystick? If you only have right and left movement then I would install a push button to instruct the stamp to jump to the forward and reverse subroutines when pressed and return when the button is released.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • triddletriddle Posts: 3
    edited 2010-04-25 13:41
    I am using the Parallax 27800 which is direct wired now I want to get this part of the code before I start on the wireless part using a set of Parallax 27982 Transceivers. the code that I have started with is the ControlServoWithPot.bs2 which starts on page 152 of What's a Microcontroller. When I apply the code to both servos they will turn in the same direction which is where I get the rotate in place. I have not been able to come up with any code to reverse the pulsout to one of the servos to get the needed forward and reverse travel. I hope this helps and thanks for your help. I have always had a interested in electronics, but I am new at this code and programing thing. But it has been interesting and fun.
  • GWJaxGWJax Posts: 267
    edited 2010-04-25 13:52
    OK I'll pull out the manual and type in some code for you. Give me about an hour to do this so you can try it out.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • GWJaxGWJax Posts: 267
    edited 2010-04-25 16:33
    OK, try these programs and let me know how they work and what they do. I was thinking of other routines but before I write them I would like to see how these work first.
    Run the JoystickRCTIMERecorder.bs2 first then follow the directions in the JoystickControl.bs2 program to make the changes for your servos values.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • GWJaxGWJax Posts: 267
    edited 2010-04-26 00:32
    Just realized that I only used one scale reading for one servo in this program. attached is the revised version that has been corrected. Sorry for that.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • triddletriddle Posts: 3
    edited 2010-04-26 02:09
    I dont get any servo movement with this code.
    Thank you for all of you hard work.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-04-26 18:24
    This thread is being moved from the Completed Projects Forum to the Robotics forum as it is off topic in the original forum, which is for Completed Projects only. Please read the sticky thread in the Completed Projects forum prior to posting there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • GWJaxGWJax Posts: 267
    edited 2010-04-27 01:37
    OK one question. Are you using the continues rotational servos?? If so then your right the servos will not move because I have then looking at the servo pot location instead of the joystick. I will write you another program to correct this and give you full function of your bot.. Still I need you to attach the joystick up to the BS2 and give me the readings Max Right, Max Left, Max Up and Max Down so I can incorporate these numbers into the program. I'll start writing and wait for your numbers.


    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • bridger deschampsbridger deschamps Posts: 17
    edited 2012-09-14 17:42
    Hi I got some readings for you if you are still interested in writing that code. At rest I got for the up/down is 180 and left/right is 304. the lowest they go is one, and the highest for up/down is 525 and for left/right is 640. the code I used to get this is just out of the kick start book. hear is the code.
    joystick.bs2

    Thanks Bridger
  • gennarobasso81gennarobasso81 Posts: 84
    edited 2012-09-18 19:12
    hey i'm doing the same project right now....with an lcd and a few buttons...iusing two BS2's. I have codes and pics posted at educational group project for all of us that are new to electronics . I'm pretty new to all of this and this is my first attempt at any kind of project.
  • bridger deschampsbridger deschamps Posts: 17
    edited 2012-11-25 20:45
    ok thanks and it look pretty cool.
Sign In or Register to comment.