Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
void control(void) {while(1) // begin infinite loop { servo(PORTE,2,700) // Call the macro to control the servo , where 700 is the amount of cycles // where PORTE is the port and 2 is the pin on the port. The servo is connected to PORTE.2 according to this example delay_ms(20); // delay 20 milliseconds so we don't confuse the servo } // end while} // end subroutine
I guess I'm more confused on the elementary thing of which things I need to include to get any code to run right.
I figured it out! Thanks man. Another question, how come I don't need to add all of the #include files that are listed? Such as the servo_controller.c?