G.2 How-To
G.3.3 Workshop 3
Common Functions
void WPIInitialize(void);
-Library required function, run first before anything else void TwoWheelDrive(int leftMotor, int rightMotor);
-Setup a two wheel drive robot with the left motor plugged into port leftMotor and the right motor plugged into port rightMotor
void FourWheelDrive(int leftMotor, int frontLeftMotor, int rightMotor, int frontRightMotor);
-Setup a four wheel drive robot (see TwoWheelDrive) void Wait(int ms);
-Used for sleeping for a specified number (ms) of milliseconds void Motor(int pwmPort, int speed);
-Control a specific motor specified by pwmPort using speed defined by speed void Motors(int leftSpeed, int rightSpeed);
-Drive the left side drive motors at leftSpeed and the right side drive motors at rightSpeed
void Drive(int speed, int direction);
-Drive the robot with a forward speed speed turning in direction specified by direction
int PWMIn(int port);
-Get the value from the radio on port port int DebugPrintf(rom const char *format, ...);
-Print some debug statements, only every 100ms int printf(rom const char *format, …);
-Print some debug statements, no time restrictions on printing int Get_Analog_Value(rc_ana_inXX)
-Gets analog value at port XX (where XX is between 01 and 08)
Comparators Conditional Modifiers
== equality && Logical AND
<= less than or equal || Logical OR
< less than ! Logical NOT
> greater than ( ) Controls order of operation
>= greater than or equal != not equal
Other Useful Functions #define uppervalue 9
#define IRToInches(x) (((6787.0 / ((float)(x) - 3.0)) - 4.0) / 2.54) Automatically replaces uppervalue or IRToInches() in code with whatever follows Joystick to Radio Assignments
1 Right X-Axis 2 Right Y-Axis
Appendix H:
Bibliography
A Study of Robotics in the Classroom." General Robotics. 1986. Rio Grande Robotics. 03 Mar. 2005 <http://www.edurobot.com/stories/delgado.html>.
"About Battlebots IQ." BattleBots IQ. BattleBots Inc. 03 Mar. 2005 <http://www.battlebotsiq.com/manage.aboutbbiq.php>.
"About Botball." Botball Educational Robotics Program. KISS Institute for Practical Robotics. 03 Mar. 2005 <http://www.botball.org/about_botball/>.
"Areas of Study." WPI Frontiers. 02 Feb. 2005. Worcester Polytechnic Institute. 03 Mar. 2005 <http://www.admissions.wpi.edu/Frontiers/study.html>.
Bastoni, Michael. "Introduction." BattleBots IQ Curriculum. BattleBots Inc. 03 Mar. 2005 <http://www.battlebotsiq.com/curriculum.intro.php>.
Bradley, Sean, Michael Paonessa, and Johanna Tenczar. "Design of a Robotics Workshop for Camp REACH." IQP. Worcester Polytechnic Institute.
Bruder, Stephen, and Kevin Wedeward. "Robotics in the Classroom." IEEE Robotics & Automation Magazine Sep 2003. 03 Mar 2005 <http://isrg.nmt.edu/~ms/publications/f/IeeeRandA2003.pdf>.
"Building Academic Success." FIRST Resource Center. Dec. 2004. US FIRST. 03 Mar. 2005 <http://www.usfirst.org/4vol/resourcectr/impact/Impact_Success_2005.pdf>.
Driscoll, David P. "Letter from the Commissioner." Science and Technology/Engineering Curriculum Framework. May. 2001. Massachusetts Department of Education. 03 Mar. 2005
<http://www.doe.mass.edu/frameworks/scitech/2001/welcome/letter.html>.
"EDU Mechanical Guide." IFI Robotics. 08 Nov. 2002. Innovation First, Inc. 03 Mar. 2005 <http://www.ifirobotics.com/docs/EDU_Mechanical_Guide.pdf>.
"Engineering and Technology Academy at Doherty Memorial High School." Doherty Memorial High School. 2003-2004. Worcester Public Schools. 03 Mar. 2005
"FIRST Trifold Brochure." FIRST Resource Center. Dec. 2004. US FIRST. 03 Mar. 2005 <http://www.usfirst.org/4vol/resourcectr/facts/TriFoldBrochure.pdf>.
"FLL: At-a-Glance." FIRST LEGO League Resource Center. Dec. 2004. US FIRST. 03 Mar. 2005 <http://www.usfirst.org/4vol/FLLresourcectr/facts/FLL_AtAGlance_2005.pdf>.
"FLL: Sport for the Mind." FIRST LEGO League Resource Center. Dec. 2004. US FIRST. 03 Mar. 2005 <http://www.usfirst.org/4vol/FLLresourcectr/facts/FLL_SportForTheMind_2005.pdf>.
"FRC Summary." FIRST Resource Center. Dec. 2004. US FIRST. 03 Mar. 2005 <http://www.usfirst.org/4vol/resourcectr/facts/FRC_Summary_2005.pdf>.
"Frequently Asked Questions." About BEST. 2004. BEST Robotics, Inc. 03 Mar. 2005 <http://www.bestinc.org/MVC/About/faq>.
"General Questions and Answers." Botball Educational Robotics Program. KISS Institute for Practical Robotics. 03 Mar. 2005 <http://www.botball.org/about_botball/faq.html>.
"Getting Started with Botball." Botball Orientation. KISS Institute for Practical Robotics. 03 Mar. 2005 <http://www.botball.org/about_botball/faq.html>.
"History of the BEST Program." About BEST. 2004. BEST Robotics, Inc. 03 Mar. 2005 <http://www.bestinc.org/MVC/About/history>.
"Inspiring Students." FIRST Resource Center. Dec. 2004. US FIRST. 03 Mar. 2005 <http://www.usfirst.org/4vol/resourcectr/impact/Impact_Inspiring_2005.pdf>.
Kamen, Dean. "Kickoff Speech." 1998 FIRST Robotics Competition Kickoff. Kamen Residence, Bedford, NH. Jan 1998. 03 Mar. 2005 < http://www.huskiebrigade.com/DEKA1998.html>.
"Massachusetts Science and Technology/Engineering Curriculum Framework." Massachusetts Curriculum Frameworks. May. 2001. Massachusetts Department of Education. 03 Mar. 2005
<http://www.doe.mass.edu/frameworks/scitech/2001/0501.pdf>.
McMahon, Shawn and Cory Wallenstein. "Development of a Robotics Curriculum for Electronics Education." IQP. Worcester Polytechnic Institute. 18 May. 2004.
Melchior, Alan. "Evaluation of the FIRST LEGO League." Heller School for Social Policy and Management. Brandeis University, Waltham, MA. Aug 2004. 03 Mar. 2005
<http://www.usfirst.org/jrobtcs/2003BrandeisEvaluation.ppt>
"More Details…” About BEST. 2004. BEST Robotics, Inc. 03 Mar. 2005 <http://www.bestinc.org/MVC/About/more_details>.
Morgan, David L. Focus Groups as Qualitative Research. 2nd ed. Thousand Oaks: Sage, 1997.
Nachmias, Chava F., and David Nachmias. Research Methods in the Social Sciences. 5th ed. New York: St. Martins, 1996.
Nagchaudhuri, Abhijit, Gurbax Singh, Manpreet Kaur, and Sudhakar George. "LEGO Robotics Products Boost Student Creativity in Pre-College Programs at UMES." 32nd ASEE/IEEE Frontiers in Education Conference Nov. 2002. 03 Mar. 2005
<http://fie.engrng.pitt.edu/fie2002/papers/1009.pdf>
O'Conner, Steve. "Information." RoboCup Junior. 20 Jan. 2005. Technology School of the Future. 03 Mar. 2005 <http://www.tsof.edu.au/events/robocupjr/>.
Pomalaza-Ráez, Carlos, and Brenda H. Groff. "Retention 101: Where Robots Go...Students Follow." Journal of Engineering Education Jan 2003. 03 Mar 2005 <http://users.ipfw.edu/groff/09-EE015- 02-2033.pdf>.
Rissmiller, Kent. Personal interview. Oct. 2004.
RoboCup Junior Official Site. 2001. The RoboCup Federation. 03 Mar. 2005 <http://www.artificialia.com/RoboCupJr/>.
Rogoff, Barbara, Carolyn G. Turkanis, and Leslee Bartlett. Learning Together: Children and Adults in a School Community. Oxford: Oxford University Press, 2001
Rosnow, Ralph L., and Robert Rosenthal. Beginning Behavioral Research: A Conceptual Primer. 2nd ed. Englewood Cliffs: Prentice-Hall, 1996.
Rozier, Suzanne. "About RCJ." RoboCupJunior Official Site. 12 Dec. 2004. Columbia University Technology Integration Partnership. 03 Mar. 2005
Rozier, Suzanne. "Dance." RoboCupJunior Official Site. 27 Nov. 2004. Columbia University Technology Integration Partnership. 03 Mar. 2005 <http://www.robocupjunior.org/dance.html>.
Rozier, Suzanne. "Rescue." RoboCupJunior Official Site. 27 Nov. 2004. Columbia University Technology Integration Partnership. 03 Mar. 2005 <http://satchmo.cs.columbia.edu/rcj/rescue.html>.
Rozier, Suzanne. "Soccer." RoboCupJunior Official Site. 27 Nov. 2004. Columbia University Technology Integration Partnership. 03 Mar. 2005 <http://satchmo.cs.columbia.edu/rcj/about.html>.
Salant, Priscilla, and Don A. Dillman. How to Conduct Your Own Survey. New York: Wiley, 1994.
Savage Soccer. 04 Dec. 2004. Worcester Polytechnic Institute. 03 Mar. 2005 <http://www.wpi.edu/~savage/>.
Sklar, Elizabeth I., Jeffrey H, Johnson, and Henrik H. Lund. "Children Learning from Team Robotics - RoboCup Junior 2000." 5 Dec 2000. 03 Mar 2005
<http://demo.cs.brandeis.edu/papers/rcj2000.pdf>.
Sklar, Elizabeth. "Education." Educational Robotics Repository. Columbia University Technology Integration Program. 03 Mar. 2005 <http://satchmo.cs.columbia.edu/er/>.
"Vision and Theory." FIRST Resource Center. Dec. 2004. US FIRST. 03 Mar. 2005 <http://www.usfirst.org/4vol/resourcectr/vision/Vision_Theory_2005.pdf>.
Warlick, David. "Citation Machine." The Landmark Project. Jan. 2004. 03 Mar. 2005 <http://landmark- project.com/citation_machine/>.
"Welcome." BattleBots IQ. BattleBots Inc. 03 Mar. 2005 <http://www.battlebotsiq.com/>.
"What is BEST?" About BEST. 2004. BEST Robotics, Inc. 03 Mar. 2005 <http://www.bestinc.org/MVC/About/what_is_best>.
Woods, Douglas W. "Chapter 4: The Interactive Qualifying Project: Selection and Design." Handbook for IQP Advisors and Students. 07 Feb. 2005. Worcester Polytechnic Institute. 03 Mar. 2005 <http://www.wpi.edu/Academics/Depts/IGSD/IQPHbook/ch4a.html>.