Servo 180 deg. Rotation

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
kunibabina
Posts: 11
Joined: Thu Sep 16, 2010 12:00 am
Contact:

Servo 180 deg. Rotation

Post by kunibabina »

What changes has to be done in C code to make the servo rotate 180 deg. instead of current 120 deg. ? In other words, how to change to 2200us instead of current 1280us..Thanks in advance..

cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Servo 180 deg. Rotation

Post by cobra1 »

Can you post the C code please

kunibabina
Posts: 11
Joined: Thu Sep 16, 2010 12:00 am
Contact:

Re: Servo 180 deg. Rotation

Post by kunibabina »

It comes with the Flowcode in the components folder inside the installation directory..

cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Servo 180 deg. Rotation

Post by cobra1 »

Looking at the C file, there are 2 functions. 1 incriments and the other decrements.
So purely as an example, if a stepper had 360 steps, then calling the incriment function 180 times will make it move 180 degrees. So calling it 120 times will move it 120 degrees.

To move it back to 0 or "home" just reverse what you did to make it move, i.e decrement number of steps.

Hope that makes some sense

Where are you getting the uS value from?

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Servo 180 deg. Rotation

Post by medelec35 »

What version of Flowcode are you using as your post is in Flowcode V2 & V3 section?
I thought Servo component is only available for non free versions of Flowcode 4 and Flowcode 5.
Did not think was available for Flowcode 3?

Martin
Martin

kunibabina
Posts: 11
Joined: Thu Sep 16, 2010 12:00 am
Contact:

Re: Servo 180 deg. Rotation

Post by kunibabina »

I had visited one institute and was using there but for posting in Flowcode 4 we have to enter license. They said we cannot share license details to outstation faculties and they haven't co-operated me. So I posted in Flowcode V2 & V3. Without Matrix Multimedia's permission it may be illegal to post the code. So I said, it was available in the installation folder.

Post Reply