Functions | |
| void | e_init_micro (void) |
| Init the microphone A/D converter. | |
| void | e_get_micro (int *m1, int *m2, int *m3) |
| To get the m0, m1, m2 microphones's values. | |
A little exemple which takes the volume of micro1 and if the sound level is more than 2000. The LED1 is turned on.
#include <p30f6014A.h> #include <motor_led/e_epuck_ports.h> #include <motor_led/e_init_port.h> #include <a_d/e_micro.h> int main(void) { int m1, m2, m3; e_init_port(); e_init_micro(); while(1) { long i; e_get_micro(&m1, &m2, &m3); if(m1 < 2000) LED0 = 0; else LED0 = 1; for(i=0; i<100000; i++) { asm("nop"); } } }
| void e_get_micro | ( | int * | m0, | |
| int * | m1, | |||
| int * | m2 | |||
| ) |
To get the m0, m1, m2 microphones's values.
| m0 | A pointer to store the m0 analogic value | |
| m1 | A pointer to store the m1 analogic value | |
| m2 | A pointer to store the m2 analogic value |
| void e_init_micro | ( | void | ) |
Init the microphone A/D converter.
1.5.4