sonar sensor is working in the version of code but the reading are not correct

Dependencies:   C12832 Pulse RangeFinder Servo mbed rtos

Fork of Team_Sprint2 by WIT_EmbOS_Gr1

README.txt

Committer:
Soldier7
Date:
2015-04-23
Revision:
24:00a577f64930
Parent:
7:24d62ef1ed34

File content as of revision 24:00a577f64930:

= Issues: =

* There are mainly two options to handle the camera.  Detached from the lamp or attached to the lamp head.
    The algorithm for the two, are very different therefore we have to consider it as soon as possible.
    The following evaluation is about the detached one if we go with it.

= The follwoing devices we should handle: =

* Sonar sensor.  We have to specify a working range where the detectable face can appear and should be followed.
    This range approx. 70-250cm which have to be calibrated at the build time.
    The working range data should be converted to between 0 and 1 value to easier manageable.

* Camera.  From the camera we are getting a horizontal and a vertical value of the tracked face from openCV to mbed, 
    which is the ratio value of the camera resolution between 0 and 1. 
    But because this is the position of the middle of the square around the face, it never 0 or 1, but around 0.1 - 0.9.
    
* Pan servo.  The pan servo should simply follow the face provided by the horizontal position.

* Tilt servo.  The tilt servo mainly similar with the pan, but it should be modified according to the neccessary
    up-down movement.  See the description below.

* Up-down servo.  The up-down servo should work together with the tilt one.  There are many solution could be develop.
    The following one is one of them.
    If the distance of the face is close to the minimum, then the vertical movement should be mostly followed 
    by the up-down servo.  If the face goes below or above the minimum-maximum position of the up-down servo, 
    then the out of range movement should be followed by the tilt servo.
    As long as the face goes far, it should be more followed by the tilt servo and less with the up-down.