![]() |
embedded system library for e-puck
1.0.1
A redesigned API library for the e-puck robot platform
|
achieving "do something when some event happens" More...
Files | |
file | el_trigger.h |
achieving "do something when some event happens"
A trigger can launch a process when a specified event occurs in the system. For example, a process can be launched automatically when the proximity sensors has a set of samples ready for use.
Example 4 used the trigger mechanism to realize a control algorithm that uses camera image as input and hence executes every time when the camera is refreshed.
Here is an example of a control loop that takes the proximity sensors as input. The example assumes that the stepper motor and the infrared proximity sensors are enabled beforehand and the proximity sensors are working in EL_IR_PROXIMITY_PULSE mode.
Related global variables and function prototypes:
Code to setup/clear the trigger:
Code of the trigger's process: