Since everyone builds variations of the hardware according to skill level, budgets and other constraints, the firmware that runs the mount needs to be configured to work with all the different variations.
We will assume that you have downloaded the code from github as described on the Firmware page and are ready to configure your tracker.
The firmware configuration happens in a file called configuration_local.hpp
. Note that thsi file does not exist in the download or the repo, since it is different for everyone.
To get started, copy the file named Configuration_sample_local.hpp
to Configuration_local.hpp
.
Load this file in your favorite editor and make edits as needed.
There is now a online configuration tool that can help you to get the
Configuration_local.hpp
file configure correctly.
The file is a C/C++ header file. This means:
//
sequence makes the rest of the line a comments/*
starts a comment that can span multiple lines and ends with a */
#define
VARIABLE VALUEconstants.hpp
. If you see a define that does not use a number, it is using a predefined value defined in constants.hpp
.The following things are the minimum you need to define:
If you are in the southern hemisphere, you'll need to change #define NORTHERN_HEMISPHERE
to be set to 0
instead of 1
.
The sample comes configured for our default board, the Arduino Mega 256 (or a clone) by specifying #define BOARD
to our predefined variable BOARD_AVR_MEGA2560
. If you're using a different board, you'll need to change the BOARD
define by choosing the correct value from constants.hpp
, for example BOARD_ESP32_ESP32DEV
for the ESP32.
Depending on whether you are using NEMA17 steppers or the BYJ-48, you may need to set the RA_STEPPER_TYPE
and DEC_STEPPER_TYPE
to corresponding values from constants.hpp
. The variables RA_DRIVER_TYPE
and DEC_DRIVER_TYPE
need to be set to the correct drivers that you are using with your steppers. The sample config is setup for BYJ-48 with ULN2003 drivers.
If you have the GPS Add-on, you'll need to set USE_GPS
to 1
. For the digital level, you'll need to set USE_GYRO_LEVEL
to 1
. And for the AutoPA, you'll need to set AZIMUTH_ALTITUDE_MOTORS
to 1
.
Our primary supported display is the LCD Keypad shield and is automatically selected if you are compiling for a non-ESP32 board. If you have a different config, change DISPLAY_TYPE
as needed. If you don't have a display, set DISPLAY_TYPE
to DISPLAY_TYPE_NONE
.
You can edit or add some of the more advanced settings anywhere in your configuration_local.hpp
file.
For example, you may want to change any of the following things:
DEBUG_LEVEL
to various presets to get serial output with debugging statements). Not that you cannot connect OAT to any other software if you have debugging enabled. You'll have to use a serial monitor and issue commands yourself. An exception to this is the ESP32, since you can connect AP software (like OATControl or SkysafariPlus) via Wifi and debug via serial (USB) port.For the rare case that you might have multiple boards, you can create multiple configuration files. These need to be named for the board that they are meant for. The software will include them based on the BOARD
that you have defined.
For example for a plain Mega board, you can create a file called configuration_local_mega2560.hpp
at the same location as the other non-board specific configuration file configuration_local.hpp
.
Note that if both of these files are missing, the firmware will be setup as follows:
Northern hemisphere
in PlatformIO, the board is set according to what you chose to compile, in Arduino IDE, you will get an error.
No display
Both axes use a 28BYJ-48 stepper with ULN2003 drivers
No Wifi or any add-ons.