Motor not moving

Hi. My teacher is making me post this despite the fact that I am almost certain this isn’t a programming issue.

I’ve been testing each motor individually in the autonomous periodic method because for some reason the one labeled ‘rightBottom’ is not turning. The Spark that controls the motor is lighting up green yet the motor will not turn.

/* Copyright (c) 2017-2018 FIRST. All Rights Reserved.                        */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */

package org.usfirst.frc.team6871.robot;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Spark;
import edu.wpi.first.wpilibj.SpeedControllerGroup;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the file in the
 * project.
public class Robot extends IterativeRobot {
	private static final String kDefaultAuto = "Default";
	private static final String kCustomAuto = "My Auto";
	private String m_autoSelected;
	private SendableChooser<String> m_chooser = new SendableChooser<>();
	Joystick gamePad = new Joystick(0);	
	//create a new joystick named gamePad
	Spark leftTop  		  = new Spark(3);
	Spark leftBottom	  = new Spark(2);
	Spark rightTop		  = new Spark(1);
	Spark rightBottom 	  = new Spark(4);
	//declare the speed controllers for the motors
	SpeedControllerGroup m_left  = new SpeedControllerGroup(leftTop, leftBottom);
	SpeedControllerGroup m_right = new SpeedControllerGroup(rightTop, rightBottom);
	//group the two sets of motors together into one group for each side
	DifferentialDrive m_drive 	 = new DifferentialDrive(m_right, m_left);
	//sets up drive into DifferentialDrive object
		// note: DifferentialDrive expects left then right but it is inversed on this robot.
		// may fix later.

	 * This function is run when the robot is first started up and should be
	 * used for any initialization code.
	public void robotInit() {
		m_chooser.addDefault("Default Auto", kDefaultAuto);
		m_chooser.addObject("My Auto", kCustomAuto);
		SmartDashboard.putData("Auto choices", m_chooser);

	 * This autonomous (along with the chooser code above) shows how to select
	 * between different autonomous modes using the dashboard. The sendable
	 * chooser code works with the Java SmartDashboard. If you prefer the
	 * LabVIEW Dashboard, remove all of the chooser code and uncomment the
	 * getString line to get the auto name from the text box below the Gyro
	 * <p>You can add additional auto modes by adding additional comparisons to
	 * the switch structure below with additional strings. If using the
	 * SendableChooser make sure to add them to the chooser code above as well.
	public void autonomousInit() {
		m_autoSelected = m_chooser.getSelected();
		// autoSelected = SmartDashboard.getString("Auto Selector",
		// defaultAuto);
		System.out.println("Auto selected: " + m_autoSelected);

	 * This function is called periodically during autonomous.
	public void autonomousPeriodic() {
		switch (m_autoSelected) {
			case kCustomAuto:
			case kDefaultAuto:

	 * This function is called periodically during operator control.
	public void teleopPeriodic() {
			double axisY = gamePad.getRawAxis(1);
			double axisX = gamePad.getRawAxis(0);
//			double axisZ = gamePad.getRawAxis(3);
			//get the value of the joysticks periodically
			m_drive.arcadeDrive(-1 * axisX, axisY);
			//initialize arcade drive. axisX is inverted to match vide-game like controls.

	 * This function is called periodically during test mode.
	public void testPeriodic() {

When you say lighting up green, is it a constant green, or pulsing?

According to the Spark user manual, green means it’s being commanded to full forward. if it’s switching between green and black rapidly (4 per second), then it’s going forward, but somewhere between stop and full speed. Switching between green and white, with more time spent on white, means the limit switch input is being triggered in the forward direction. An even green/white switch means calibration was successfully completed.

So, which is it? Does the LED feedback match what you expect from the code? If so, then it’s not a code issue.

I would recommend unhooking a motor from a known working spark and hook it up to this one. What happens?

Are you sure this isn’t a firmware update issue? That may be the reason.