![]() |
embedded system library for e-puck
1.0.1
A redesigned API library for the e-puck robot platform
|
This is the main header file of this library. More...
#include "el_common.h"
#include "el_clock.h"
#include "el_random.h"
#include "el_process.h"
#include "el_timer.h"
#include "el_trigger.h"
#include "el_led.h"
#include "el_stepper_motor.h"
#include "el_camera.h"
#include "el_ir_receiver.h"
#include "el_accelerometer.h"
#include "el_ir_proximity.h"
#include "el_uart.h"
Go to the source code of this file.
Functions | |
void | el_initialization () |
initialize the library More... | |
void | el_calibrate_sensors () |
calibrate the proximity sensors and setup a random seed More... | |
void | el_sleep (el_time time_ms) |
delay a period of time given in millisecond More... | |
void | el_main_loop () |
the "engine" that drives the software components in this library More... | |
void | el_break_main_loop () |
signal el_main_loop to stop More... | |
void | el_reset () |
reset the microcontroller More... | |
This is the main header file of this library.
void el_initialization | ( | ) |
initialize the library
This function initializes the library. It should only be executed once in the beginning of the program.
void el_calibrate_sensors | ( | ) |
calibrate the proximity sensors and setup a random seed
Currently, this function calibrate the proximity sensors on the robot as well as generate a random seed based on the noisy sensor readings. If one finds the random seed not diverse enough across a number of robots, el_random_set_seed can be used to apply a random seed using any improved method.
Note: this function takes about 600 ms to finish.
void el_sleep | ( | el_time | time_ms | ) |
delay a period of time given in millisecond
This delay function works only within the main
function but not in any process. Within a process, time delay is achieved by el_process_wait.
void el_main_loop | ( | ) |
the "engine" that drives the software components in this library
This is the primary function that drives all of the software components in this library, including Trigger, Timer and Process.
The standard way to use this library is that: most of the user's code are written in one or more processes/triggers while the main
function just enters this function and keeps running it for the life time. See the examples for the practical usage.
void el_break_main_loop | ( | ) |
signal el_main_loop to stop
This function breaks the loop inside el_main_loop and let it returns. At the moment when this function is called, all of the software components are virtually frozen. This means: any process in waiting/cooperating will no longer be resumed and no further trigger/timer actions will happen.
It is recommended that el_main_loop is only entered once in a program's life time. Thus, after el_main_loop returns, the program should just clear things up and proceed to reset, rather than re-entering el_main_loop at some time.
void el_reset | ( | ) |
reset the microcontroller
This is equivalent to tap the reset button.