Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

movement of servo angle from any position

Status
Not open for further replies.

Sling

New Member
Using a PIC16f877a at 20Mhz, writing with BoostC, is it possible to move a Futaba FP-S148 servo arm so that it will go to a specified angle according to a certain input regardless of its previous position, or can it only be moved in increments?
 
Servos use absolute positioning, not relative positioning - so you tell it to go to a certain position, and it does.

If you want to move incrementally, you have to store the previous position, then add the increment required to that to give the new absolute position, then move to that new position.
 
I don't want relative positioning.

Servos use absolute positioning, not relative positioning - so you tell it to go to a certain position, and it does.

Hmm I must be doing something wrong then because with the code I'm using the servo arm moves idk maybe 10 degrees, stops briefly, then moves again in the same direction, and this continuously repeats.

while (1) {
portb.0=1;
delay_ms(2);
portb.0=0;
delay_ms(18);
}
 
Last edited:
Is it a 360 degree servo? It looks like your code should just move it to the extreme right if it is now a continuous rotation servo. From the code I can't really identify why it would be doing what you describe.
 
Status
Not open for further replies.

Latest threads

Back
Top