Shaggy Dog needs help

I hope I’m not bombarding
either too long post or some thing not seeming to go through
(1) How do I loop back to a start button? I am using a wait till DigitalInput(1,1)
on the button & want to go back to it after prog. has run instead of turinon off & back on
(2) I using an 393 motor with integrated encoder on it 2022AA How do I call it up to move the motor in either clicks or degrees. not robotic positioning art.

Shaggy Dog,

Based on your previous post, it sounds like you are running easyC V4… Correct me if wrong.

Therefore I will move this question to the UNOFFICIAL Tech Support - Ask the Community section for feedback from other easyC V4 users.

-Eli

RE: suggesting I goto the comunityto ask question.
Yes I am running Easy C V4.
Thanks for your reply, bye!

For #1, I really don’t understand what you are asking, but for number two, there is a very simple solution.

int Up = 1
int Down = -1;
void moveArm ( int requested value, int speed, int direction)
{
if (direction = Down)
{
while (SensorValue[integratedArmEncoder] <= requestedValue)

{
             motor[armMotor]= speed;
}
}
if (direction = Up)
{
while (SensorValue[armEncoder] <= requestedValue)

{
             motor[armMotor]= speed;
}
}
}

While this code is in RobotC. it should be fairly easy to port to EasyC, as the general idea with the while loops stay in tact. Obviously, there are better ways of doing this, but this is one of the simplest. As long as you put the Sensor Values were they need to go up in the setup, you should be fine. Hope this helps.

If I understand correctly for #1 try something like: