RE: help with bot program

https://vexforum.com/gallery/showimage.php?i=503&c=8 https://vexforum.com/gallery/showimage.php?i=502&c=8 https://vexforum.com/gallery/showimage.php?i=500&c=8

note there is nothing wrong with the servo and I do have a programming kit

also is there a way to have the servo stay in its position when I let go of the butten like channel 5 up button= gripper close and stay with out me holding it. bottom button opens gripper

OK, lets take this one question at a time.

Yes, without using any sensors you could do some simple programming like so.


int servo; 

      while ( 1 )
      {
            servo = GetRxInput ( 2 , 2 ) ;
            if ( servo > 225 )
            {
                  SetPWM ( 2 , 255 ) ;
            }
            if ( servo < 75 )
            {
                  SetPWM ( 2 , 75 ) ;
            }
            elseif ( servo = 0 )  //Makes it so if the servo is not in use, it should stay in the neutral position. 
            {
                  SetPWM ( 2 , 0 ) ;
            }
      }

You can’t assign a different operation to a different position of the button. But you can use it like a toggle switch (ie. on/off). Here is an example explained by one of the EasyC people. [https://vexforum.com/showpost.php?p=9544&postcount=2

Good luck!](https://vexforum.com/showpost.php?p=9544&postcount=2)