PCS-01: Piece Tuner - can the sensor tell the pieces apart?
- Your robot needs: Colour sensor for game pieces or Distance sensor for game pieces.
- Starter bots that fit: none (it needs parts the starter bots do not have).
- Library version: v0.17.0 or newer.
- The docs it tests: Finding your numbers (the finders), Robot module (the robot in five files).
Why
A colour sensor (or a distance sensor) tells the robot which piece it holds: POLLEN or NECTAR, red or blue. How well it works depends on where the sensor is mounted and the light. We want readings from many mounts.
Safety
- Nothing moves in this test. Keep fingers out of the intake if it is powered.
Setup
- A
PiecesorPieceSensorline inRobot.java(lesson 9 section 12). - The Piece Tuner file for your robot (recipe).
- One of each game piece.
Steps
- Start the Piece Tuner. D-pad up/down chooses the sensor.
- Put a POLLEN where it really sits (or passes). D-pad left/right to POLLEN, press A, hold still.
- Do the same for each kind (RED_NECTAR, BLUE_NECTAR), then EMPTY with nothing there.
- Read any warning (two kinds too close, EMPTY looks like a piece).
- Copy the lines into
Tunables.java, rebuild, run it again. - Hold up each piece 10 times, in slightly different spots: count how often "It sees" names it right.
Pass rule
Each kind is named right at least 9 of 10 times, and EMPTY reads NONE at least 9 of 10 times.
Record
Write these down while you test. The report form has them as a list to fill in.
- sensor (REV Color Sensor V3, REV 2m Distance, a webcam) and how far it is from the piece (mm)
- the lines it printed
- right out of 10 for each kind and for EMPTY
- the warnings it gave
If your robot is different
A distance sensor tells sizes apart, not colours: test POLLEN against NECTAR only. Different light (a gym, a window) changes colour readings: if you can, test in two places and say where.
Report your result
Pass, fail, or could not run: every result helps. The form opens on GitHub with this test filled in (a free GitHub account is needed). No student names, please.
Report resultNo reports for this test yet: yours would be the first. Every test's reports.
All tests · Next: PCS-02 Piece count and the next piece picks the shot table
Something wrong on this page? Tell us with a short GitHub form.