Team2168 / 2016_Main_Robot

Code for the 2016 season
0 stars 0 forks source link

Add analog sensor to the Shooter subsystem #23

Closed jcorcoran closed 8 years ago

jcorcoran commented 8 years ago

Add a new sensor to this subsystem. An AnalogInput. Assign this sensor a channel in the Analog Input section of RobotMap. The physical sensor being used is a SHARP IR sensor. It returns an increasing numerical value as an object gets closer to it.

Add a method into the subsystem that returns true when a ball is in front of the sensor - isBallPresent().

Create a new command which will drive the shooter until a ball is present. Create a new command which will drive the shooter until a ball is not present.

The above commands will be used to automate the firing sequences.

See the 2015 code for examples of how to interface and use these analog sensors: https://github.com/Team2168/2015_Main_Robot/blob/master/src/org/team2168/subsystems/Intake.java See the isTotePresent(), getRawToteDistance(), getAveragedRawToteDistance() methods, and the toteDistanceSensor object.