Example #1
0
int main(void){

    el_initialization();
    el_calibrate_sensors();
    el_uart_use_reset_code(true,128);
    
    BootingProcedure01_SelectorBarrier();
    
    el_launch_process(Process_ConsoleLoop,NULL);

    el_main_loop();

    return 0;
}
Example #2
0
int main(){

    el_initialization();

    /*
     * This is to let the robot automaticaly reset when TinyBootloader
     * attemps to write a new HEX, so you dont need to touch the reset
     * button.
     * To achieve this, TinyBootloader also needs to be configured:
     * in "Options" tab, set "Codes to send first" to 6.
     */
    el_uart_use_reset_code(true,6);

    /*
     * Put the robot in silence when the selector is in 0~3.
     */
    BootingProcedure01_SelectorBarrier();


    // see documentation for details about "elu_printf" and the UART module
    elu_printf("Hello World! This is e-puck!\n");

    // setup some process, which will be concurrenly executed in "el_main_loop()"
    el_launch_process(Process_LED_PatternA,NULL);
    el_launch_process(Process_LED_PatternB,NULL);
    el_launch_process(Process_LED_Control,NULL);

    el_led_set(EL_LED_BODY,EL_ON);

    elu_printf("setup finished\n");

    // this it the loop to run everything, including Timer, Process and Trigger. 
    el_main_loop();

    return 0;
}