This is a basic example code for a Kit of Parts drivetrain. Feel free to edit or use at your discretion!
This code (a) drives forward for 2 seconds during autonomous and (b) creates a single joystick arcade drive driven by an Xbox controller.
Helpful links:
Official WPILib Examples
https://github.com/wpilibsuite/allwpilib/tree/master/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples
Spark MAX Examples from REV Robotics https://github.com/REVrobotics/SPARK-MAX-Examples