-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPolarGraph.ino
36 lines (33 loc) · 999 Bytes
/
PolarGraph.ino
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
#include "compile.h"
#include "Hardware.h"
#include "InterpolateRadii.h"
#include "Coordinates.h"
#ifdef COMPILE_IN_ONE_FILE
#define COMPILE_THIS
#include "Coordinates.cpp"
#include "InterpolateRadii.cpp"
#include "Interpolate.cpp"
#endif
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
}
void loop() {
// put your main code here, to run repeatedly:
InterpolateRadii intertpolate(0, 0, 1000, 1000, DISTANCE_BETWEEN_MOTORS_STEPS, COG_RADIUS_STEPS, MINIMUM_LINE_LENGTH);
const Index count = intertpolate.NumberOfValues();
for (Index i = 0; i < count; i++)
{
Serial.print(intertpolate.R1(i));
Serial.print(" ");
Serial.println(intertpolate.R2(i));
}
Serial.println("---------------------------");
Coordinates c(0, 0, DISTANCE_BETWEEN_MOTORS_STEPS, COG_RADIUS_STEPS);
Serial.print(c.R1());
Serial.print(" ");
Serial.println(c.R2());
}