View Single Post
  #13   Spotlight this post!  
Unread 12-02-2008, 14:58
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,387
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: New C18 3.0+ Compatible FRC Code

Quote:
Originally Posted by sumadin View Post
Kevin,

What is the procedure for adding additional analog sensors with the gyro code? I changed the number of ADC channels, plugged the (pots, in my case) in to channels 2 and 3, and added the code to read them in the Process_Gyro_Data function.

..the gyro has since been going crazy. I wired the gyro to an oscilloscope, and it still works, but the code (after given time to initialize and computing the bias) sees crazy values ...
Thanks.
Just a thought, here is a quote from the header of the gyro.c/Process_Gyro_Data

Code:
FUNCTION:		Process_Gyro_Data()
*
*	PURPOSE:		Manages ADC data and does gyro rate integration
*
*	CALLED FROM:	ifi_frc.c/Disabled_Spin(),
*					ifi_frc.c/Autonomous_Spin(),
*					ifi_frc.c/Teleop_Spin()
*
*	PARAMETERS:		Unsigned char with a value of zero will prevent this
*					function from calling Reset_ADC_Result_Count() when
*					ADC data has been processed. If you do use this mode
*					of operation you must call Reset_ADC_Result_Count()
*					from your own code. Failure to do this will cause
*					the gyro to stop functioning.
Are you calling Reset_ADC_Result_Count() from your code?
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist