Last edited · 35 revisions  


Configuration (GitHub Master Branch)

This is an interim supplement to OnStep's main configuration help file and contains only information about new settings not present in the latest release.

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:


This section allows you to control secondary telescope/mount automation equipment.

Many features make use of an 1-Wire bus.  This is a communication protocol that uses a single MCU pin (wire) to transmit/receive data to/from several devices.  Many 1-Wire devices can also gather power to run themselves from this same pin (wire.)  You can see the default pin assigned for 1-Wire in your PINMAP file.  You can also override the default and assign any unused pin for 1-Wire by adding #define OneWirePin n (where n is the pin#) to your Config.h file.  See the Weather.ino file for the required libraries that must be downloaded and installed in ~/Documents/Arduino/Libraries/ for the BME280 and 1-Wire support to function.

In operation 1-Wire devices are scanned by OnStep once every two seconds.  During each cycle any DS2413 GPIO device pins are toggled as required for PWM or SWITCH control and temperature from DS18B20 devices is read.  If an error occurs reading a temperature OnStep will fall back to the prior valid temperature readings for up to 30 seconds before the error is flagged and the channel reset.  For setting DS2413 GPIO pin state OnStep will ignore up to 2 communication errors per minute; if the error rate exceeds that the error is flagged and the channel reset.  Once an error is flagged the associated auxiliary feature channel is turned off.

Parameter Name

    • Default Value: OFF
    • Other Values: ON
    • Notes: Enable this temporarily to get a listing of the Dallas Semiconductor (now Maxim) devices on your 1-Wire bus.  There are two supported 1-Wire devices currently the DS18B20 (temperature sensor) and the DS2413 (GPIO - General Purpose Input Output.)  There can be up to eight total DS devices in OnStep.  To see the list open a serial monitor in the Arduino IDE after upload.  The serial numbers shown can be directly entered as FEATUREn_PIN below to associate specific DS devices with features.
    • Reminder:
      • A DS device must be present on a _PIN in the FEATURES section for this to work.
    • Default Value: "FEATUREn"
    • Other Values: "Any string"
    • Notes: A handy name to remind you of what this feature does.
    • Reminder:
      • String can be up to 10 characters, any more will be truncated.
      • Commas "," are NOT allowed in the string.
    • Default Value: OFF
    • Notes: Specify the type of feature you'd like.  A simple on/off switch (relay,) an analog output (using a MCU pin that supports PWM,) a dew heater, or an intervalometer (camera timer.)
    • Associated Options: In the case of a dew heater the DEW_HEATER_MAX_POWER n (where n the maximum power as a %) is an option which allows for a wider range of regulation. In-case the heater is a bit too powerful, for instance.
    • Reminder:
      • The WiFi and Ethernet Add-ons and Android App have support for controlling these features (they are not supported in the SHC yet.)
      • Dew Heaters
        • Control the power delivered to a heating wire (providing 1 watt per inch of diameter is an accepted standard.)
        • Regulate the power delivered as a slow PWM signal with a period of two seconds.
        • Scale the power delivered to the heater based on the Ambient or Dew Heater Temperature relative to the Dew Point Temperature.  To accomplish this you must update OnStep's Ambient conditions with temperature and humidity on a regular bases, this usually requires the WEATHER option be enabled (BME280.)
        • Have associated run-time settings for the Zero (100% power) and Span (0% power) temperatures.
      • Intervalometer
        • Often this takes the form of a optocoupler or transistor electrically closing connections on a 2.5mm stereo mini plug.  Google shows many DIY projects with similar hardware.
    • Default Value: OFF
    • Other Values: DS1820, n (ds18b20 serial number)
    • Notes: For dew heaters only.  Specifies an optional dew heater temperature souce associated with this feature.
    • Reminder:
      • If DS1820 is specified, the next available ds18b20 on the bus is assigned (in order by serial number.) Use DS1820 or n (ds18b20 serial number) for all, you can not mix serial numbers and automatic assignment!
      • If omitted, a dew heater will use the Ambient temperature, from an BME280 I2C device for instance.
      • DS18B20's don't seem to work in parasitic power mode with this library so be sure to run Gnd, Vcc, and 1-Wire to them.
      • A weak pullup resistor in the range of 5Kohm is required between VCC and DATA (reference DS1820 datasheet, Overview section paragraph 2)
    • Default Value: OFF
    • Other Values: AUX, DS2413, n (ds2413 serial number,) CHAIN, or n (MCU pin)
    • Notes: Specify an output pin (which this feature will control) on a DS2413 GPIO or micro-controller pin.
    • Reminder:
      • If AUX is specified, the corresponding micro-controller Aux pin is used.  For example if FEATURE5_PIN AUX is set FEATURE5 uses Aux5. The Aux pins are listed in each PINMAP file.  For example FEATURE6,7, and 8 on a RAMPS14 or MKS Gen-L are mapped to built-in heater outputs (since the heaters are on Aux6,7, and 8.)
      • If DS2413 is specified, the next available ds2413 on the bus is assigned (in order by serial number.) Use DS2413 or n (ds2413 serial number) for all, you can not mix serial numbers and automatic assignment!
      • Each DS2413 has two GPIO pins.  For this reason you can only specify a DS2413 in every other FEATUREn position.  So if FEATURE1_PIN has a DS2413 (using its GPIO0) FEATURE2_PIN can use the same DS2413 and its GPIO1 via the CHAIN option.
      • Note that ANALOG_OUT mode uses fast micro-controller hardware based PWM.
        • Not all micro-controller pins necessarily support this mode of operation.
        • The ds2413 does NOT support this mode of operation.
    • Default Value: OFF
    • Other Values: ON, n (0 to 255)
    • Notes: For switches, analog out, and dew heaters only.  Sets the startup state for the feature.
    • Reminder:
      • This setting doesn't apply to the intervalometer.