2.0.2015061601

Working on converting over LCD display code to k3ngdisplay library
      #define DISPLAY_DEGREES_STRING "\xDF"
      last_az_incremental_encoder_position & az_incremental_encoder_position changed to long
      k3ng_remote_rotator_controller class

    2.0.2015070301
      Fixed compile error involving clock_temp_string in display code when compiling multiple clock display widgets is attempted
      Still working on new display code and local/remote unit cod
This commit is contained in:
Anthony Good 2015-07-03 08:33:18 -04:00
parent 2f249445ee
commit 30ab86de7e
11 changed files with 2664 additions and 1312 deletions

File diff suppressed because it is too large Load Diff

View File

@ -146,6 +146,7 @@
#define LEFT 1
#define RIGHT 2
#define CENTER 3
#define STEPPER_UNDEF 0
#define STEPPER_CW 1

View File

@ -46,11 +46,11 @@
#undef FEATURE_EL_PRESET_ENCODER
#endif
#if !defined(FEATURE_AZ_POSITION_POTENTIOMETER) && !defined(FEATURE_AZ_POSITION_ROTARY_ENCODER) && !defined(FEATURE_AZ_POSITION_PULSE_INPUT) && !defined(FEATURE_AZ_POSITION_GET_FROM_REMOTE_UNIT) && !defined(FEATURE_AZ_POSITION_HMC5883L) && !defined(FEATURE_AZ_POSITION_ADAFRUIT_LSM303) && !defined(FEATURE_AZ_POSITION_HH12_AS5045_SSI) &&!defined(FEATURE_AZ_POSITION_INCREMENTAL_ENCODER) &&!defined(FEATURE_AZ_POSITION_POLOLU_LSM303)
#if !defined(FEATURE_AZ_POSITION_POTENTIOMETER) && !defined(FEATURE_AZ_POSITION_ROTARY_ENCODER) && !defined(FEATURE_AZ_POSITION_PULSE_INPUT) && !defined(FEATURE_AZ_POSITION_GET_FROM_REMOTE_UNIT) && !defined(FEATURE_AZ_POSITION_HMC5883L) && !defined(FEATURE_AZ_POSITION_ADAFRUIT_LSM303) && !defined(FEATURE_AZ_POSITION_HH12_AS5045_SSI) &&!defined(FEATURE_AZ_POSITION_INCREMENTAL_ENCODER) &&!defined(FEATURE_AZ_POSITION_POLOLU_LSM303) &&!defined(FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER)
#error "You must specify one AZ position sensor feature"
#endif
#if defined(FEATURE_ELEVATION_CONTROL) && !defined(FEATURE_EL_POSITION_POTENTIOMETER) && !defined(FEATURE_EL_POSITION_ROTARY_ENCODER) && !defined(FEATURE_EL_POSITION_PULSE_INPUT) && !defined(FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB) && !defined(FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB) && !defined(FEATURE_EL_POSITION_GET_FROM_REMOTE_UNIT) && !defined(FEATURE_EL_POSITION_ADAFRUIT_LSM303) && !defined(FEATURE_EL_POSITION_HH12_AS5045_SSI) && !defined(FEATURE_EL_POSITION_INCREMENTAL_ENCODER) && !defined(FEATURE_EL_POSITION_MEMSIC_2125) &&!defined(FEATURE_EL_POSITION_POLOLU_LSM303)
#if defined(FEATURE_ELEVATION_CONTROL) && !defined(FEATURE_EL_POSITION_POTENTIOMETER) && !defined(FEATURE_EL_POSITION_ROTARY_ENCODER) && !defined(FEATURE_EL_POSITION_PULSE_INPUT) && !defined(FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB) && !defined(FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB) && !defined(FEATURE_EL_POSITION_GET_FROM_REMOTE_UNIT) && !defined(FEATURE_EL_POSITION_ADAFRUIT_LSM303) && !defined(FEATURE_EL_POSITION_HH12_AS5045_SSI) && !defined(FEATURE_EL_POSITION_INCREMENTAL_ENCODER) && !defined(FEATURE_EL_POSITION_MEMSIC_2125) &&!defined(FEATURE_EL_POSITION_POLOLU_LSM303) && !defined(FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER)
#error "You must specify one EL position sensor feature"
#endif

View File

