|
i am using the handyboard/expansion board and am using servos for
movement i want to be able to have the motors stop in response to a
pushbutton being pressed.
the button is hooked to the digital in (port 7) on the handyboard
here is my code for the driving of the servos
can someone please help me with code to have the servos stop with a
button press
here is my code
int i;
int a;
int b;
void main()
{
init_expbd_servos(1);
while(1)
{
i= 146;
a = (i*10)+800;
b = (i*10)+667;
printf("Pot value= %d\n",i);
msleep(100L);
servo0 = a;
servo1 = b;
}
}
thanks
Justin
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|