Erik A. Cokeley Programming Workshop FIRST 2007
Erik A. Cokeley Presenter –Erik A. Cokeley –Involved in FIRST for 10 years Mentor - Hightstown High School - Team 1089 –NJIT - Junior –Computer Science Major –Experienced with the Microchip PIC –Autonomous robots –Program in C, C++, Assembly, Java –Familiar with the FIRST Default Code –Familiar with Kevin’s Camera Code
Erik A. Cokeley Workshop Outline –Resources –Software Installation –Some Gotchas –Review the Default Design –Loading your code into your robot –Operator Interface –Robot Controller –Other Hardware –Sensors –Some examples –Questions
Erik A. Cokeley Resources FIRST - Innovation FIRST - Kit & Manual Microchip - ChiefDelphi – ChiefDelphi Whitepapers - Kevin Watson – Blue Alliance - Me! -
Erik A. Cokeley Installation Procedure Use CD from kit or download MPLab and C18 from Microchip Install MPLab Click on the setup file for the C18 compiler Select the options that allow the IDE to be updated Try to compile Default Code –Unzip frc_code.zip –Open FrcCode.mcw –Select “Build All” in MPLab IDE Install ifi_loader
Erik A. Cokeley Design Flow Competition Mode Autonomous Mode 26.2 ms
Erik A. Cokeley IFI Loader Turn on Robot Controller Tether PC to RC’s Program Port –Use correct cable! –USB to Serial Converter causes long load times Put Robot into Program Mode Load Default Code hex file –Select COM Port in IFI_Loader –Browse for hex file –Click upload Robot Ready to Go!
Erik A. Cokeley Operator Interface (OI)
Erik A. Cokeley Robot Controller (RC)
Erik A. Cokeley Some Other Hardware
Erik A. Cokeley Some Sensors Analog vs. Digital Camera Gyro Encoder Potentiometer Pressure switch Touch switch Line switch Infrared Hall Effect
Erik A. Cokeley Some Examples Mapping Controls to Joysticks Autonomous Dead Reckoning Integrating the Camera Using a potentiometer to measure an analog voltage
Erik A. Cokeley Questions?
Erik A. Cokeley For More Info Erik Cokeley –