@ -25,6 +25,7 @@
//#define LANGUAGE_CZECH
//#define LANGUAGE_ITALIAN
//#define LANGUAGE_PORTUGUESE_BRASIL
//#define LANGUAGE_GERMAN
/* master and remote slave unit functionality */
//#define FEATURE_REMOTE_UNIT_SLAVE // uncomment this to make this unit a remote unit controlled by a host unit
@ -43,8 +44,9 @@
//#define FEATURE_AZ_POSITION_POLOLU_LSM303 // Uncomment for azimuth using LSM303 compass and Polulu library
//#define FEATURE_AZ_POSITION_HH12_AS5045_SSI
//#define FEATURE_AZ_POSITION_INCREMENTAL_ENCODER
//#define FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
//#define FEATURE_EL_POSITION_POTENTIOMETER
#define FEATURE_EL_POSITION_POTENTIOMETER
//#define FEATURE_EL_POSITION_ROTARY_ENCODER
//#define FEATURE_EL_POSITION_PULSE_INPUT
//#define FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB // Uncomment for elevation ADXL345 accelerometer support using ADXL345 library
@ -55,6 +57,7 @@
//#define FEATURE_EL_POSITION_HH12_AS5045_SSI
//#define FEATURE_EL_POSITION_INCREMENTAL_ENCODER
//#define FEATURE_EL_POSITION_MEMSIC_2125
//#define FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
//#define FEATURE_4_BIT_LCD_DISPLAY //Uncomment for classic 4 bit LCD display (most common)
//#define FEATURE_ADAFRUIT_I2C_LCD
@ -107,18 +110,20 @@
//#define OPTION_PULSE_IGNORE_AMBIGUOUS_PULSES // for azimuth and elevation position pulse input feature, ignore pulses that arrive when no rotation is active
//#define OPTION_BUTTON_RELEASE_NO_SLOWDOWN // disables slowdown when CW or CCW button is released, or stop button is depressed
#define OPTION_SYNC_RTC_TO_GPS // if both realtime clock and GPS are present, synchronize realtime clock to GPS
//#define OPTION_DISPLAY_HHMM_CLOCK // display HH:MM clock on LCD row 1 (set position with #define LCD_HHMM_CLOCK_POSITION)
#define OPTION_DISPLAY_HHMMSS_CLOCK // display HH:MM:SS clock on LCD row 1 (set position with #define LCD_HHMMSS_CLOCK_POSITION)
//#define OPTION_DISPLAY_HHMM_CLOCK // display HH:MM clock (set position with #define LCD_HHMM_CLOCK_POSITION)
//#define OPTION_DISPLAY_HHMMSS_CLOCK // display HH:MM:SS clock (set position with #define LCD_HHMMSS_CLOCK_POSITION)
//#define OPTION_DISPLAY_ALT_HHMM_CLOCK_AND_MAIDENHEAD // display alternating HH:MM clock and maidenhead on LCD row 1 (set position with #define LCD_HHMMCLOCK_POSITION)
//#define OPTION_DISPLAY_CONSTANT_HHMMSS_CLOCK_AND_MAIDENHEAD // display constant HH:MM:SS clock and maidenhead on LCD row 1 (set position with #define LCD_CONSTANT_HHMMSSCLOCK_MAIDENHEAD_POSITION)
//#define OPTION_DISPLAY_BIG_CLOCK // display date & time clock (set row with #define LCD_BIG_CLOCK_ROW)
//#define OPTION_CLOCK_ALWAYS_HAVE_HOUR_LEADING_ZERO
#define OPTION_DISPLAY_GPS_INDICATOR // display GPS indicator on LCD - set position with LCD_GPS_INDICATOR_POSITION and LCD_GPS_INDICATOR_ROW
#define OPTION_DISPLAY_MOON_TRACKING_CONTINUOUSLY
//#define OPTION_DISPLAY_GPS_INDICATOR // display GPS indicator on LCD - set position with LCD_GPS_INDICATOR_POSITION and LCD_GPS_INDICATOR_ROW
//#define OPTION_DISPLAY_MOON_TRACKING_CONTINUOUSLY
//#define OPTION_DISPLAY_DIRECTION_STATUS // N, W, E, S, NW, etc. direction indicator in row 1 center
#define OPTION_DISPLAY_SUN_TRACKING_CONTINUOUSLY
//#define OPTION_DISPLAY_SUN_TRACKING_CONTINUOUSLY
//#define OPTION_DISPLAY_MOON_OR_SUN_TRACKING_CONDITIONAL
//#define OPTION_DISPLAY_VERSION_ON_STARTUP //code provided by Paolo, IT9IPQ
//#define FEATURE_POWER_SWITCH
//#define OPTION_EXTERNAL_ANALOG_REFERENCE //Activate external analog voltage reference (needed for RemoteQTH.com unit)
//#define OPTION_SYNC_MASTER_CLOCK_TO_SLAVE // use when GPS unit is connected to slave unit and you want to synchronize the master unit clock to the slave unit GPS clock
@ -132,7 +137,25 @@
//#define OPTION_SCANCON_2RMHF3600_INC_ENCODER // use with FEATURE_AZ_POSITION_INCREMENTAL_ENCODER and/or FEATURE_EL_POSITION_INCREMENTAL_ENCODER if using the ScanCon 2RMHF3600 incremental encoder
//#define OPTION_RESET_METHOD_JMP_ASM_0
//#define UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS
/**************** this section is for code under development ********************************/
//#define UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS
//#define UNDER_DEVELOPMENT_K3NGDISPLAY_LIBRARY
#define OPTION_DISPLAY_STATUS_TERSE // TODO - rename this
#define OPTION_DISPLAY_HEADING
#define LCD_HEADING_ROW 2
#define LCD_HEADING_FIELD_SIZE 20
//#define OPTION_LCD_HEADING_FIELD_FIXED_DECIMAL_PLACE
#define LCD_STATUS_ROW 1
#define LCD_STATUS_FIELD_SIZE 20
#define LCD_DIRECTION_ROW 1
#define LCD_HHMMSS_CLOCK_ROW 1
#define LCD_HHMM_CLOCK_ROW 1
#define PARKING_STRING "PARKING"
#define PARKED_STRING "PARKED"
#define PARKING_STATUS_DISPLAY_TIME_MS 5000
/**************** end of section ifor code under development ********************************/
@ -153,6 +176,7 @@
#define DEFAULT_DEBUG_STATE 0 // 1 = activate debug mode at startup; this should be set to zero unless you're debugging something at startup
#define DEBUG_DUMP // normally compile with this activated unless you're really trying to save memory
// #define DEBUG_LOOP
// #define DEBUG_MEMORY
// #define DEBUG_BUTTONS
// #define DEBUG_SERIAL
@ -203,6 +227,8 @@
// #define DEBUG_POLOLU_LSM303_CALIBRATION
// #define DEBUG_STEPPER
// #define DEBUG_AUTOCORRECT
// #define DEBUG_A2_ENCODER
// #define DEBUG_A2_ENCODER_LOOPBACK_TEST

