- Main Page
- Files

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

The shocks detector. More...

`#include "p30f6014A.h"`
`#include "stdio.h"`
`#include "string.h"`
`#include "codec/e_sound.h"`
`#include "motor_led/e_init_port.h"`
`#include "motor_led/advance_one_timer/e_led.h"`
`#include "motor_led/advance_one_timer/e_motors.h"`
`#include "uart/e_uart_char.h"`
`#include "a_d/advance_ad_scan/e_ad_conv.h"`
`#include "a_d/advance_ad_scan/e_acc.h"`
`#include "math.h"`
`#include "utility.h"`

## Functions
void | run_accelerometer ()
| The "main" function of the demo.

## Detailed Description

The shocks detector.

## Introduction

This demo uses the acceleromter to detect the direction of the shocks enduring by the e-puck.
When the e-puck has deteced a shock, he plays a sound and show you the direction of this shock by turning on the appropriated LED.

## Playing the demo

First of all, move the selector to the position 0 and reset the e-puck.
Then you only have to hit the e-puck and a LED will turn on to show you the direction of the shock that the e-puck has detected. The e-puck will also play a sound.
If you let the e-puck falling, he detects the "zero_G" and beginn to cry.

## Video of the demo

The video of this demo: http://www.youtube.com/watch?v=NCK9gRL9mb4

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