Configuration / Controller
In order to customize OnStepX behavior to each users requirements there are a variety of configuration settings in the Config.h file.
Many settings are optional but those settings that must always match your hardware and must be set properly are highlighted in red. In some cases that's enough to get a working telescope controller but usually you also have to fill in the stepper driver information also, at a minimum, which is highlighted in yellow. In all cases you should only change the Value column of the Config.h file to the required selection.
Also, while working on your Config.h file take note of the "Hint" column to the far right, it's there to assist you in determining which settings are critical and which can most often be ignored.
There are numerous checks performed at compile time: Read the compiler warnings and errors, they are there to help guard against invalid configurations.
The Config.h file settings are categorized as follows:
PINMAP
This lets OnStep know what hardware it's going to be running on. This also controls which pinmap is associated and which micro-controllers (MCU) aka "Boards" (ESP32, Teensy, STM32, etc.) are allowed.
Parameter Name
- PINMAP
- Default Value: OFF
- Other Values: MiniPCB, MiniPCB2, MaxPCB2, MaxESP3, CNC3, STM32Blue, MaxSTM3, FYSETC_S6_2
- Notes: The most common selections are listed above, see OnStep's Constants.h file for the complete list.
- Reminder: Micro-controllers are selected in the Arduino IDE's menu Tools->Board.
- Default Value: OFF
SERIAL PORT COMMAND CHANNELS
Enable serial interfaces and configure baud rates for OnStepX command channels. Each serial interface is usually a TTL serial port on the microcontroller which may be connected directly to another device. That other device may provide a USB port, or WiFi (SWS), or Bluetooth, etc.
- SERIAL_A_BAUD_DEFAULT
- Default Value: 9600
- Other Values: OFF, 9600,19200,57600,115200, 230400, 460800
- Notes: The primary interface SERIAL_A usually the same USB virtual serial port used to upload the OnStep Arduino Sketch and is also used for USB PC connections (and ASCOM or INDI for instance.)
- Reminder:
- This should almost never be changed.
- This should almost never be changed.
- Default Value: 9600
- SERIAL_B_BAUD_DEFAULT
- Default Value: 9600
- Other Values: OFF, 9600,19200,57600,115200, 230400, 460800
- Notes: The secondary interface SERIAL_B is a TTL serial port that is often attached to the Smart Web Server (as a "bridge" for Serial <--> IP command traffic and to provide a website for operation.)
- Associated Options:
- SERIAL_B_ESP_FLASHING ON
- Allows upload of firmware to an ESP8266 based Smart Web Server through OnStepX. This is so you can update everything without opening the controller case to pull the WeMos D1 Mini (or ESP-01) for flashing.
- Only two OnStep controllers allow this, the MiniPCB1 and MaxESP3, and then only if setup for it (shunts in the correct positions.) Just connect to OnStepX on its primary serial interface (SERIAL_A) and send the :hF#:ESPFLASH# commands to place the controller in firmware upload mode.
- The Smart Web Server page has more information on how to flash the ESP8266.
- SERIAL_B_ESP_FLASHING ON
- Reminder:
- This is usually not changed.
- Default Value: 9600
- SERIAL_C_BAUD_DEFAULT
- Default Value: OFF
- Other Values: OFF, 9600,19200,57600,115200, 230400, 460800
- Notes: A third interface, SERIAL_C is sometimes present as a TTL serial port.
- Default Value: OFF
- SERIAL_D_BAUD_DEFAULT
- Default Value: OFF
- Other Values: OFF, 9600,19200,57600,115200, 230400, 460800
- Notes: A fourth interface, SERIAL_D is available for a TTL serial port or as SerialUSB1 on a Teensy (Arduino IDE option when compiling.)
- Default Value: OFF
- SERIAL_E_BAUD_DEFAULT
- Default Value: OFF
- Other Values: OFF, 9600,19200,57600,115200, 230400, 460800
- Notes: A fourth interface, SERIAL_E is available for a TTL serial port or as SerialUSB2 on a Teensy (Arduino IDE option when compiling.)
- Default Value: OFF
STATUS LED
These options provide feedback about OnStepX state at startup.
Parameter Name
- STATUS_LED
- Default Value: ON
- Other Values: OFF, ON
- Notes:
- If no errors were detected at startup illuminates the LED.
- If errors were detected at startup an error code is flashed once every eight seconds:
- 1 flash indicates an NV (EEPROM) structure or initialization error was detected.
- 2 flashes indicate an unexpected value was read from NV (EEPROM.)
- 3 flashes indicate an GPIO device error.
- 4 flashes indicate an motor driver initialization error was detected.
- 5 flashes indicate an date/time/site initialization error was detected.
- 6 flashes indicate an weather sensor initialization error was detected.
- If more than one error is detected only the highest priority (numerically lowest) error code is flashed.
- Reminder:
- The STATUS_MOUNT_LED can also share the same associated pin.
- In this case when Mount tracking starts for the first time this STATUS_LED will be disabled and the STATUS_MOUNT_LED activated.
- The STATUS_MOUNT_LED can also share the same associated pin.
- Default Value: ON
RETICLE CONTROL
- RETICLE_LED_DEFAULT
- Default Value: OFF
- Other Values: OFF, 0 to 255 (0 to 100%)
- Notes: Default reticle iillumination intensity for a polar-alignment 'scope (etc.) The Android App, SHC, and even a basic hand controller also have controls to adjust the reticle brightness.
- RETICLE_LED_MEMORY
- Default Value: OFF
- Other Values: OFF, ON
- Notes: Remembers the last set reticle illumination intensity across power cycles.
WEATHER SENSOR
- WEATHER
- Default Value: OFF
- Other Values: OFF, BME280, BME280_0x76, BME_SPI, BMP280, BMP280_0x76, BMP_SPI
- Notes: Provides temperature, barometric pressure, and humidity (for BME devices.)
- Reminder:
- In the absence of an sensor device the system returns NAN (not a number) for the Temperature, Pressure, and Humidity.
- It is also possible to send the weather info. to OnStepX via extended LX200 commands, in which case those values will become available.
- The temperature and pressure are used for Mount refraction calculations.
- In the absence of valid readings the defaults of 10°C and 1010mb are used for the refraction calculation.
- The temperature and humidity together are used to determine the dew-point temperature which can be used by Auxiliary Feature dew heaters.
- The temperature can be used by Focusers for TCF in the absence of a dedicated Focuser temperature device.
- For the I2C connected devices (BME280, BMP280) the I2C address of the module is assumed to be 0x77. If you need address 0x76 select device (BME280_0x76, BMP280_0x76.)
- For SPI connected devices (BME280_SPI, BMP280_SPI) a CS pin must be specified (see your pinmap.)
- If the specified device is not detected OnStepX will flash an error code on the Status LED (6 flashes per cycle) at startup.
- In the absence of an sensor device the system returns NAN (not a number) for the Temperature, Pressure, and Humidity.
SIGNALING
- STEP_WAVE_FORM
- Default Value: SQUARE
- Other Values: PULSE, SQUARE
- Notes: Step signal wave form. SQUARE mode provides an signal with equal duty cycle for logic high and low. It is best if the step signals need to travel some distance from the micro-controller to the step/dir (stepper) driver. PULSE mode allows for higher step rates (about 1.6x faster) but in some cases the pulse width can be too narrow for the drivers; it is also more prone to noise and transmission problems at longer distances.
- Reminder:
- This one setting applies to all axes.
- OnStepX knows the pulse width minimums for many common stepper drivers and does checks to ensure they will work in PULSE mode.
- If the pulse-width check fails the drive for that axis will be disabled and OnStepX will flash an error code on the Status LED (4 flashes per cycle) at startup.