View File

@ -1,7 +1,7 @@
/* ---------------------- Features and Options - you must configure this !! ------------------------------------------------
If you are using EA4TX ARS USB, edit rotator_features_ea4tx_ars_usb.h, not this file.
M0UPU Board Features and Options
*/
@ -56,7 +56,7 @@
//#define FEATURE_EL_POSITION_INCREMENTAL_ENCODER
//#define FEATURE_EL_POSITION_MEMSIC_2125
//#define FEATURE_4_BIT_LCD_DISPLAY //Uncomment for classic 4 bit LCD display (most common)
#define FEATURE_4_BIT_LCD_DISPLAY //Uncomment for classic 4 bit LCD display (most common)
//#define FEATURE_ADAFRUIT_I2C_LCD
//#define FEATURE_ADAFRUIT_BUTTONS // Uncomment this to use Adafruit I2C LCD buttons for manual AZ/EL instead of normal buttons
//#define FEATURE_YOURDUINO_I2C_LCD
@ -132,6 +132,21 @@
//#define OPTION_SCANCON_2RMHF3600_INC_ENCODER // use with FEATURE_AZ_POSITION_INCREMENTAL_ENCODER and/or FEATURE_EL_POSITION_INCREMENTAL_ENCODER if using the ScanCon 2RMHF3600 incremental encoder
//#define OPTION_RESET_METHOD_JMP_ASM_0
//#define UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS
#define UNDER_DEVELOPMENT_K3NGDISPLAY_LIBRARY
//#define OPTION_DISPLAY_STATUS_TERSE // TODO - rename this
#define OPTION_DISPLAY_HEADING
#define LCD_HEADING_ROW 2
#define LCD_HEADING_FIELD_SIZE 20
//#define OPTION_LCD_HEADING_FIELD_FIXED_DECIMAL_PLACE
#define LCD_STATUS_ROW 1
#define LCD_STATUS_FIELD_SIZE 20
#define LCD_DIRECTION_ROW 1
#define LCD_HHMMSS_CLOCK_ROW 1
#define LCD_HHMM_CLOCK_ROW 1
#define PARKING_STRING "PARKING"
#define PARKED_STRING "PARKED"
#define PARKING_STATUS_DISPLAY_TIME_MS 5000
/*

View File

@ -37,55 +37,55 @@
/*----------- elevation pins --------------*/
#ifdef FEATURE_ELEVATION_CONTROL
#define rotate_up 8 // goes high to activate rotator elevation up
#define rotate_down 9 // goes high to activate rotator elevation down
#define rotate_up_or_down 0 // goes high when elevation up or down is activated
#define rotate_up_pwm 0 // optional - PWM UP output - set to 0 to disable (must be PWM capable pin)
#define rotate_down_pwm 0 // optional - PWM DOWN output - set to 0 to disable (must be PWM capable pin)
#define rotate_up_down_pwm 0 // optional - PWM on both UP and DOWN (must be PWM capable pin)
#define rotate_up_freq 0 // optional - UP variable frequency output
#define rotate_down_freq 0 // optional - UP variable frequency output
#define rotator_analog_el A1 // reads analog elevation voltage from rotator
#define button_up 0 // normally open button to ground for manual up elevation
#define button_down 0 // normally open button to ground for manual down rotation
#define brake_el 0 // goes high to disengage elevation brake (set to 0 to disable)
#define elevation_speed_voltage 0 // optional - PWM output for speed control voltage feed into rotator (on continually unlike rotate_up_pwm and rotate_down_pwm)
#define el_stepper_motor_pulse 0
#define rotate_up 8 // goes high to activate rotator elevation up
#define rotate_down 9 // goes high to activate rotator elevation down
#define rotate_up_or_down 0 // goes high when elevation up or down is activated
#define rotate_up_pwm 0 // optional - PWM UP output - set to 0 to disable (must be PWM capable pin)
#define rotate_down_pwm 0 // optional - PWM DOWN output - set to 0 to disable (must be PWM capable pin)
#define rotate_up_down_pwm 0 // optional - PWM on both UP and DOWN (must be PWM capable pin)
#define rotate_up_freq 0 // optional - UP variable frequency output
#define rotate_down_freq 0 // optional - UP variable frequency output
#define rotator_analog_el A1 // reads analog elevation voltage from rotator
#define button_up 0 // normally open button to ground for manual up elevation
#define button_down 0 // normally open button to ground for manual down rotation
#define brake_el 0 // goes high to disengage elevation brake (set to 0 to disable)
#define elevation_speed_voltage 0 // optional - PWM output for speed control voltage feed into rotator (on continually unlike rotate_up_pwm and rotate_down_pwm)
#define el_stepper_motor_pulse 0
#endif //FEATURE_ELEVATION_CONTROL
// rotary encoder pins and options
#ifdef FEATURE_AZ_PRESET_ENCODER
#define az_rotary_preset_pin1 0 // CW Encoder Pin
#define az_rotary_preset_pin2 0 // CCW Encoder Pin
#define az_rotary_preset_pin1 0 // CW Encoder Pin
#define az_rotary_preset_pin2 0 // CCW Encoder Pin
#endif //FEATURE_AZ_PRESET_ENCODER
#ifdef FEATURE_EL_PRESET_ENCODER
#define el_rotary_preset_pin1 0 // UP Encoder Pin
#define el_rotary_preset_pin2 0 // DOWN Encoder Pin
#define el_rotary_preset_pin1 0 // UP Encoder Pin
#define el_rotary_preset_pin2 0 // DOWN Encoder Pin
#endif //FEATURE_EL_PRESET_ENCODER
#ifdef FEATURE_AZ_POSITION_ROTARY_ENCODER
#define az_rotary_position_pin1 0 // CW Encoder Pin
#define az_rotary_position_pin2 0 // CCW Encoder Pin
#define az_rotary_position_pin1 0 // CW Encoder Pin
#define az_rotary_position_pin2 0 // CCW Encoder Pin
#endif //FEATURE_AZ_POSITION_ROTARY_ENCODER
#ifdef FEATURE_EL_POSITION_ROTARY_ENCODER
#define el_rotary_position_pin1 0 // CW Encoder Pin
#define el_rotary_position_pin2 0 // CCW Encoder Pin
#define el_rotary_position_pin1 0 // CW Encoder Pin
#define el_rotary_position_pin2 0 // CCW Encoder Pin
#endif //FEATURE_EL_POSITION_ROTARY_ENCODER
#ifdef FEATURE_AZ_POSITION_PULSE_INPUT
#define az_position_pulse_pin 0 // must be an interrupt capable pin!
#define AZ_POSITION_PULSE_PIN_INTERRUPT 0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define az_position_pulse_pin 0 // must be an interrupt capable pin!
#define AZ_POSITION_PULSE_PIN_INTERRUPT 0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#endif // read http://arduino.cc/en/Reference/AttachInterrupt for details on hardware and interrupts
#ifdef FEATURE_EL_POSITION_PULSE_INPUT
#define el_position_pulse_pin 1 // must be an interrupt capable pin!
#define EL_POSITION_PULSE_PIN_INTERRUPT 1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define el_position_pulse_pin 1 // must be an interrupt capable pin!
#define EL_POSITION_PULSE_PIN_INTERRUPT 1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#endif // read http://arduino.cc/en/Reference/AttachInterrupt for details on hardware and interrupts
#ifdef FEATURE_PARK
#define button_park 0
#define button_park 0
#endif
//classic 4 bit LCD pins
@ -98,99 +98,104 @@
#ifdef FEATURE_JOYSTICK_CONTROL
#define pin_joystick_x A0
#define pin_joystick_y A1
#define pin_joystick_x A0
#define pin_joystick_y A1
#endif //FEATURE_JOYSTICK_CONTROL
#ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI
#define az_hh12_clock_pin 11
#define az_hh12_cs_pin 12
#define az_hh12_data_pin 13
#define az_hh12_clock_pin 11
#define az_hh12_cs_pin 12
#define az_hh12_data_pin 13
#endif //FEATURE_AZ_POSITION_HH_12
#ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI
#define el_hh12_clock_pin 53 //11
#define el_hh12_cs_pin 52 //12
#define el_hh12_data_pin 51 //13
#define el_hh12_clock_pin 53 //11
#define el_hh12_cs_pin 52 //12
#define el_hh12_data_pin 51 //13
#endif //FEATURE_EL_POSITION_HH_12
#ifdef FEATURE_PARK
#define park_in_progress_pin 0 // goes high when a park has been initiated and rotation is in progress
#define parked_pin 0 // goes high when in a parked position
#define park_in_progress_pin 0 // goes high when a park has been initiated and rotation is in progress
#define parked_pin 0 // goes high when in a parked position
#endif //FEATURE_PARK
#define heading_reading_inhibit_pin 0 // input - a high will cause the controller to suspend taking azimuth (and elevation) readings; use when RF interferes with sensors
#ifdef FEATURE_LIMIT_SENSE
#define az_limit_sense_pin 0 // input - low stops azimuthal rotation
#define el_limit_sense_pin 0 // input - low stops elevation rotation
#define az_limit_sense_pin 0 // input - low stops azimuthal rotation
#define el_limit_sense_pin 0 // input - low stops elevation rotation
#endif //FEATURE_LIMIT_SENSE
#ifdef FEATURE_AZ_POSITION_INCREMENTAL_ENCODER
#define az_incremental_encoder_pin_phase_a 18 //3 must be an interrupt capable pin
#define az_incremental_encoder_pin_phase_b 19 //3 // must be an interrupt capable pin
#define az_incremental_encoder_pin_phase_z 22 //4
#define AZ_POSITION_INCREMENTAL_ENCODER_A_PIN_INTERRUPT 5 //0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define AZ_POSITION_INCREMENTAL_ENCODER_B_PIN_INTERRUPT 4 //1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define az_incremental_encoder_pin_phase_a 18 //3 must be an interrupt capable pin
#define az_incremental_encoder_pin_phase_b 19 //3 // must be an interrupt capable pin
#define az_incremental_encoder_pin_phase_z 22 //4
#define AZ_POSITION_INCREMENTAL_ENCODER_A_PIN_INTERRUPT 5 //0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define AZ_POSITION_INCREMENTAL_ENCODER_B_PIN_INTERRUPT 4 //1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
// read http://arduino.cc/en/Reference/AttachInterrupt for details on hardware and interrupts
#endif //FEATURE_AZ_POSITION_INCREMENTAL_ENCODER
#ifdef FEATURE_EL_POSITION_INCREMENTAL_ENCODER
#define el_incremental_encoder_pin_phase_a 2 //18 //2 // must be an interrupt capable pin
#define el_incremental_encoder_pin_phase_b 3 //19 //3 // must be an interrupt capable pin
#define el_incremental_encoder_pin_phase_z 5 //22 //4
#define EL_POSITION_INCREMENTAL_ENCODER_A_PIN_INTERRUPT 0 //5 //0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define EL_POSITION_INCREMENTAL_ENCODER_B_PIN_INTERRUPT 1 //4 //1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define el_incremental_encoder_pin_phase_a 2 //18 //2 // must be an interrupt capable pin
#define el_incremental_encoder_pin_phase_b 3 //19 //3 // must be an interrupt capable pin
#define el_incremental_encoder_pin_phase_z 5 //22 //4
#define EL_POSITION_INCREMENTAL_ENCODER_A_PIN_INTERRUPT 0 //5 //0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define EL_POSITION_INCREMENTAL_ENCODER_B_PIN_INTERRUPT 1 //4 //1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
// read http://arduino.cc/en/Reference/AttachInterrupt for details on hardware and interrupts
#endif //FEATURE_EL_POSITION_INCREMENTAL_ENCODER
#ifdef FEATURE_YOURDUINO_I2C_LCD
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
#endif //FEATURE_YOURDUINO_I2C_LCD
#ifdef FEATURE_MOON_TRACKING
#define moon_tracking_active_pin 0 // goes high when moon tracking is active
#define moon_tracking_activate_line 0 // ground this pin to activate moon tracking (not for use with a button)
#define moon_tracking_button 0 // use with a normally open momentary switch to ground
#define moon_tracking_active_pin 0 // goes high when moon tracking is active
#define moon_tracking_activate_line 0 // ground this pin to activate moon tracking (not for use with a button)
#define moon_tracking_button 0 // use with a normally open momentary switch to ground
#endif //FEATURE_MOON_TRACKING
#ifdef FEATURE_SUN_TRACKING
#define sun_tracking_active_pin 0 // goes high when sun tracking is active
#define sun_tracking_activate_line 0 // ground this pin to activate sun tracking (not for use with a button)
#define sun_tracking_button 0 // use with a normally open momentary switch to ground
#define sun_tracking_active_pin 0 // goes high when sun tracking is active
#define sun_tracking_activate_line 0 // ground this pin to activate sun tracking (not for use with a button)
#define sun_tracking_button 0 // use with a normally open momentary switch to ground
#endif //FEATURE_SUN_TRACKING
#ifdef FEATURE_GPS
#define gps_sync 0
#define gps_sync 0
#endif //FEATURE_GPS
#ifdef FEATURE_POWER_SWITCH
#define power_switch 0 // use with FEATURE_POWER_SWITCH
#define power_switch 0 // use with FEATURE_POWER_SWITCH
#endif //FEATURE_POWER_SWITCH
#ifdef FEATURE_EL_POSITION_MEMSIC_2125
#define pin_memsic_2125_x 0
#define pin_memsic_2125_y 0
#define pin_memsic_2125_x 0
#define pin_memsic_2125_y 0
#endif //FEATURE_EL_POSITION_MEMSIC_2125
#ifdef FEATURE_ANALOG_OUTPUT_PINS
#define pin_analog_az_out 0
#define pin_analog_el_out 0
#define pin_analog_az_out 0
#define pin_analog_el_out 0
#endif //FEATURE_ANALOG_OUTPUT_PINS
#ifdef FEATURE_SUN_PUSHBUTTON_AZ_EL_CALIBRATION
#define pin_sun_pushbutton_calibration 0 // normally HIGH, have button pull LOW
#define pin_sun_pushbutton_calibration 0 // normally HIGH, have button pull LOW
#endif //FEATURE_SUN_PUSHBUTTON_AZ_EL_CALIBRATION
#ifdef FEATURE_MOON_PUSHBUTTON_AZ_EL_CALIBRATION
#define pin_moon_pushbutton_calibration 0 // normally HIGH, have button pull LOW
#define pin_moon_pushbutton_calibration 0 // normally HIGH, have button pull LOW
#endif //FEATURE_MOON_PUSHBUTTON_AZ_EL_CALIBRATION
//#define reset_pin 22 // if defined, goes HIGH to reset unit
#if defined(FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER) || defined(FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER)
#define pin_sei_bus_busy 24
#define pin_sei_bus_send_receive 22
#endif

