int main(void) { initRP6Control(); // Always call this first! The Processor will not work // correctly otherwise. initLCD(); // Initialize the LC-Display (LCD) // Always call this before using the LCD! writeString_P("\n\nRP6 CONTROL: C-code examples\n"); showScreenLCD("C Code examples", " ...."); run_testCases(); return 0; }
int main (int argc, char * argv[]) { run_testCases(); return 0; }
int main(void) { initRP6Control(); // Always call this first! // The Processor will not work correctly otherwise. initLCD(); // Initialize the LC-Display (LCD) // Always call this before using the LCD! // Play two sounds with the Piezo Beeper on the RP6Control: sound(180,80,25); sound(220,80,0); //IMPORTANT: I2CTWI_initMaster(100); // Initialize the TWI Module for Master operation // with 100kHz SCL Frequency // Register the event handlers: I2CTWI_setTransmissionErrorHandler(I2C_transmissionError); // Write a text message to the UART: writeString_P("{cmd=0x"); writeInteger(CMD_LIFETIME, HEX); writeString_P("}\n"); run_testCases(); // Define a counting variable: //uint16_t counter = 0; // clear the UART buffer once at the start of the program clearReceptionBuffer(); mSleep(1000); setStopwatch1(500); startStopwatch1(); while(true) { //example of receiving some data over UART DoDataProcess(); if(move_turning!=0) { if(move_turning == 1) { rotate(60, LEFT, 3, false); } else { rotate(60, RIGHT, 3, false); } } else if(move_horizontal != 0) { if(move_horizontal > 0) { move(move_horizontal, FWD, 3, false); } else { move(move_horizontal, BWD, 3, false); } } //mSleep(100); // delay 100ms = 0.1s } return 0; }