Shop OBEX P1 Docs P2 Docs Learn Events
BS1 using RC servo coding — Parallax Forums

BS1 using RC servo coding

studiomagic1studiomagic1 Posts: 25
edited 2009-06-02 15:46 in BASIC Stamp
Servo #1
I need some help in writing a code for·my BS1 using a potentiometer to control a servo. I'm using pin 0 on the potentiometer and pin 1 for the servo. I want the servo's movements to echo the potentiometer's movement.

Servo #2
I need this servo to move with a push button. When the push button is pressed·and released the servo moves all the way right then back to center as fast as possible.

Any help with this·project would be very appreciated!
Thanks,
Jim smile.gif

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-06-02 01:23
    I believe the manual "What's a microcontroller" covers this. If not one of the others do. Go to the parallax site and drill down into resourses.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • studiomagic1studiomagic1 Posts: 25
    edited 2009-06-02 01:43
    Thanks, but I've been there and I'm not sure what I'm doing.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-02 14:23
    First, have you been able to use the examples to accomplish:

    1) Read the potentiometer value and display it using DEBUG?

    2) Move a servo to a position proportional to a number?

    3) Wait for a pushbutton to be pressed then released?

    Do look at "Basic Stamp 1 Application Notes" here: www.parallax.com/tabid/440/Default.aspx
  • studiomagic1studiomagic1 Posts: 25
    edited 2009-06-02 15:08
    Hi Mike,

    Can ·I speak with you over the phone? Please send me your contact information to my email. studiomagic@cableone.net

    I have tried some codes. I really need somebody who understands how to write the codes.

    -jim
  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-02 15:22
    These are very simple problems. The code needed is also very simple, usually just a few lines, and it's been described before. That's why we tell people to get this tutorial or that tutorial and to look at the Stamp Basic Syntax and Reference Manual.

    The way these forums work is that you describe what you're trying to do. You provide the source code you're using and/or a schematic of how you have things connected and describe what's happening when you try it. Someone or several someones will reply with an explanation or suggestions for you to try. If you want someone to solve your problem for you, you need to hire a consultant. Other than that, you will have to do some work. Generally, you'll find that people here are willing to help, but you have to supply enough information to work with. You also have to be willing to follow suggestions.
  • studiomagic1studiomagic1 Posts: 25
    edited 2009-06-02 15:40
    are you a consultant?
  • studiomagic1studiomagic1 Posts: 25
    edited 2009-06-02 15:46
    I haven't found anything simple yet.

    Thanks for your help.
    jim
Sign In or Register to comment.