View File

@ -128,20 +128,20 @@
#endif //FEATURE_LIMIT_SENSE
#ifdef FEATURE_AZ_POSITION_INCREMENTAL_ENCODER
#define az_3_phase_encoder_pin_phase_a 2 // must be an interrupt capable pin
#define az_3_phase_encoder_pin_phase_b 3 // must be an interrupt capable pin
#define az_3_phase_encoder_pin_phase_z 4
#define AZ_POSITION_3_PHASE_INCREMENTAL_ENCODER_A_PIN_INTERRUPT 0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1
#define AZ_POSITION_3_PHASE_INCREMENTAL_ENCODER_B_PIN_INTERRUPT 1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1
#define az_incremental_encoder_pin_phase_a 18 //3 must be an interrupt capable pin
#define az_incremental_encoder_pin_phase_b 19 //3 // must be an interrupt capable pin
#define az_incremental_encoder_pin_phase_z 22 //4
#define AZ_POSITION_INCREMENTAL_ENCODER_A_PIN_INTERRUPT 5 //0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define AZ_POSITION_INCREMENTAL_ENCODER_B_PIN_INTERRUPT 4 //1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
// read http://arduino.cc/en/Reference/AttachInterrupt for details on hardware and interrupts
#endif //FEATURE_AZ_POSITION_INCREMENTAL_ENCODER
#ifdef FEATURE_EL_POSITION_INCREMENTAL_ENCODER
#define el_3_phase_encoder_pin_phase_a 2 // must be an interrupt capable pin
#define el_3_phase_encoder_pin_phase_b 3 // must be an interrupt capable pin
#define el_3_phase_encoder_pin_phase_z 4
#define EL_POSITION_3_PHASE_INCREMENTAL_ENCODER_A_PIN_INTERRUPT 0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1
#define EL_POSITION_3_PHASE_INCREMENTAL_ENCODER_B_PIN_INTERRUPT 1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1
#define el_incremental_encoder_pin_phase_a 2 //18 //2 // must be an interrupt capable pin
#define el_incremental_encoder_pin_phase_b 3 //19 //3 // must be an interrupt capable pin
#define el_incremental_encoder_pin_phase_z 5 //22 //4
#define EL_POSITION_INCREMENTAL_ENCODER_A_PIN_INTERRUPT 0 //5 //0 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
#define EL_POSITION_INCREMENTAL_ENCODER_B_PIN_INTERRUPT 1 //4 //1 // Uno: pin 2 = interrupt 0, pin 3 = interrupt 1 ; Mega: pin 2 = interrupt 0, pin 3 = interrupt 1, pin 21 = interrupt 2, pin 20 = interrupt 3, pin 19 = interrupt 4, pin 18 = interrupt 5
// read http://arduino.cc/en/Reference/AttachInterrupt for details on hardware and interrupts
#endif //FEATURE_EL_POSITION_INCREMENTAL_ENCODER

