- Main Page
- Files

# C:/Users/Michael/Desktop/trunk/program/demo/main_c.c File Reference

The main file of the demo. More...

`#include "p30f6014A.h"`
`#include "stdio.h"`
`#include "string.h"`
`#include "uart/e_uart_char.h"`
`#include "motor_led/e_init_port.h"`
`#include "ComModule.h"`
`#include "runcollaboration.h"`
`#include "runaccelerometer.h"`
`#include "runbreitenberg_adv.h"`
`#include "runlocatesound.h"`
`#include "runwallfollow.h"`
`#include "runfollowball.h"`
`#include "runfftlistener.h"`
`#include "rungrounddirection.h"`
`#include "utility.h"`

## Functions
int | main ()
| The main function of the application.

## Detailed Description

The main file of the demo.

This file regroups all the programmes demo. You can choose the one you want to try by moving the selector.
Here is the the demo corresponding to the selector position:

- Selector position 0: Show the ground direction. Look at rungrounddirection.h for more information.
- Selector position 1: Shock detection. Look at runaccelerometer.h for more information.
- Selector position 2: Locate the sound source. Look at runlocatesound.h for more information.
- Selector position 3: Follow the wall. Look at runwallfollow.h for more information.
- Selector position 4: Follow what is detected by the two front proximities detectors. Look at runbreitenberg_adv.h for more information.
- Selector position 5: Avoid the obstacles. Look at runbreitenberg_adv.h for more information.
- Selector position 6: Follow all balls. Look at runfollowball.h for more information.
- Selector position 7: Follow the red ball. Look at runfollowball.h for more information.
- Selector position 8: Follow the green ball. Look at runfollowball.h for more information.
- Other selector position: Command the e-puck with the sound. Look at runfftlistener.h for more information.

Warning:
  When you have made your selection with the selector, YOU MUST reset the e-puck (the blue button near the selector) to make your choice effective.

## The selector position:

Author:
  Code: Michael Bonani, Jonathan Besuchet
  Doc: Jonathan Besuchet

## Function Documentation

int main | ( |  | ) |

The main function of the application.

The main function launch one of the following self-governing function depending of the selector position: run_accelerometer(); run_locatesound(); run_wallfollow(); run_grounddirection(); run_breitenberg_follower(); run_breitenberg_shocker(); run_follow_ball_green(); run_follow_ball_red(); run_follow_ball(); run_fft_listener();