View Single Post
  #5   Spotlight this post!  
Unread 11-01-2009, 11:42
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,086
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: Team with limited programming resources

For a concrete example of why things is far easier this year, consider the idea of having a servo always 'pointing' in the same direction

Code:
double angle = 360 - fabs(fmod(gyro.GetAngle(), 360));
			
if (angle > 180)
	angle = angle - 180;


servo.SetAngle(angle);
Thats it. No annoying angle calculations, no integrating values for the gyro or figuring out the correct PWM signal to send to the servo -- just GetAngle() and SetAngle().Of course, its not perfect since we were only experimenting to see how well the servo/gyro played together... but it took all of a minute to write that code. Far more effort would have been expended in previous years.
__________________
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