View File

@ -111,8 +111,8 @@ You can tweak these, but read the online documentation!
#define LCD_HHMMSS_CLOCK_POSITION LEFT //LEFT or RIGHT
#define LCD_ALT_HHMM_CLOCK_AND_MAIDENHEAD_POSITION LEFT
#define LCD_ALT_HHMM_CLOCK_AND_MAIDENHEAD_ROW 1
#define LCD_CONSTANT_HHMMSS_CLOCK_AND_MAIDENHEAD_POSITION LEFT
#define LCD_CONSTANT_HHMMSS_CLOCK_AND_MAIDENHEAD_ROW 1
#define LCD_CONSTANT_HHMMSS_CLOCK_AND_MAIDENHEAD_POSITION CENTER
#define LCD_CONSTANT_HHMMSS_CLOCK_AND_MAIDENHEAD_ROW 3
#define LCD_BIG_CLOCK_ROW 4
#define LCD_GPS_INDICATOR_POSITION RIGHT //LEFT or RIGHT
#define LCD_GPS_INDICATOR_ROW 1
@ -416,8 +416,53 @@ You can tweak these, but read the online documentation!
#define NNE_STRING "NNL"
#endif //LANGUAGE_PORTUGUESE_BRASIL
#ifdef LANGUAGE_GERMAN // courtesy of Ronny DM2RM
#define MOON_STRING "MOND "
#define SUN_STRING "SONNE "
#define AZ_TARGET_STRING "Az Ziel "
#define EL_TARGET_STRING "El Ziel "
#define TARGET_STRING "Ziel "
#define PARKED_STRING "Parken"
#define ROTATING_CW_STRING "Drehen CW"
#define ROTATING_CCW_STRING "Drehen CCW"
#define ROTATING_TO_STRING "Drehen nach "
#define ELEVATING_TO_STRING "Elevation nach "
#define ELEVATING_UP_STRING "Elevation Auf"
#define ELEVATING_DOWN_STRING "Elevation Ab"
#define ROTATING_STRING "Drehen "
#define CW_STRING "CW"
#define CCW_STRING "CCW"
#define UP_STRING "AUF"
#define DOWN_STRING "AB"
#define AZIMUTH_STRING "Azimuth " //--------------------------------------------------------------------------------------------------------------
#define AZ_STRING "Az"
#define AZ_SPACE_STRING "Az "
#define SPACE_EL_STRING " El"
#define SPACE_EL_SPACE_STRING " El "
#define GPS_STRING "GPS"
#define N_STRING "N (KL)"
#define W_STRING "W (HK)"
#define S_STRING "S (ZS)"
#define E_STRING "O (YB)"
#define NW_STRING "NW (W8)"
#define SW_STRING "SW (PY)"
#define SE_STRING "SO (HZ)"
#define NE_STRING "NO (JA"
#define NNW_STRING "NNW (VE)"
#define WNW_STRING "WNW (XE)"
#define WSW_STRING "WSW (OA)"
#define SSW_STRING "SSW (ZD7)"
#define SSE_STRING "SSO (5R)"
#define ESE_STRING "OSO (8Q)"
#define ENE_STRING "ONO (ZL)"
#define NNE_STRING "NNO (UA0)"
#endif //LANGUAGE_GERMAN
#define TRACKING_ACTIVE_CHAR "*"
#define TRACKING_INACTIVE_CHAR "-"
#define DISPLAY_DEGREES_STRING "\xDF"
#define INTERNAL_CLOCK_CORRECTION 0.00145
@ -518,27 +563,30 @@ You can tweak these, but read the online documentation!
*/
#if !defined(UNDER_DEVELOPMENT_K3NGDISPLAY_LIBRARY)
#if defined(FEATURE_4_BIT_LCD_DISPLAY)
LiquidCrystal lcd(lcd_4_bit_rs_pin, lcd_4_bit_enable_pin, lcd_4_bit_d4_pin, lcd_4_bit_d5_pin, lcd_4_bit_d6_pin, lcd_4_bit_d7_pin);
#endif //FEATURE_4_BIT_LCD_DISPLAY
#ifdef FEATURE_4_BIT_LCD_DISPLAY
LiquidCrystal lcd(lcd_4_bit_rs_pin, lcd_4_bit_enable_pin, lcd_4_bit_d4_pin, lcd_4_bit_d5_pin, lcd_4_bit_d6_pin, lcd_4_bit_d7_pin);
#endif //FEATURE_4_BIT_LCD_DISPLAY
#ifdef FEATURE_ADAFRUIT_I2C_LCD
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
#endif //FEATURE_ADAFRUIT_I2C_LCD
#ifdef FEATURE_YOURDUINO_I2C_LCD
#define I2C_ADDR 0x20
#define BACKLIGHT_PIN 3
#define LED_OFF 1
#define LED_ON 0
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
#endif //FEATURE_YOURDUINO_I2C_LCD
#ifdef FEATURE_ADAFRUIT_I2C_LCD
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
#endif //FEATURE_ADAFRUIT_I2C_LCD
#ifdef FEATURE_RFROBOT_I2C_DISPLAY
LiquidCrystal_I2C lcd(0x27,16,2);
#endif //FEATURE_RFROBOT_I2C_DISPLAY
#else
K3NGdisplay k3ngdisplay(LCD_COLUMNS,LCD_ROWS,LCD_UPDATE_TIME);
#endif //!defined(UNDER_DEVELOPMENT_K3NGDISPLAY_LIBRARY)
#ifdef FEATURE_YOURDUINO_I2C_LCD
#define I2C_ADDR 0x20
#define BACKLIGHT_PIN 3
#define LED_OFF 1
#define LED_ON 0
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
#endif //FEATURE_YOURDUINO_I2C_LCD
#ifdef FEATURE_RFROBOT_I2C_DISPLAY
LiquidCrystal_I2C lcd(0x27,16,2);
#endif //FEATURE_RFROBOT_I2C_DISPLAY
#ifdef FEATURE_AZ_POSITION_HMC5883L
HMC5883L compass;
@ -573,26 +621,47 @@ hh12 elevation_hh12;
#endif //FEATURE_EL_POSITION_HH12_AS5045_SSI
#ifdef FEATURE_GPS
TinyGPS gps;
TinyGPS gps;
#endif //FEATURE_GPS
#ifdef FEATURE_RTC_DS1307
RTC_DS1307 rtc;
RTC_DS1307 rtc;
#endif //FEATURE_RTC_DS1307
#ifdef FEATURE_RTC_PCF8583
PCF8583 rtc(0xA0);
PCF8583 rtc(0xA0);
#endif //FEATURE_RTC_PCF8583
#ifdef HARDWARE_EA4TX_ARS_USB
#undef LCD_COLUMNS
#undef LCD_ROWS
#define LCD_COLUMNS 16
#define LCD_ROWS 2
#undef LCD_COLUMNS
#undef LCD_ROWS
#define LCD_COLUMNS 16
#define LCD_ROWS 2
#endif //HARDWARE_EA4TX_ARS_USB
#ifdef HARDWARE_M0UPU
#undef LCD_ROWS
#define LCD_ROWS 2
#undef LCD_ROWS
#define LCD_ROWS 2
#endif //HARDWARE_M0UPU
#ifdef FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
#define AZ_A2_ENCODER_RESOLUTION 32767 //36000
#define AZ_A2_ENCODER_ADDRESS 0x00
#define AZ_QUERY_FREQUENCY_MS 250
#define AZ_A2_ENCODER_MODE MODE_TWO_BYTE_POSITION/*|MODE_MULTITURN*/
#endif //FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
#ifdef FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
#define EL_A2_ENCODER_RESOLUTION 32767 //36000
#define EL_A2_ENCODER_ADDRESS 0x00
#define EL_QUERY_FREQUENCY_MS 250
#define EL_A2_ENCODER_MODE /*MODE_TWO_BYTE_POSITION|*/MODE_MULTITURN
#endif //FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
#if defined(FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER) || defined(FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER)
#include "sei_bus.h"
SEIbus SEIbus1(&Serial1,9600,pin_sei_bus_busy,pin_sei_bus_send_receive);
// (Serial Port,Baud Rate,Busy Pin,Send/Receive Pin)
#define SEI_BUS_COMMAND_TIMEOUT_MS 6000
#endif

