#include "e_epuck_ports.h"
#include "e_led.h"
Functions | |
| void | e_set_led (unsigned int led_number, unsigned int value) |
| turn on/off the specified LED | |
| 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_led_clear (void) |
| turn off the 8 LEDs | |
#include <p30f6014A.h> #include <motor_led/e_epuck_ports.h> #include <motor_led/e_init_port.h> #include <motor_led/e_led.h> int main(void) { e_init_port(); while(1) { long i; for(i=0; i<500000; i++) asm("NOP"); e_set_led(8, 2); //switch the state of all leds } }
| 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 this LED.
| 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 this LED.
| 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 |
1.5.4