View Single Post
  #4   Spotlight this post!  
Unread 17-01-2017, 20:18
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP, WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2009
Location: MA
Posts: 154
SamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to behold
Re: Could not instantiate robot?

Seems like at least one of these constructors has a problem:

Code:
public static Drivetrain drivetrain = new Drivetrain();
public static Shooter shooter = new Shooter();
public static DigitalSystem digitalsystem = new DigitalSystem();
Without seeing your code, I'm guessing you're trying to use the same CAN ID, PWM port, or digital I/O pin for multiple components.

It's also a very bad idea to have a variable be "public static" and not final because something else can overwrite it accidentally. You're doing the same thing in robotInit(), which will almost certainly crash your robot program with the same error that's causing this one.

If you haven't done much programming already, you should look into using RobotBuilder. It'll generate all this code for you so you don't have to worry about it.
__________________
WPILib
GRIP, RobotBuilder
Reply With Quote