void enterTest(SmartCar * smartCar, uint8_t menu) { switch (menu) { case 1: // segment & barLED segmentTest(smartCar); break; case 2: // servo servoTest(smartCar); break; case 3: // motor & encoder motorTest(smartCar); break; case 4: // camera cameraTest(smartCar); break; } }
int main(void) { // initialize our libraries // initialize the UART (serial port) uartInit(); // set the baud rate of the UART for our debug/reporting output uartSetBaudRate(9600); // set uartSendByte as the output for all rprintf statements rprintfInit(uartSendByte); // initialize the timer system timerInit(); // print a little intro message so we know things are working rprintf("\r\nWelcom to Servo Test!\r\n"); // being servo test servoTest(); return 0; }