-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathController.h
More file actions
36 lines (31 loc) · 717 Bytes
/
Controller.h
File metadata and controls
36 lines (31 loc) · 717 Bytes
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
/* Class to control motion of clock */
#if defined(ARDUINO) && ARDUINO >= 100
#include <Arduino.h>
#else
#include <WProgram.h>
#endif
#include "CustomStepper.h"
#include "Clock.h"
#ifndef CONTROLLER_H
#define CONTROLLER_H
class Controller {
public:
Controller(CustomStepper *stepperH,CustomStepper *stepperM,Clock *clock);
void init();
void readinput();
void run();
void dump();
private:
String commandbuffer;
Clock *_clock;
CustomStepper *_stepperH;
CustomStepper *_stepperM;
float CalcMinutePos(int m, int s);
float CalcHourPos(int h, int m);
void Adjust();
float hourAdjust;
float minuteAdjust;
bool running;
float _positions[12];
};
#endif