- Main Page
- Modules
- Data Structures
- Files
- Directories

# e_micro.h File Reference

Accessing the microphone data. More...

## Defines
#define | MIC0_BUFFER 0
#define | MIC1_BUFFER 1
#define | MIC2_BUFFER 2
## Functions
int | e_get_micro (unsigned int micro_id)
| Get the last value of a given micro.
int | e_get_micro_average (unsigned int micro_id, unsigned int filter_size)
| Get the average on a given number of sample from a micro.
int | e_get_micro_volume (unsigned int micro_id)
| Get the difference between the highest and lowest sample.

## Detailed Description

Accessing the microphone data.

The functions of this file are made to deal with the microphones data. You can simply get the current value of a given microphone. You can know the volume of noise that the e-puck is enduring. You can average the signal with a specified size.

Author:
  Code: Borter Jean-Joel
  Doc: Jonathan Besuchet

## Define Documentation

#define MIC0_BUFFER 0

#define MIC1_BUFFER 1

#define MIC2_BUFFER 2

## Function Documentation

int e_get_micro | ( | unsigned int | micro_id | ) |

Get the last value of a given micro.

Parameters:

  | micro_id | micro's ID (0, 1, or 2) (use MIC0_BUFFER, MIC1_BUFFER , MIC2_BUFFER defined in e_micro.h)

Returns:
  result last value of the micro

int e_get_micro_average | ( | unsigned int | micro_id,
|  | unsigned int | filter_size |
| ) |  |  |

Get the average on a given number of sample from a micro.

Parameters:

  | micro_id | micro's ID (0, 1, or 2) (use MIC0_BUFFER, MIC1_BUFFER , MIC2_BUFFER defined in e_micro.h)
  | filter_size | number of sample to average

Returns:
  result last value of the micro

int e_get_micro_volume | ( | unsigned int | micro_id | ) |

Get the difference between the highest and lowest sample.

Parameters:

  | micro_id | micro's ID (0, 1, or 2) (use MIC0_BUFFER, MIC1_BUFFER , MIC2_BUFFER defined in e_micro.h)

Returns:
  result volume