programming workshop making sense of sensors

Post on 22-Feb-2016

30 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Programming Workshop Making Sense of Sensors. FIRST 2008. Presenter. Erik A. Cokeley Involved in FIRST for 11 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 - PowerPoint PPT Presentation

TRANSCRIPT

Erik A. Cokeley - 2008

Programming WorkshopMaking Sense of Sensors

FIRST 2008

Erik A. Cokeley - 2008

Presenter– Erik A. Cokeley– Involved in FIRST for 11 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– Co-Founder CB Thinkx LLC

Erik A. Cokeley - 2008

Workshop Outline– Review the Default Design– Sensor Selection– Collecting Sensor Data– Interpreting Data– React!– Some examples– Questions

Erik A. Cokeley - 2008

Design Flow• Competition Mode• Autonomous Mode

• 26.2 ms

Erik A. Cokeley - 2008

Sensor Selection• Identify the problem• What information do we need• How do we gather that information

– More than one sensor might be needed• How to select sensor

– Make sure it reads what you want…– Compatible with your machine– Accuracy & Repeatability

Erik A. Cokeley - 2008

Collecting Sensor Data• Read the documentation.

– No two sensors work exactly the same– Test your sensor– Only use the sensor if it still helps

• Poll or Interrupt Models• Sampling Rate & Precision• Processing Time/Storage Requirements

Erik A. Cokeley - 2008

Interpreting Data• Aggregation

– Multiple Sensors– Over Time– Running Total– Running Average

• Correlation– Give the data meaning and purpose

• Data Issues– Noise Margin– Estimation/Linearization– Dead Zones

• Programming Issues– Overflow– Hysteresis

Erik A. Cokeley - 2008

React!• State Machine• Where to React

– Reaction time• Priority

– Sensor Priority • Man vs. Machine

– Machine Functionality• Saving resources (battery)

• Control the Robot

Erik A. Cokeley - 2008

An Example• Time for some code!

Erik A. Cokeley - 2008

Questions?

Erik A. Cokeley - 2008

For More Info

• Erik Cokeley – FirstJerseyKid@comcast.net

• www.cbthinkx.com/first/frc

top related