-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotter.h
52 lines (45 loc) · 1.04 KB
/
plotter.h
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
42
43
44
45
46
47
48
49
50
51
52
// Copyright 2021 Peter Siegel [email protected]
#ifndef PLOTTER_H
#define PLOTTER_H
#include <Arduino.h>
#include <AccelStepper.h>
#include <Servo.h>
#include "clock.h"
class Axis : public AccelStepper
{
public:
Axis(int8_t, int, int);
void moveMillimeters(float);
void moveToMillimeters(float);
float currentPositionMillimeters();
void setSpeedMillimeters(float);
};
class Effector : public Servo
{
public:
Effector();
void position(int8_t);
};
class Plotter
{
public:
Plotter();
bool moveDone();
void setSpeed(float);
void home(float);
void move(float, float);
void moveTo(float, float);
bool run();
bool runSpeedToPosition();
void drawDigit(Digit, float, float);
void eraseDigit(Digit, float, float);
void drawClock(Clock *, float, float);
void eraseClock(Clock *, float, float);
void eraseBoard(float, float, float, float);
void drawDelimiter(Delimiter *, float, float);
public:
Axis *axisLeft;
Axis *axisRight;
Effector *effector;
};
#endif /* PLOTTER_H */