Download presentation
Presentation is loading. Please wait.
Published byAlexander Darcy Price Modified over 9 years ago
2
How to Program the 2004 Robot Controller from Innovation First For new C programmers and non- technical types
3
Topics CMU Robot Builder Review What’s New in 2004? C Concepts Default Code Explained Modifying the Default Code Advanced Topics
4
From EDU and CMU to FRC You may already know everything you need!
5
EDU RC vs. FRC Have you already practiced programming the 2004 EDU Robot Controller? The process is nearly identical! Only differences are: –FRC has more and different I/O –FRC works with IFI radio modems and Operator Interface (just like last year)
6
Carnegie-Mellon’s “Robot Builder” The basic process of programming your EDU RC was covered in CMU’s tutorial called “Robot Builder”. It’s on the web at: http://www.rec.ri.cmu.edu/ed ucation/edubot/2004_conten t/index.htm and also included on a CD-ROM in your 2004 FIRST kits. http://www.rec.ri.cmu.edu/ed ucation/edubot/2004_conten t/index.htm
7
Quick Review: Getting Started IMPORTANT: Download the instructions ( Microchip C-Bot Installation Guide ) from IFI’s website. While you’re there, get the FRC RC Default Code. Be sure to unZip it after downloading. Put it in your c:\mcc18\ directory. There is also a newer version of IFI Loader than the one on the C-Bot CD. Download and install it. (Make sure you un-install any previous versions that you have!) http://www.innovationfirst.com/ firstrobotics/documentation.htm
8
Quick Review: Install C-Bot Follow instructions from IFI! Use C-Bot CD to install: –Step 1: MPLAB IDE –Step 2: C18 Compiler Skip Step 3 and install newer version of IFI Loader from web site.
9
Quick Review: Write and compile your code Start MPLAB IDE File -> Open Workspace… Select the.mcw file from the Default Code you downloaded. Double-click user_routines.c in project window. Scroll down and edit Default_Routine(). Project -> Make Verify BUILD SUCCEEDED
10
Quick and Dirty Code Modification pwm01 = p1_y; pwm02 = p2_y; pwm03 = p3_y; pwm04 = p4_y; pwm05 = p1_x; pwm06 = p2_x; pwm07 = p3_x; pwm08 = p4_x; pwm09 = p1_wheel; pwm10 = p2_wheel; pwm11 = p3_wheel; pwm12 = p4_wheel; OUTPUTS INPUTS pwm01 = p1_y; pwm02 = p1_x; pwm03 = p3_y; pwm04 = p4_y; pwm05 = p1_x; pwm06 = p2_x; pwm07 = p3_x; pwm08 = p4_x; pwm09 = p1_wheel; pwm10 = p2_wheel; pwm11 = p3_wheel; pwm12 = p4_wheel; pwm01 = p1_y; pwm02 = 255 - p1_x; pwm03 = p3_y; pwm04 = p4_y; pwm05 = p1_x; pwm06 = p2_x; pwm07 = p3_x; pwm08 = p4_x; pwm09 = p1_wheel; pwm10 = p2_wheel; pwm11 = p3_wheel; pwm12 = p4_wheel;
11
Quick Review: Download code to your Robot Controller Power up RC Connect serial cable from PC to PROGRAM port. Start IFI_Loader. Select appropriate COM port. “Browse” to find the.hex file you just compiled. Click DOWNLOAD.
12
Summary of Programming Process Download docs, code, and app from innovationfirst.com Install apps from C-Bot CD. Run MPLAB, edit code, and compile it. Run IFI Loader to transfer.hex file to your FRC
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.