Go to Post Curse those filthy wrench-swinging rivet-popping screw-driving hammer-smashing mechanical barbarians. Hand over the robot to the programmers! - cjl2625 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 03-15-2016, 07:40 PM
NewProgrammer NewProgrammer is offline
Registered User
no team
 
Join Date: Mar 2016
Location: Michigan
Posts: 2
NewProgrammer is an unknown quantity at this point
"Could not find ADXRS450 gyro on SPI port 0" Error - Java

Hello Chief Delphi,

I am attempting to implement the ADXRS450 gyroscope (http://firstchoicebyandymark.com/fc16-000) that was included in the kit of parts this year with Java, but running into the following problem:

ERROR 1 could not find ADXRS450 gyro on SPI port 0 org.usfirst.frc.team1188.robot.Robot.robotInit(Rob ot.java:10)

I have looked at this CD thread and this FRC Reddit post, as well as several other CD threads relating to this chip and the Analog Devices FRC page, but nothing has helped me.

Here is code from my Robot.java file. I was trying to just isolate the gyro, and have no logic in any of the other methods (teleop periodic, etc.)

Code:
import edu.wpi.first.wpilibj.ADXRS450_Gyro;
import edu.wpi.first.wpilibj.IterativeRobot;

public class Robot extends IterativeRobot {    
    ADXRS450_Gyro gyro;
	
    public void robotInit() {
    	gyro = new ADXRS450_Gyro();   // This is the line specified in the error message.
    }
}
I get a very similar error when trying to use the chip's ADXL362 accelerometer, though it specifies SPI port 1 instead of port 0. I'm hoping the solution to this problem solves that as well, but it's secondary because I can always use the built in accelerometer.

I have tried using the other constructor specified in the wpilib, that requests an SPI port. I have tried both ports 0 and 1; same error for each (but the SPI port in the messages changes as expected.)
I have NOT tried this chip on any other RoboRIO, or any other chip with this code. I have also not tried any other device in this RoboRIO's SPI port, so I can't rule out hardware as a problem. But, I also don't know of a good way to test that quickly.

Has anyone gotten this device to work in Java? The internet seems to have very little information on it in an FRC-context, but with every team getting one this year I'm hoping someone can help.

Please let me know if I need to provide any additional details. Thank you in advance!
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:57 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi