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
Servo Test Program
Moderator: Benj
- 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
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.
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.
- JohnCrow
- 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
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.
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 !