Top Banner
Erik A. Cokeley - 2008 Programming Workshop Making Sense of Sensors FIRST 2008
11

Programming Workshop Making Sense of Sensors

Feb 22, 2016

Download

Documents

qamra

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
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Programming Workshop Making Sense of Sensors

Erik A. Cokeley - 2008

Programming WorkshopMaking Sense of Sensors

FIRST 2008

Page 2: Programming Workshop Making Sense of Sensors

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

Page 3: Programming Workshop Making Sense of Sensors

Erik A. Cokeley - 2008

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

Page 4: Programming Workshop Making Sense of Sensors

Erik A. Cokeley - 2008

Design Flow• Competition Mode• Autonomous Mode

• 26.2 ms

Page 5: Programming Workshop Making Sense of Sensors

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

Page 6: Programming Workshop Making Sense of Sensors

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

Page 7: Programming Workshop Making Sense of Sensors

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

Page 8: Programming Workshop Making Sense of Sensors

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

Page 9: Programming Workshop Making Sense of Sensors

Erik A. Cokeley - 2008

An Example• Time for some code!

Page 10: Programming Workshop Making Sense of Sensors

Erik A. Cokeley - 2008

Questions?

Page 11: Programming Workshop Making Sense of Sensors

Erik A. Cokeley - 2008

For More Info

• Erik Cokeley – [email protected]

• www.cbthinkx.com/first/frc