I'm working on a little project for a vehicle that's going to be controlled from a PSX controller while sitting inside for a event. I've built up the code from writing sections at a time. When each section is tested the sections work great and don't have any issues. When I combine the code to the entirety, the motor controls work great, however the servo controls fail to operate. I'm stumped on why it's not triggering the servos when done.
It's a small vehicle, with Arcade drive (One Joystick controls the motors for turning and throttle) and servos for control of a couple small arms (pan/tilt for shoulder movement using joystick and elbow using buttons). The current way it's set up is that the Left Analog stick on the PSX controller will control the throttle, the right stick will control the arm pan/tilt (only when either the left or right dpad is held as well), and the shoulder buttons will control the movement of the elbow (L1,L2,R1,R2).
I'm currently using the Adafruit Servo Shield for the servos and a generic motor controller that can handle up to a 50A load per bridge. Below is the code that i'm running when all of the functions are written in (which all function as intended when run separately). I've attached the code (plain text file).
Control Code.txt (15.8 KB)