View File

@ -418,6 +418,7 @@ You can tweak these, but read the online documentation!
#define TRACKING_ACTIVE_CHAR "*"
#define TRACKING_INACTIVE_CHAR "-"
#define DISPLAY_DEGREES_STRING "\xDF"
#define INTERNAL_CLOCK_CORRECTION 0.00145

View File

@ -418,6 +418,7 @@ You can tweak these, but read the online documentation!
#define TRACKING_ACTIVE_CHAR "*"
#define TRACKING_INACTIVE_CHAR "-"
#define DISPLAY_DEGREES_STRING "\xDF"
#define INTERNAL_CLOCK_CORRECTION 0.00145
@ -513,28 +514,29 @@ You can tweak these, but read the online documentation!
*/
#if !defined(UNDER_DEVELOPMENT_K3NGDISPLAY_LIBRARY)
#if defined(FEATURE_4_BIT_LCD_DISPLAY)
LiquidCrystal lcd(lcd_4_bit_rs_pin, lcd_4_bit_enable_pin, lcd_4_bit_d4_pin, lcd_4_bit_d5_pin, lcd_4_bit_d6_pin, lcd_4_bit_d7_pin);
#endif //FEATURE_4_BIT_LCD_DISPLAY
#ifdef FEATURE_ADAFRUIT_I2C_LCD
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
#endif //FEATURE_ADAFRUIT_I2C_LCD
#ifdef FEATURE_4_BIT_LCD_DISPLAY
LiquidCrystal lcd(lcd_4_bit_rs_pin, lcd_4_bit_enable_pin, lcd_4_bit_d4_pin, lcd_4_bit_d5_pin, lcd_4_bit_d6_pin, lcd_4_bit_d7_pin);
#endif //FEATURE_4_BIT_LCD_DISPLAY
#ifdef FEATURE_YOURDUINO_I2C_LCD
#define I2C_ADDR 0x20
#define BACKLIGHT_PIN 3
#define LED_OFF 1
#define LED_ON 0
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
#endif //FEATURE_YOURDUINO_I2C_LCD
#ifdef FEATURE_ADAFRUIT_I2C_LCD
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
#endif //FEATURE_ADAFRUIT_I2C_LCD
#ifdef FEATURE_YOURDUINO_I2C_LCD
#define I2C_ADDR 0x20
#define BACKLIGHT_PIN 3
#define LED_OFF 1
#define LED_ON 0
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
#endif //FEATURE_YOURDUINO_I2C_LCD
#ifdef FEATURE_RFROBOT_I2C_DISPLAY
LiquidCrystal_I2C lcd(0x27,16,2);
#endif //FEATURE_RFROBOT_I2C_DISPLAY
#ifdef FEATURE_RFROBOT_I2C_DISPLAY
LiquidCrystal_I2C lcd(0x27,16,2);
#endif //FEATURE_RFROBOT_I2C_DISPLAY
#else
K3NGdisplay k3ngdisplay(LCD_COLUMNS,LCD_ROWS,LCD_UPDATE_TIME);
#endif //!defined(UNDER_DEVELOPMENT_K3NGDISPLAY_LIBRARY)
#ifdef FEATURE_AZ_POSITION_HMC5883L
HMC5883L compass;

View File

@ -377,6 +377,7 @@ You can tweak these, but read the online documentation!
#define TRACKING_ACTIVE_CHAR "*"
#define TRACKING_INACTIVE_CHAR "-"
#define DISPLAY_DEGREES_STRING "\xDF"
#define INTERNAL_CLOCK_CORRECTION 0.00145