Is it possible to say somthing like:
If Bumper == 0
Run motors until Bumper == 1
or in other words can I make it so my motors run when and only when the bumper is pressed?
Would it be so easy as saying run motor 3 if bumper == 1
:eek: :o
Does the Bumper need to stay pressed, for the motor to run (e.g. Constant Contact)??
It could be as simple as:
char Bumper;
void main ( void )
{
while ( 1 )
{
Bumper = GetDigitalInput ( 1 ) ;
if ( Bumper )
{
SetPWM ( 3 , 127 ) ;
}
else
{
SetPWM ( 3 , 255 ) ;
}
}
}
With EasyC 1.x
EXACTLY!!!
Thanksโฆ
so what are you building???