FIRST Mentor Workshop
Download
Report
Transcript FIRST Mentor Workshop
For
Inspiration and
Recognition of
Science and
Technology
Mentors Workshop
Programming
Sub-System
Mark McLeod
Team 358
Festo/Hauppauge H.S.
Objectives
FIRST Rules & Restrictions
Basics/Components
Design Notes
Potential Problems
Keeping Students Busy
Typical Schedule
FIRST Rules & Restrictions
Must
use IFI supplied libraries
Cannot attempt to bypass IFI code -does not apply to any of the default
source code provided, just the object
libraries and link map protected areas
Official Suppliers
Official Suppliers
www.innovationfirst.com/
www.ifirobotics.com
Microchip C compiler license in FIRST
Robovation kit
Default code provided for basic operation
2005
V2.2 – Basic driving functionality
V2.4 – CMU camera support added
Navigation – autonomous mode scripting
Flow
IFI_Loader
MPLAB
.hex file
Robot Controller
Operator Interface
Basics/Components
Default code
C or Microchip PIC assembly
PIC limitations (~31K, 1.3K, nested calls,
256/120)
Mechanics of compiling & downloading
Editor-MPLAB
Installation options
Short path names
Creating a new project
Compiler-mcc18
Loader-IFI_Loader (download to the robot)
Disabled, Autonomous and Driver modes
Sensors (analog, digital)
External circuits
Notes
Typically will not have a robot to test
programming on until the end of build, use
Robovation
Sensors must be allowed time to power-up
before inputs are to be believed
Custom circuits may use TTL, analog, digital
I/O ports
Team will require a laptop for competition (can
lug a desktop along). You will have to program.
RoboEmu2 – a FIRST C program emulator
http://www.robbayer.com/re2.shtml
Act on momentary switches when depressed
vs released
Potential Problems
MPLAB & IFI_Loader errors
printf limitations
Lack of configuration management
Lack of robot test/debug time
Mishandled transitions between modes –
Disabled, Autonomous, Driver
Over-dependence on sensors (fault tolerant)
Which side is the “front” of the robot?
Motors wired in reverse
Remember to debounce switches
Keeping Students Busy
“Hello World”
Autonomous
Integrate switches
Tune driver joystick control
Debugging practice
Custom circuit design and test
Sensor testbeds
Robovation test robot
Design Operator Interface controls and
switches
Typical Electronics Schedule
September thru December
Develop basic skills
January thru March
Six week build period
Robot design -- what control over basic operations is
required
Designing and testing solutions
Integrating solutions with other sub-systems
Test before robot goes into shipping crate
Code development can continue after shipping
Regional event (debug and test during rounds)