During GTR East, we at Team 1325 used only motor speed to control the speed of our shooter. This works when the batter is fully charged, but the actual shooter speed seems to fluctuate when our batter voltage starts to drop. We decided that we should use a sensor of some sort to set an RPM for the shooter instead of having to rely on the motor speed.
Since GTR East, we have attached a Honeywell 1GT101DC sensor on the front wheel of our shooter, and a piece of steel that rotates on the rear wheel. The magnetic sensor picks up the steel passing it, and with some simple counter code, I was successful at getting an RPM readout from the sensor on the DriverStation and Dashboard.
The datasheet for the sensor: http://sccatalog.honeywell.com/imc/printfriendly.asp?FAM=solidstate&PN=1GT101DC
I am now stuck on how to get the sensor to send a certain RPM to the motors. As an example, I want to send 2000 RPM to the “At Pyramid” preset, 2500 RPM to the “Half Field” preset, and 3000 RPM to the “Full Field” preset. I’m not sure exactly how I could achieve this.
Here is the code I have so far.
Begin vi for the counter: http://imgur.com/w9ReMQ1,30cMCXH#0
Custom Shooter Vi: http://imgur.com/w9ReMQ1,30cMCXH#1
Note that the output from the select functions in this vi go directly to the shooter motors, which were of the screen when I captured this screen shot.
Any help would be greatly appreciated.
See you at the GTR West and St. Louis!