Shop OBEX P1 Docs P2 Docs Learn Events
Soooo frustrateddd!!!!!!! — Parallax Forums

Soooo frustrateddd!!!!!!!

dirtrider444dirtrider444 Posts: 33
edited 2011-10-20 08:53 in BASIC Stamp
I cant get my servo to work. I have a 180 degree servo by hitec im using to move my ping)) sensor. I cant get this servo to work. it just jerks left. nothing im doing shows any response. Im using a BS2 stamp on a boe-bot board. Ive looked through every forum and every manual. I have 3 books and everything is about converting a standard servo to continuous rotation. found one program in "stamp-works" that doesnt even work. Please nobody post anything trying to tell me to read a manual...ive done that for the last 4 days. if you have any info and would like to help me, please post a comment on this thread.

Servo= HS-5085MG

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-10-18 00:35
    Can you post your code?

    Do you have a very good power supply for the servo. Often servos draw a lot of current when they start to move. It can be helpful if the servo power isn't the same as the power to the Basic Stamp (but you do need to use a common ground).

    Do you have another servo that does work with the Basic Stamp?

    Duane
  • RonPRonP Posts: 384
    edited 2011-10-18 00:41
    dirtrider444

    Check out this thread it has more info on standard servos if you have already seen it disregard.

    Can you post some code?

    Ron
  • dirtrider444dirtrider444 Posts: 33
    edited 2011-10-18 00:44
    Hey guys!
    THANKS FOR RESPONDING ON MY THREAD!!!

    I just found this code. It is the first time ive been able to have my servo work. It does a 45 degree counter/clockwise motion. I dont have any servos that work(now I have this one working) other than the continous motion servos that drive the wheels for the boe-bot.






    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}





    counter VAR Word
    counter2 VAR Nib

    PAUSE 1000

    DO

    FOR counter = 500 TO 1000 STEP 4 ' 125 iterations or about 2.5 seconds
    PULSOUT 14, counter
    PAUSE 20
    IF counter2 = 0 THEN TOGGLE 12
    counter2 = counter2 + 1
    NEXT

    FOR counter = 1000 TO 500 STEP 4
    PULSOUT 14, counter
    PAUSE 20
    IF counter2 = 0 THEN TOGGLE 12
    counter2 = counter2 + 1
    NEXT

    LOOP

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  • RonPRonP Posts: 384
    edited 2011-10-18 00:51
    Glad you got it working. When you get a chance go through the thread I linked for you to in post #3 its a good little tutorial on how standard servos work with the Basic Stamp.

    Ron
  • dirtrider444dirtrider444 Posts: 33
    edited 2011-10-18 00:53
    THANKS ALOT GUYS!!!
    That link you sent me Ron has alot of really helpful information!!
    You did in 10 seconds what Ive been searching for for days!!!
    Im gonna read up on that thread and play around with the board and servo.
    Really Appreciate all the info and quick response!!!
    Taylor
  • RonPRonP Posts: 384
    edited 2011-10-18 00:59
    Your Welcome. In the future search for info you need using google. This is how I found that thread I searched standard servo basic stamp site:forums.parallax.com Just add site:forums.parallax.com to the end of what you are searching for. It was the first link the search produced.

    Ron
  • dirtrider444dirtrider444 Posts: 33
    edited 2011-10-20 07:27
    Good info Ron. I didnt know I could search Google that way. Thats a huge help. I got that servo to work for me just perfect. I have another thread I just posted in regards to how to have the ping store data in a seperate pin. All I have the boe-bot manual/book; but it just shows how to save info with a photoresistor(0-1). Im trying to have the "Ping))" look left, save the distance to a pin, look right, save the distance to a pin, then do a if IN"" is > than IN"" then go to the greatest side. Any thoughts? I tried your search method but came up empty. Ill send you pics of the board. came out looking good and working good. Appreciate your feedback bud
  • Mike GreenMike Green Posts: 23,101
    edited 2011-10-20 08:53
    I know you're excited and frustrated, but you do have to respect the forum guidelines. You get better answers that way. In particular, you need to use thread subjects that say something about the subject you're asking about. Just saying you're frustrated doesn't give any hints to people looking at the list of thread subjects. You could say "I'm having trouble getting a servo to work" for example. The other guideline that you've stretched is that you're not supposed to start two threads on the same subject. That's not quite what you're doing, but you'll get answers quicker and with less confusion if you keep the two conversations together.

    From what you've said in the two threads that I've seen, it looks like you could use some basic understanding of what programming is about, about variables and their use, and about PBasic in general. The "BASIC Stamp Syntax and Reference Manual" is something you should have on hand and be used to looking through. It's a reference manual for the Stamp's Basic and has lots of examples in it for each of the statements and chapters on expressions, functions, variable declarations, etc. There is a great tutorial for learning Basic called "What's a Microcontroller?". All of these are available for free download. Go to the main Parallax webpage and click on Downloads. The Reference Manual is under the Basic Stamp Documentation button and the tutorials (many varied) are under the Educational Tutorials and Translations button.

    There are also years of Nuts and Volts Columns with hardware and software examples and explanations. From the main Parallax webpage, click on the Resources button and you'll see a link to the index.

    From your last message (#8), I think I understand your misunderstanding. Look at the PING))) sample code. The distance is left in some variables after reading the PING))). You can't set an I/O pin to this result, but you can test the variable value directly by just using the variable name in an IF statement. "What's a Microcontroller?" will help you understand this idea. You can also look at other examples of IF statements like in the Reference Manual.
Sign In or Register to comment.