RobotCasserole1736 / RobotCasserole2015

Code for the 2015 Recycle Rush robot for team 1736
1 stars 1 forks source link

Test all planned sensors #10

Open imdunne8 opened 9 years ago

imdunne8 commented 9 years ago

All sensors we plan to use are listed on the electrical team whiteboard. Try to test at least one of each on the RoboRIO. Create a separate branch for sensor development and implement each sensor directly in Robot.java - they will appear in SmartDashboard in Test mode.

WPILib Sensor Documentation and code examples: http://wpilib.screenstepslive.com/s/4485/m/13809/c/88895

gerth2 commented 9 years ago

Additional task: demonstrate the ability to filter a sensor value (ie, take an average of the last few readings). There are built in functions to do this - find them in the API and show them working on a real sensor.

gerth2 commented 9 years ago

Additional task: The analog distance sensors we use do not have a linear relationship between distance and analog voltage returned. I do not believe there are built-in methods to convert.

Look at pg. 6 of https://www.pololu.com/file/0J812/gp2y0a60szxf_e.pdf . Write a function which takes an analog voltage as input, and outputs a distance based on the chart on page six.

There are many methods of doing this. One way is to duplicate this chart in excel.