FieldTest

Includes a series of different starter tests we would run in the field to help debug issues quickly

Running Executables

Remember, it is important to build in the main folder (see primary README). To run an executable, do the following

cd /path/to/FullscalePrime/build/FieldTest
sudo ./<EXECUTABLE_NAME>

Lift Servo Test

Runs lift servo to either lock or unlock the lift.

Functions

int main()

Main Method: Runs lift servo to either lock or unlock the lift.

Returns:

Method status

Variables

const int LIFT_SERVO = 2

RPI GPIO pin for servo.

const int LIFT_LOCK = 1750

Servo pulse width for lock configuration.

const int LIFT_UNLOCK = 1300

Servo pulse width for unlock configuration.

Level Servo Test

Runs level servo to tilt the level up or down.

Functions

int main()

Main method: Runs level servo to tilt the level up or down.

Returns:

exit status

Variables

const int LEVEL_SERVO = 3

RPI GPIO Pin for Level Servo.

Level Lock Test

Locks the level at its default configuration.

Functions

int main()

Main Method: Locks the level at its default configuration.

Returns:

exit status

Variables

const int LEVEL_SERVO = 3

RPI GPIO pin for level servo.

Nacelle Servo Test

Runs nacelle locking servo to either lock or unlock the nacelles.

Functions

int main()

Main Method: Runs nacelle locking servo to either lock or unlock the nacelles.

Returns:

exit status

Variables

const int NACELLE_SERVO = 14

RPI GPIO pin for nacelle locking servo.

const int NACELLE_LOCK = 1600

Pulse width to lock nacelles.

const int NACELLE_UNLOCK = 755

Pulse width to unlock nacelles.

Lift Arrow Test

Runs lift up or down.

Functions

int main()

Main method: Runs lift up or down.

Returns:

exit status

Variables

const int LIFT_P = 20

RPi GPIO Pin for positive lift motor terminal.

const int LIFT_N = 16

RPi GPIO Pin for negative lift motor terminal.

const int LIFT_ENABLE = 12

RPi GPIO Pin for lift motor enable.

const int LIFT_STANDBY = 21

RPi GPIO Pin for lift motor controller standby.

const int PWM_MOTOR_MAX = 255

Max PWM Signal for motor to run full speed.

RCB Arrow Test

Runs RCB Motor clockwise or counterclockwise.

Functions

int main()

Main Method: Runs RCB Motor clockwise or counterclockwise.

Returns:

exit status

Variables

const int RCB_P = 26

RPi GPIO Pin for positive RCB motor terminal.

const int RCB_N = 19

RPi GPIO Pin for negative RCB motor terminal.

const int RCB_ENABLE = 13

RPi GPIO Pin for RCB motor enable.

const int RCB_STANDBY = 21

RPi GPIO Pin for RCB motor controller standby.

const int PWM_MOTOR_MAX = 255

Max PWM Signal for motor to run full speed.

Swivel 1 Test

Swivels nacelle 1 left or right.

Functions

int main()

Main Method: Swivels nacelle 1 left or right.

Returns:

exit status

Variables

const int STEPS_PER_REVOLUTION = 200

Number of steps for full revolution for stepper motor.

const int STEPPER_SPEED = 5

Speed of stepper motor (unitless)

const int NUM_STEPS = 40

Number of steps run in single key press.

const int STEPPER_1_STANDBY_PIN = 0

RPi GPIO Pin for stepper 1 standby.

const int STEPPER_1_PIN_1 = 11

RPi GPIO Pin for stepper 1 pin 1.

const int STEPPER_1_PIN_2 = 9

RPi GPIO Pin for stepper 1 pin 2.

const int STEPPER_1_PIN_3 = 5

RPi GPIO Pin for stepper 1 pin 3.

const int STEPPER_1_PIN_4 = 6

RPi GPIO Pin for stepper 1 pin 4.

Swivel 2 Test

Swivels nacelle 2 left or right.

Functions

int main()

Main Method: Swivels nacelle 2 left or right.

Returns:

exit status

Variables

const int STEPS_PER_REVOLUTION = 200

Number of steps for full revolution for stepper motor.

const int STEPPER_SPEED = 5

Speed of stepper motor (unitless)

const int NUM_STEPS = 34

Number of steps run in single key press.

const int STEPPER_2_STANDBY_PIN = 27

RPi GPIO Pin for stepper 2 standby.

const int STEPPER_2_PIN_1 = 17

RPi GPIO Pin for stepper 2 pin 1.

const int STEPPER_2_PIN_2 = 4

RPi GPIO Pin for stepper 2 pin 2.

const int STEPPER_2_PIN_3 = 22

RPi GPIO Pin for stepper 2 pin 3.

const int STEPPER_2_PIN_4 = 10

RPi GPIO Pin for stepper 2 pin 4.

Swivel 3 Test

Swivels nacelle 3 left or right.

Functions

int main()

Main Method: Swivels nacelle 3 left or right.

Returns:

exit status

Variables

const int STEPS_PER_REVOLUTION = 200

Number of steps for full revolution for stepper motor.

const int STEPPER_SPEED = 5

Speed of stepper motor (unitless)

const int NUM_STEPS = 60

Number of steps run in single key press.

const int STEPPER_3_STANDBY_PIN = 8

RPi GPIO Pin for stepper 3 standby.

const int STEPPER_3_PIN_1 = 7

RPi GPIO Pin for stepper 3 pin 1.

const int STEPPER_3_PIN_2 = 1

RPi GPIO Pin for stepper 3 pin 2.

const int STEPPER_3_PIN_3 = 25

RPi GPIO Pin for stepper 3 pin 3.

const int STEPPER_3_PIN_4 = 24

RPi GPIO Pin for stepper 3 pin 4.