#include <p30Fxxxx.h>
#include <dsp.h>
#include "math.h"
#include "motor_led/e_epuck_ports.h"
#include "motor_led/e_init_port.h"
#include "a_d/advance_ad_scan/e_ad_conv.h"
#include "fft/e_fft.h"
#include "fft/e_fft_utilities.h"
#include "motor_led/advance_one_timer/e_motors.h"
#include "motor_led/advance_one_timer/e_agenda.h"
#include "motor_led/advance_one_timer/e_led.h"
Functions | |
| int | localise_pic_max (fractcomplex *spectre, int spectre_length) |
| Localize the bigger pic of the array. | |
| int | get_volume (fractcomplex *spectre, int pic_pos) |
| Get the max volume of the sound detected. | |
| void | display_volume_on_led (int volume) |
| Display the volume of the soud detected on the LEDs. | |
| int | calcul_frequence (int pic_pos) |
| Calcul the corresponding frequency of the bigger pic detected. | |
| void | set_speed (int frequency) |
| Set the speed of the e-puck. | |
| void | run_fft_listener (void) |
| The "main" function of the demo. | |
| int calcul_frequence | ( | int | pic_pos | ) |
Calcul the corresponding frequency of the bigger pic detected.
| pic_pos | The index of the bigger pic detected |
| void display_volume_on_led | ( | int | volume | ) |
Display the volume of the soud detected on the LEDs.
| volume | The max volume of the sound detected |
| int get_volume | ( | fractcomplex * | spectre, | |
| int | pic_pos | |||
| ) |
Get the max volume of the sound detected.
| spectre | The array in which the FFT was made | |
| pic_pos | The index of the louder frequency |
| int localise_pic_max | ( | fractcomplex * | spectre, | |
| int | spectre_length | |||
| ) |
Localize the bigger pic of the array.
| spectre | The array in which the FFT was made | |
| spectre_length | The length of the scan in the array |
| void set_speed | ( | int | frequency | ) |
Set the speed of the e-puck.
Set the speed of the e-puck relatively of the frequency of the sound detected.
| frequency | The frequence of the sound |
1.5.4