-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathG5500.h
More file actions
41 lines (37 loc) · 1.01 KB
/
G5500.h
File metadata and controls
41 lines (37 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*G5500.h - Library for interfacing with the Yaesu G5500 roator
controller. Note that no particular language support is implied,
as that is left to the user to implement.*/
#ifndef G5500_h
#define G5500_h
#include "Arduino.h"
class G5500
{
public:
G5500();
void setAzEl (int azimuth, int elevation);
void setAz (int azimuth);
void setEl (int elevation);
int getAz ();
int getEl ();
int getAzDegrees ();
int getElDegrees ();
private:
int _upPin = 10;
int _downPin = 11;
int _eastPin = 8;
int _westPin = 9;
int _LEDPin = 13;
int _azSensePin = A1;
int _elSensePin = A0;
//All of the following are determined experimentally
const int _zeroAzPoint = 2;
const int _maxAzPoint = 460;
const int _zeroElPoint= 0;
const int _maxElPoint = 960;
const float _elRes = 0.1875;
const float _azRes = 0.9826;
//Set for ~2 deg dead zones to avoid chattering the motors
const int _azDeadZone = 2;
const int _elDeadZone = 10;
};
#endif