Functions | |
| void | e_set_led (unsigned int led_number, unsigned int value) |
| turn on/off the specified LED | |
| void | e_led_clear (void) |
| turn off the 8 LEDs | |
| void | e_blink_led (void) |
| Change the state of all LED. | |
| void | e_blink_led0 (void) |
| Change the state of LED0. | |
| void | e_blink_led1 (void) |
| Change the state of LED1. | |
| void | e_blink_led2 (void) |
| Change the state of LED2. | |
| void | e_blink_led3 (void) |
| Change the state of LED3. | |
| void | e_blink_led4 (void) |
| Change the state of LED4. | |
| void | e_blink_led5 (void) |
| Change the state of LED5. | |
| void | e_blink_led6 (void) |
| Change the state of LED6. | |
| void | e_blink_led7 (void) |
| Change the state of LED7. | |
| void | e_set_body_led (unsigned int value) |
| turn on/off the body LED | |
| void | e_set_front_led (unsigned int value) |
| turn on/off the front LED | |
| void | e_start_led_blinking (int cycle) |
| Start blinking all LED. | |
| void | e_stop_led_blinking (void) |
| Stop blinking all LED. | |
| void | flow_led (void) |
| The leds go on from the front to the back and go off from the front to the back, etc. | |
| void | snake_led (void) |
| One led is on and turn clockwise. | |
| void | k2000_led (void) |
| The K2000 effect. | |
| void | right_led (void) |
| The right LED are indicating the right side. | |
| void | left_led (void) |
| The left LED are indicating the left side. | |
Here we use the agenda solution to make the LED blinking.
A little exemple for LEDs blinking with agenda (all LEDs blink with 100ms delay)
#include <p30f6014A.h> #include <motor_led/e_epuck_ports.h> #include <motor_led/e_init_port.h> #include <motor_led/advance_one_timer/e_led.h> #include <motor_led/advance_one_timer/e_agenda.h> int main(void) { e_init_port(); e_activate_agenda(e_blink_led, 1000); //blink with 100ms e_start_agendas_processing(); while(1) {} }
| void e_blink_led | ( | void | ) |
| void e_blink_led0 | ( | void | ) |
| void e_blink_led1 | ( | void | ) |
| void e_blink_led2 | ( | void | ) |
| void e_blink_led3 | ( | void | ) |
| void e_blink_led4 | ( | void | ) |
| void e_blink_led5 | ( | void | ) |
| void e_blink_led6 | ( | void | ) |
| void e_blink_led7 | ( | void | ) |
| void e_led_clear | ( | void | ) |
turn off the 8 LEDs
The e-puck has 8 green LEDs. This function turn all off.
| void e_set_body_led | ( | unsigned int | value | ) |
turn on/off the body LED
The e-puck has a green LED that illuminate his body. With this function, you can change the state of these LED.
| value | 0 (off), 1 (on) otherwise change the state |
| value | 0 (off), 1 (on) otherwise change the state |
| void e_set_front_led | ( | unsigned int | value | ) |
turn on/off the front LED
The e-puck has a red LED in the front. With this function, you can change the state of these LED.
| value | 0 (off), 1 (on) otherwise change the state |
| value | 0 (off), 1 (on) otherwise change the state |
| void e_set_led | ( | unsigned int | led_number, | |
| unsigned int | value | |||
| ) |
turn on/off the specified LED
The e-puck has 8 green LEDs. With this function, you can change the state of these LEDs.
| led_number | between 0 and 7 | |
| value | 0 (off), 1 (on) otherwise change the state |
| void e_start_led_blinking | ( | int | cycle | ) |
Start blinking all LED.
| cycle | the number of cycle we wait before launching e_blink_led(void) |
| cycle | the number of cycle we wait before launching "e_blink_led()" |
| void e_stop_led_blinking | ( | void | ) |
Stop blinking all LED.
This function use e_destroy_agenda(void (*func)(void))
| void flow_led | ( | void | ) |
The leds go on from the front to the back and go off from the front to the back, etc.
| void k2000_led | ( | void | ) |
The K2000 effect.
| void left_led | ( | void | ) |
The left LED are indicating the left side.
| void right_led | ( | void | ) |
The right LED are indicating the right side.
| void snake_led | ( | void | ) |
One led is on and turn clockwise.
1.5.4