Skip to content

Commit 828be1f

Browse files
Merge pull request #37 from andre-stefanov/feature/platformio
Feature/platformio
2 parents fed13f2 + b6b295b commit 828be1f

39 files changed

+218
-451
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.pio
2+
.vscode

Software/Arduino code/OpenAstroTracker/DayTime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Utility.h"
1+
#include "Utility.hpp"
22
#include "DayTime.hpp"
33

44
///////////////////////////////////

Software/Arduino code/OpenAstroTracker/DayTime.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define _DAYTIME_HPP_
33

44
#include <Arduino.h>
5-
#include "Globals.h"
5+
#include "Globals.hpp"
66

77
// A class to handle hours, minutes, seconds in a unified manner, allowing
88
// addition of hours, minutes, seconds, other times and conversion to string.

Software/Arduino code/OpenAstroTracker/Globals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Globals.h"
1+
#include "Globals.hpp"
22
#include <EEPROM.h>
33

44
void EEPROMupdate(int loc, byte val)

Software/Arduino code/OpenAstroTracker/Globals.h renamed to Software/Arduino code/OpenAstroTracker/Globals.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef _GLOBALS_H_
2-
#define _GLOBALS_H_
1+
#ifndef _GLOBALS_HPP_
2+
#define _GLOBALS_HPP_
33

44
#include <Arduino.h>
55
#include <WString.h>

Software/Arduino code/OpenAstroTracker/InterruptCallback.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "InterruptCallback.h"
2-
#include "Utility.h"
1+
#include "InterruptCallback.hpp"
2+
#include "Utility.hpp"
33

44
//////////////////////////////////////
55
// This is an hardware-independent abstraction layer over

Software/Arduino code/OpenAstroTracker/InterruptCallback.h renamed to Software/Arduino code/OpenAstroTracker/InterruptCallback.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include "Globals.h"
2+
#include "Globals.hpp"
33

44
//////////////////////////////////////
55
// This is an hardware-independent abstraction layer over

Software/Arduino code/OpenAstroTracker/LcdMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Utility.h"
1+
#include "Utility.hpp"
22
#include "LcdMenu.hpp"
33

44
#ifndef HEADLESS_CLIENT

Software/Arduino code/OpenAstroTracker/LcdMenu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#ifndef HEADLESS_CLIENT
66
#include <LiquidCrystal.h>
77
#endif
8-
#include "Globals.h"
8+
#include "Globals.hpp"
99

1010
// A single menu item (like RA, HEAT, POL, etc.)
1111
// The ID is just a number, it has no relevance for the order of the items

Software/Arduino code/OpenAstroTracker/MeadeCommandProcessor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include "MeadeCommandProcessor.h"
2-
#include "Globals.h"
3-
#include "Utility.h"
1+
#include "MeadeCommandProcessor.hpp"
2+
#include "Globals.hpp"
3+
#include "Utility.hpp"
44
#include "WifiControl.hpp"
55

66
/////////////////////////////////////////////////////////////////////////////////////////

Software/Arduino code/OpenAstroTracker/Mount.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#include <EEPROM.h>
22

3-
#include "InterruptCallback.h"
3+
#include "InterruptCallback.hpp"
44

55
#include "LcdMenu.hpp"
66
#include "Mount.hpp"
7-
#include "Utility.h"
7+
#include "Utility.hpp"
88

99
//mountstatus
1010
#define STATUS_PARKED 0B0000000000000000

Software/Arduino code/OpenAstroTracker/Mount.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <LiquidCrystal.h>
55
#include <AccelStepper.h>
6-
#include "Globals.h"
6+
#include "Globals.hpp"
77
#include "DayTime.hpp"
88
#include "LcdMenu.hpp"
99

Binary file not shown.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*
2+
=======================================================================================================================================
3+
4+
Version 1.6
5+
6+
1. Connect your Arduino, under tools choose "Arduino Uno", set the right Port and set "Arduino ISP" as the Programmer.
7+
2. Hit upload (Ctrl-U)
8+
9+
You might need to download the "AccelStepper" library by Mike McCauley
10+
11+
Authors: /u/intercipere
12+
/u/clutchplate
13+
/u/EorEquis
14+
15+
=======================================================================================================================================
16+
*/
17+
#include "Globals.hpp"
18+
19+
String version = "V1.7.04";
20+
21+
///////////////////////////////////////////////////////////////////////////
22+
// Please see the Globals.h file for configuration of the firmware.
23+
///////////////////////////////////////////////////////////////////////////
24+
25+
// See NORTHERN_HEMISPHERE in Globals.h if you not in the northern hemisphere
26+
27+
28+
// RA stepper //////////////////////////////////////////////////////////////////////////////////
29+
30+
31+
// This is how many steps your 28BYJ-48 stepper needs for a full rotation. It is almost always 4096.
32+
// This code drives the steppers in halfstep mode for TRK and DEC, and full step for RA
33+
float RAStepsPerRevolution = 4096;
34+
35+
// The radius of the surface that the belt runs on (in V1 of the ring) was 168.24mm.
36+
// Belt moves 40mm for one stepper revolution (2mm pitch, 20 teeth).
37+
// RA wheel is 2 x PI x 168.24mm (V2:180mm) circumference = 1057.1mm (V2:1131mm)
38+
// One RA revolution needs 26.43 (1057.1mm / 40mm) stepper revolutions (V2: 28.27 (1131mm/40mm))
39+
// Which means 108245 steps (26.43 x 4096) moves 360 degrees (V2: 115812 steps (28.27 x 4096))
40+
// So there are 300.1 steps/degree (108245 / 360) (V2: 322 (115812 / 360))
41+
// Theoretically correct RA tracking speed is 1.246586 (300 x 14.95903 / 3600) (V2 : 1.333800 (322 x 14.95903 / 3600) steps/sec
42+
43+
// Your drive pulley tooth count:
44+
#define RAPulleyTeeth 16
45+
// the Circumference of the RA wheel
46+
// V1: 1057.1
47+
// V2: 1131
48+
#define RACircumference 1131
49+
50+
int RAStepsPerDegree = (RACircumference / (RAPulleyTeeth * 2.0) * RAStepsPerRevolution / 360.0); // V2 Ring has belt in a groove and belt runs on bearings
51+
52+
53+
// DEC stepper //////////////////////////////////////////////////////////////////////////////////
54+
55+
float DECStepsPerRevolution = 4096;
56+
57+
// Belt moves 40mm for one stepper revolution (2mm pitch, 20 teeth).
58+
// DEC wheel is 2 x PI x 90mm circumference which is 565.5mm
59+
// One DEC revolution needs 14.13 (565.5mm/40mm) stepper revolutions
60+
// Which means 57907 steps (14.14 x 4096) moves 360 degrees
61+
// So there are 160.85 steps/degree (57907/360)
62+
#define DecPulleyTeeth 16
63+
64+
int DECStepsPerDegree = (565.5 / (DecPulleyTeeth * 2.0) * DECStepsPerRevolution / 360.0);
65+
66+
int RAspeed = 400; // You can change the speed and acceleration of the steppers here. Max. Speed = 600. High speeds tend to make
67+
int RAacceleration = 600; // these cheap steppers unprecice
68+
int DECspeed = 800;
69+
int DECacceleration = 400;
70+
71+
// Define some stepper limits to prevent physical damage to the tracker. This assumes that the home
72+
// point (zero point) has been correctly set to be pointing at the celestial pole.
73+
// Note: these are currently not used
74+
float RAStepperLimit = 15500; // Going much more than this each direction will make the ring fall off the bearings.
75+
76+
// These are for 47N, so they will need adjustment if you're a lot away from that.
77+
// You can use the CTRL menu to find the limits and place them here. I moved it
78+
// down until my lens was horizontal. Note the DEC number. Then move it up until
79+
// the lens is horizontal and note that number. Put those here. Always watch your
80+
// tracker and hit RESET if it approaches a dangerous area.
81+
// Note: these are currently not used
82+
float DECStepperDownLimit = 10000; // Going much more than this will make the lens collide with the ring
83+
float DECStepperUpLimit = -22000; // Going much more than this is going below the horizon.
84+
85+
// These values are needed to calculate the current position during initial alignment.
86+
int PolarisRAHour = 2;
87+
int PolarisRAMinute = 58;
88+
int PolarisRASecond = 4;
89+
// Use something like Stellarium to look up the RA of Polaris in JNow (on date) variant.
90+
// This changes slightly over weeks, so adjust every couple of months.
91+
// This value is from 18.Apr.2020, next adjustment suggested at end 2020
92+
// The same could be done for the DEC coordinates but they dont change significantly for the next 5 years
Lines changed: 16 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,16 @@
1-
/*
2-
=======================================================================================================================================
3-
4-
Version 1.6
5-
6-
1. Connect your Arduino, under tools choose "Arduino Uno", set the right Port and set "Arduino ISP" as the Programmer.
7-
2. Hit upload (Ctrl-U)
8-
9-
You might need to download the "AccelStepper" library by Mike McCauley
10-
11-
Authors: /u/intercipere
12-
/u/clutchplate
13-
/u/EorEquis
14-
15-
=======================================================================================================================================
16-
*/
17-
#include "Globals.h"
18-
19-
String version = "V1.7.04";
20-
21-
///////////////////////////////////////////////////////////////////////////
22-
// Please see the Globals.h file for configuration of the firmware.
23-
///////////////////////////////////////////////////////////////////////////
24-
25-
// See NORTHERN_HEMISPHERE in Globals.h if you not in the northern hemisphere
26-
27-
28-
// RA stepper //////////////////////////////////////////////////////////////////////////////////
29-
30-
31-
// This is how many steps your 28BYJ-48 stepper needs for a full rotation. It is almost always 4096.
32-
// This code drives the steppers in halfstep mode for TRK and DEC, and full step for RA
33-
float RAStepsPerRevolution = 4096;
34-
35-
// The radius of the surface that the belt runs on (in V1 of the ring) was 168.24mm.
36-
// Belt moves 40mm for one stepper revolution (2mm pitch, 20 teeth).
37-
// RA wheel is 2 x PI x 168.24mm (V2:180mm) circumference = 1057.1mm (V2:1131mm)
38-
// One RA revolution needs 26.43 (1057.1mm / 40mm) stepper revolutions (V2: 28.27 (1131mm/40mm))
39-
// Which means 108245 steps (26.43 x 4096) moves 360 degrees (V2: 115812 steps (28.27 x 4096))
40-
// So there are 300.1 steps/degree (108245 / 360) (V2: 322 (115812 / 360))
41-
// Theoretically correct RA tracking speed is 1.246586 (300 x 14.95903 / 3600) (V2 : 1.333800 (322 x 14.95903 / 3600) steps/sec
42-
43-
// Your drive pulley tooth count:
44-
#define RAPulleyTeeth 16
45-
// the Circumference of the RA wheel
46-
// V1: 1057.1
47-
// V2: 1131
48-
#define RACircumference 1131
49-
50-
int RAStepsPerDegree = (RACircumference / (RAPulleyTeeth * 2.0) * RAStepsPerRevolution / 360.0); // V2 Ring has belt in a groove and belt runs on bearings
51-
52-
53-
// DEC stepper //////////////////////////////////////////////////////////////////////////////////
54-
55-
float DECStepsPerRevolution = 4096;
56-
57-
// Belt moves 40mm for one stepper revolution (2mm pitch, 20 teeth).
58-
// DEC wheel is 2 x PI x 90mm circumference which is 565.5mm
59-
// One DEC revolution needs 14.13 (565.5mm/40mm) stepper revolutions
60-
// Which means 57907 steps (14.14 x 4096) moves 360 degrees
61-
// So there are 160.85 steps/degree (57907/360)
62-
#define DecPulleyTeeth 16
63-
64-
int DECStepsPerDegree = (565.5 / (DecPulleyTeeth * 2.0) * DECStepsPerRevolution / 360.0);
65-
66-
int RAspeed = 400; // You can change the speed and acceleration of the steppers here. Max. Speed = 600. High speeds tend to make
67-
int RAacceleration = 600; // these cheap steppers unprecice
68-
int DECspeed = 800;
69-
int DECacceleration = 400;
70-
71-
// Define some stepper limits to prevent physical damage to the tracker. This assumes that the home
72-
// point (zero point) has been correctly set to be pointing at the celestial pole.
73-
// Note: these are currently not used
74-
float RAStepperLimit = 15500; // Going much more than this each direction will make the ring fall off the bearings.
75-
76-
// These are for 47N, so they will need adjustment if you're a lot away from that.
77-
// You can use the CTRL menu to find the limits and place them here. I moved it
78-
// down until my lens was horizontal. Note the DEC number. Then move it up until
79-
// the lens is horizontal and note that number. Put those here. Always watch your
80-
// tracker and hit RESET if it approaches a dangerous area.
81-
// Note: these are currently not used
82-
float DECStepperDownLimit = 10000; // Going much more than this will make the lens collide with the ring
83-
float DECStepperUpLimit = -22000; // Going much more than this is going below the horizon.
84-
85-
// These values are needed to calculate the current position during initial alignment.
86-
int PolarisRAHour = 2;
87-
int PolarisRAMinute = 58;
88-
int PolarisRASecond = 4;
89-
// Use something like Stellarium to look up the RA of Polaris in JNow (on date) variant.
90-
// This changes slightly over weeks, so adjust every couple of months.
91-
// This value is from 18.Apr.2020, next adjustment suggested at end 2020
92-
// The same could be done for the DEC coordinates but they dont change significantly for the next 5 years
1+
#include "OpenAstroTracker.hpp"
2+
#include "a_inits.hpp"
3+
#include "b_setup.hpp"
4+
#include "c65_startup.hpp"
5+
#include "c70_menuRA.hpp"
6+
#include "c71_menuDEC.hpp"
7+
#include "c722_menuPOI.hpp"
8+
#include "c725_menuHOME.hpp"
9+
#include "c72_menuHA.hpp"
10+
#include "c74_menuHEAT.hpp"
11+
#include "c75_menuCTRL.hpp"
12+
#include "c76_menuCAL.hpp"
13+
#include "c78_menuINFO.hpp"
14+
#include "c_buttons.hpp"
15+
#include "f_serial.hpp"
16+
#include "g_bluetooth.hpp"

Software/Arduino code/OpenAstroTracker/OpenAstroTracker.sln

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)