Skip to content

(6) Pins (FaraRotation_pins.h)

Massimo 'Max' Mucci edited this page Jun 27, 2023 · 1 revision

This file contains the configuration of the Arduino's pins based on the features and relevant hardware.


If you are using an H-Bridge board and want to handle the ENABLE signals from the MCU, define the pins' number here. You can ignore this configuration if you have the ENABLE signals activated/managed on the board itself.
Those pins will be set HIGH when the program starts:
#define rx_rotate_cw_enable 16
#define rx_rotate_ccw_enable 17
#define tx_rotate_cw_enable 18
#define tx_rotate_ccw_enable 19


This is the definition of the pins to control the rotation.
If the Slow Start/Stop feature is enabled, those must be PWM-capable pins (2 to 13 and 44 to 46 for ATMEGA2560 REV 3).
#define rx_rotate_cw_pwm 5
#define rx_rotate_ccw_pwm 6
#define tx_rotate_cw_pwm 7
#define tx_rotate_ccw_pwm 8


If you don't want to use the Slow Start/Stop feature, the same pins can be defined under a different definition. PWM control or digital (ON/OFF) movement is defined in the FaraRotation_Settings.h file.
#define rx_rotate_cw_dig 5
#define rx_rotate_ccw_dig 6
#define tx_rotate_cw_dig 7
#define tx_rotate_ccw_dig 8


The rotation angles (voltage from the potentiometer) are read from those analog pins. At present time no other method has been implemented to read the rotation angle.
#define rx_rotator_degs_pin A0
#define tx_rotator_degs_pin A1


If the PTT Automation has been enabled, the following pin is checked to control the PTT status and rotate the antennas from the RX to the TX position and back.
#define ptt_automation 2

Clone this wiki locally