View Single Post
  #8   Spotlight this post!  
Unread 26-01-2017, 20:12
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,102
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: ADXRS450 Gyro board not feeding back

Quote:
Originally Posted by CloakAndDagger View Post
We updated the code not to have the calibrate or reset functions, no feedback from the gyro.

Next, we copied the sampleRobot code from the wpilib website, and implemented only the gyro code, no feedback.

We then deployed C++ onto the same robot, and got feedback from the gyro, so we know it's not a hardware problem. You can see the current code we are using in the Initial-Code-Copy branch.

I'd hate to ask for a code snippet but we are on day 4 of trying to get this thing working at this point

https://github.com/Team74/FRC_2017_P...-Copy/robot.py
^Current Robot Code

https://github.com/Team74/FRC_2017_P...ging/Robot.cpp
^C++ code for comparison

https://github.com/Team74/FRC_2017_P...gging/Robot.py
^SampleRobot tests

Currently running pyfrc version 2017.0.4
Oh interesting, you have something in the constructor. Maybe that's it? Here's how I tested it:
  • ssh into the robot
  • frcKillRobot.sh -t
  • python3
Code:
>>> import wpilib
>>> a = wpilib.ADXRS450_Gyro()
>>> print(a.getAngle())

Move the roborio

>>> print(a.getAngle())
So.. that's it. Nothing else getting in the way. I won't be home for a few hours, I'll try your code when I get there.

One difference that I thought of is that I'm using a slightly newer version RobotPy that I'm working on adding some things to, but I don't think there have been any changes that would impact it. I'll try installing 2017.0.4 also to make sure that works also.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote