Skip to content

Commit 804c33b

Browse files
V1.6.21 - Update
- Implemented Meade protocol extension :GIT# that returns whether the tracking is on or not. - Implemented Meade protocol extension :MTn# that turns tracking on or off. - Added full Meade command list and descriptions to Serial.ino comments.
1 parent ee9bbc9 commit 804c33b

File tree

2 files changed

+160
-4
lines changed

2 files changed

+160
-4
lines changed

Software/Arduino code/OpenAstroTracker/OpenAstroTracker.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
=======================================================================================================================================
33
4-
Version 1.6.20
4+
Version 1.6.21
55
66
1. Connect your Arduino, under tools choose "Arduino Uno", set the right Port and set "Arduino ISP" as the Programmer.
77
2. Hit upload (Ctrl-U)
@@ -16,7 +16,7 @@
1616
*/
1717
#include "Globals.h"
1818

19-
String version = "V1.6.20";
19+
String version = "V1.6.21";
2020

2121
///////////////////////////////////////////////////////////////////////////
2222
// Please see the Globals.h file for configuration of the firmware.

Software/Arduino code/OpenAstroTracker/f_serial.ino

Lines changed: 158 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,143 @@
11
#ifdef SUPPORT_SERIAL_CONTROL
22

3+
/////////////////////////////////////////////////////////////////////////////////////////
4+
//
5+
// Serial support
6+
//
7+
// The Serial protocol implemented her is the Meade protocol with some extensions.
8+
// The Meade protocol commands start with a colon and end with a hash.
9+
// The first letter determines the family of functions (G for Get, S for Set, M for Movement, etc.)
10+
//
11+
// The set of Meade features implemented are:
12+
//
13+
//------------------------------------------------------------------
14+
// INITIALIZE FAMILY
15+
//
16+
// :I# - Initialize Scope
17+
// This puts the Arduino in Serial Control Mode and displays RA on line 1 and
18+
// DEC on line 2 of the display. Serial Control Mode can be ended manually by
19+
// pressing the SELECT key, or programmatically with the :Qq# command.
20+
// Returns: nothing
21+
//
22+
//------------------------------------------------------------------
23+
// GET FAMILY
24+
//
25+
// :GVP#
26+
// Get the Product Name
27+
// Returns: 'OpenAstroTracker'
28+
//
29+
// :GVN#
30+
// Get the Firmware Version Number
31+
// Returns: 'V1.major.minor' from OpenAstroTracker.ino
32+
//
33+
// :Gd#
34+
// Get Target Declination
35+
// Where s is + or -, DD is degrees, MM is minutes, SS is seconds.
36+
// Returns: sDD*MM'SS
37+
//
38+
// :GD#
39+
// Get Current Declination
40+
// Where s is + or -, DD is degrees, MM is minutes, SS is seconds.
41+
// Returns: sDD*MM'SS
42+
//
43+
// :Gr#
44+
// Get Target Right Ascension
45+
// Where HH is hour, MM is minutes, SS is seconds.
46+
// Returns: HH:MM:SS
47+
//
48+
// :GR#
49+
// Get Current Right Ascension
50+
// Where HH is hour, MM is minutes, SS is seconds.
51+
// Returns: HH:MM:SS
52+
//
53+
// -- GET Extensions --
54+
// :GIS#
55+
// Get DEC or RA Slewing
56+
// Returns: 1 if either RA or DEC is slewing. 0 if not.
57+
//
58+
// :GIT#
59+
// Get Tracking
60+
// Returns: 1 if tracking is on. 0 if not.
61+
//
62+
//------------------------------------------------------------------
63+
// SET FAMILY
64+
//
65+
// :SdsDD*MM:SS#
66+
// Set Target Declination
67+
// This sets the target DEC. Use a Movement command to slew there.
68+
// Where s is + or -, DD is degrees, MM is minutes, SS is seconds.
69+
// Returns: 1 if successfully set, otherwise 0
70+
//
71+
// :SrHH:MM:SS#
72+
// Set Right Ascension
73+
// This sets the target RA. Use a Movement command to slew there.
74+
// Where HH is hours, MM is minutes, SS is seconds.
75+
// Returns: 1 if successfully set, otherwise 0
76+
//
77+
// -- SET Extensions --
78+
// :SHHH:MM#
79+
// Set Hour Time (HA)
80+
// This sets the scopes HA.
81+
// Where HH is hours, MM is minutes.
82+
// Returns: 1 if successfully set, otherwise 0
83+
//
84+
// :SysDD*MM:SS.HH:MM:SS#
85+
// Synchronize Declination and Right Ascension.
86+
// This tells the scope what it is currently pointing at.
87+
// Where s is + or -, DD is degrees, HH is hours, MM is minutes, SS is seconds.
88+
// Returns: 1 if successfully set, otherwise 0
89+
//
90+
//------------------------------------------------------------------
91+
// MOVEMENT FAMILY
92+
//
93+
// :MS#
94+
// Start Slew to Target (Asynchronously)
95+
// This starts slewing the scope to the target RA and DEC coordinates and returns immediately.
96+
// Returns: 1
97+
//
98+
// -- MOVEMENT Extensions --
99+
// :MSy#
100+
// Slew to Target Synchronously
101+
// This slews the scope to the target RA and DEC coordinates before returning.
102+
// Returns: 1
103+
//
104+
// :MTs#
105+
// Set Tracking mode
106+
// This turns the scopes tracking mode on or off.
107+
// Where s is 1 to turn on Tracking and 0 to turn it off.
108+
// Returns: 1
109+
//
110+
//------------------------------------------------------------------
111+
// HOME FAMILY
112+
//
113+
// :hP#
114+
// Park Scope and stop motors
115+
// This slews the scope back to it's home position (RA ring centered, DEC
116+
// at 90, basically pointing at celestial pole) and stops all movement (including tracking).
117+
// Returns: 1 when the scope is parked.
118+
//
119+
// -- PARK Extensions --
120+
// :hU#
121+
// Unpark Scope
122+
// This currently simply turns on tracking.
123+
// Returns: 1
124+
//
125+
//------------------------------------------------------------------
126+
// QUIT MOVEMENT FAMILY
127+
//
128+
// :Q#
129+
// Stop all motors
130+
// This stops all motors, including tracking. Note that deceleration curves are still followed.
131+
// Returns: 1 when all motors have stopped.
132+
//
133+
// -- QUIT MOVEMENT Extensions --
134+
// :Qq#
135+
// Disconnect, Quit Control mode
136+
// This quits Serial Control mode and starts tracking.
137+
// Returns: nothing
138+
//
139+
/////////////////////////////////////////////////////////////////////////////////////////
140+
3141
/////////////////////////////
4142
// INIT
5143
/////////////////////////////
@@ -46,11 +184,14 @@ void handleMeadeGetInfo(String inCmd) {
46184
Serial.print(mount.DECString(MEADE_STRING | CURRENT_STRING));
47185
}
48186
break;
49-
187+
50188
case 'I': {
51189
if (cmdTwo == 'S') {
52190
Serial.print(mount.isSlewingRAorDEC() ? "1" : "0");
53191
}
192+
else if (cmdTwo == 'T') {
193+
Serial.print(mount.isSlewingTRK() ? "1" : "0");
194+
}
54195
Serial.print("0");
55196
}
56197
break;
@@ -130,10 +271,25 @@ void handleMeadeMovement(String inCmd) {
130271
}
131272
Serial.print("1");
132273
}
274+
else if (inCmd[0] == 'T') {
275+
if (inCmd.length() > 1) {
276+
if (inCmd[1] == '1') {
277+
mount.startSlewing(TRACKING);
278+
Serial.print("1");
279+
}
280+
else if (inCmd[1] == '0') {
281+
mount.stopSlewing(TRACKING);
282+
Serial.print("1");
283+
}
284+
}
285+
else {
286+
Serial.print("0");
287+
}
288+
}
133289
}
134290

135291
/////////////////////////////
136-
// PARK
292+
// HOME
137293
/////////////////////////////
138294
void handleMeadeHome(String inCmd) {
139295
if (inCmd[0] == 'P') { // Park

0 commit comments

Comments
 (0)