To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 8190
8189  |  8191
Subject: 
expansion board ?
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Mon, 27 Nov 2000 14:41:27 GMT
Viewed: 
1375 times
  
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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR