Soooo frustrateddd!!!!!!!
dirtrider444
Posts: 33
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
Servo= HS-5085MG
Comments
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
Check out this thread it has more info on standard servos if you have already seen it disregard.
Can you post some code?
Ron
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
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ron
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
Ron
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.