programming workshop making sense of sensors
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 PresentationTRANSCRIPT
![Page 1: Programming Workshop Making Sense of Sensors](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/1.jpg)
Erik A. Cokeley - 2008
Programming WorkshopMaking Sense of Sensors
FIRST 2008
![Page 2: Programming Workshop Making Sense of Sensors](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/4.jpg)
Erik A. Cokeley - 2008
Design Flow• Competition Mode• Autonomous Mode
• 26.2 ms
![Page 5: Programming Workshop Making Sense of Sensors](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/5.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/6.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/8.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/9.jpg)
Erik A. Cokeley - 2008
An Example• Time for some code!
![Page 10: Programming Workshop Making Sense of Sensors](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/10.jpg)
Erik A. Cokeley - 2008
Questions?
![Page 11: Programming Workshop Making Sense of Sensors](https://reader036.vdocuments.net/reader036/viewer/2022062323/5681610d550346895dd0632f/html5/thumbnails/11.jpg)
Erik A. Cokeley - 2008
For More Info
• Erik Cokeley – [email protected]
• www.cbthinkx.com/first/frc