Servo Test Program

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Servo Test Program

Post by JohnCrow »

Hi
Just been having a look at the test program for the servo board.
Could you please tell me what does this statement mean in the decision box
x=1 || x=255
Have tried searching the forums, but didnt find anything like it
Thanks
1 in 10 people understand binary, the other one doesn't !

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Servo Test Program

Post by DavidA »

Hi John,

the statement means if x=1 OR if x=255 then move into the YES part of the decision, this could have also been done with a switch statement as well.

If you already knew this and just wanted to know why the test program did this, my apologies, i would imagine since the range of the servo position is a byte (0-255) that at points 1 and 255 it may need additional time to reset its positon or return to a start point, Ben may have more insight into that though.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Servo Test Program

Post by JohnCrow »

Thanks David
No I just didnt know what the II symbol meant. I can follow every thing now.
Just bought a couple of servos to try on the servo eblock.
1 in 10 people understand binary, the other one doesn't !

Post Reply