From Electronics\Hexapod\Arduino sketches 2011-2012\hexapodV3 (backup 2012-07-09).
40 lines
441 B
C++
40 lines
441 B
C++
//Ultrasone.h
|
|
// V3.0
|
|
|
|
#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
|
|
|
|
|
|
|
|
|