View Single Post
  #11   Spotlight this post!  
Unread 15-05-2011, 12:24
Strants Strants is offline
Registered User
AKA: Gavin Stewart
FRC #1977
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Colorado
Posts: 11
Strants is an unknown quantity at this point
Re: We have some things working with java, if you need help look here

Quote:
Originally Posted by Ivan913 View Post
But every time I try to test out a SimpleRobot template, I try to instantiate something simple like a gyro or accelerometer and it can't seem to find it. Im running windows 7. Under the FRC Configuration tab in the options menu its using the standard WPILibJ location. The file path is C:/Users/Ivan/sunspotfrcsdk/lib/WPILibJ. Any clue what I'm doing wrong here?
Are you importing the file? Assuming the SimpleRobot class itself doesn't cause you any problems (and from what you've said, that appears to be the case), I would say you just need to import the files. For example, to import a Gyro, you would put this code at the top of the file, under the package name:

Code:
import edu.wpi.first.wpilibj.Gyro;
This is the same as an include statement in C++. In Netbeans, you can also just press ctrl+i, and the editor will take care of the imports for you.
Reply With Quote