Go to Post From a coaching standpoint, I can tell you...the coach is NOTHING without valuable scout information. If the coach is nothing, the robot is NOTHING. It all starts from the scouts...get your kids to see this. - Brandon Holley [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-03-2013, 10:03 PM
enrique's Avatar
enrique enrique is offline
Registered User
FRC #1251 (Tech Tigers)
Team Role: Electrical
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Florida
Posts: 87
enrique will become famous soon enough
Send a message via Yahoo to enrique
Cool accelerometer causing crio to stop

Hi there. I'm having a problem with an accelerometer. It seems to work for about a minute and then the crio seems to freeze. The numbers on the driver station stop moving and the joysticks no longer work. The crio seems to continue doing what ever it was doing last. On the net console, I do not see an exception. Could I be checking the values to quickly? My teliop loop has Wait(0.05);.

//Declarations
Gyro m_ShooterGyro;
ADXL345_SPI m_Acc;
//Init
Shooter::Shooter():
m_ShooterGyro(1)
,m_Acc(SensorBase::GetDefaultDigitalModule(), 4, 5, 6, 7, ADXL345_SPI::kRange_2G)
{
}

// usage code
// this is in teliop
ADXL345_SPI::AllAxes Axes2 = {0.0};
Axes2 = m_Shooter->m_Acc.GetAccelerations();
g_dsLCD->Printf(DriverStationLCD::kUser_Line4, 1, "XAxis: %f", Axes2.XAxis);
g_dsLCD->Printf(DriverStationLCD::kUser_Line5, 1, "YAxis: %f", Axes2.YAxis);
g_dsLCD->Printf(DriverStationLCD::kUser_Line6, 1, "ZAxis: %f", Axes2.ZAxis);
Reply With Quote
  #2   Spotlight this post!  
Unread 04-04-2013, 11:04 AM
virtuald's Avatar
virtuald virtuald is offline
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,033
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: accelerometer causing crio to stop

I would recommend running the code using the Wind River debugger (as opposed to deploying the code). When it freezes, you can pause the code and see where it happens to be frozen -- or if its an exception of some kind, then it will give you that message too.
__________________
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
  #3   Spotlight this post!  
Unread 04-07-2013, 06:47 PM
enrique's Avatar
enrique enrique is offline
Registered User
FRC #1251 (Tech Tigers)
Team Role: Electrical
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Florida
Posts: 87
enrique will become famous soon enough
Send a message via Yahoo to enrique
Re: accelerometer causing crio to stop

So I was planning to use the old red board ADXL335 instead since I can't get the ADXL345 to work. Would this be the Accelerometer class?
Reply With Quote
  #4   Spotlight this post!  
Unread 04-08-2013, 01:19 PM
enrique's Avatar
enrique enrique is offline
Registered User
FRC #1251 (Tech Tigers)
Team Role: Electrical
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Florida
Posts: 87
enrique will become famous soon enough
Send a message via Yahoo to enrique
Re: accelerometer causing crio to stop

I figured out the freezing was due to a bad accelerometer. I'm using the accelerometer in I2c mode. The accelerometer always returns the number 21420040 for all axis. Anyone have a clue as to why?
Reply With Quote
Reply


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 09:53 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