2012-04-28 16:42:59 +02:00
|
|
|
//Ultrasone.h
|
2012-05-29 18:10:16 +02:00
|
|
|
// V3.0
|
2012-04-28 16:42:59 +02:00
|
|
|
|
|
|
|
|
#ifndef ULTRASONE_H
|
|
|
|
|
#define ULTRASONE_H
|
|
|
|
|
|
|
|
|
|
#include "Arduino.h"
|
|
|
|
|
#include "Data.h"
|
|
|
|
|
#include "Servos.h"
|
|
|
|
|
#include "Converter.h"
|
|
|
|
|
|
|
|
|
|
#define MaxLeft -45
|
|
|
|
|
#define MaxRight 45
|
|
|
|
|
|
|
|
|
|
class Ultrasone
|
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
Servos SSC32;
|
|
|
|
|
Converter Con;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
void GetRadar(Data *DataLine);
|
|
|
|
|
|
|
|
|
|
int CurrentPosition;
|
|
|
|
|
byte CurrentDirection;
|
|
|
|
|
|
|
|
|
|
Ultrasone()
|
|
|
|
|
{
|
|
|
|
|
CurrentPosition = 0;
|
|
|
|
|
CurrentDirection = 0; // Left
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|