PCS-02: Piece count and the next piece picks the shot table
- Your robot needs: Intake, and 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: Lesson 9: A shooter, a camera and a turret (for robots that shoot), Cookbook: "How do I...?".
Why
Pieces counts what comes in and what goes out, and says which piece fires next. With two shot tables, the next piece can pick the table. The count can be wrong in real life (two pieces touching, a bounce): we want to know how often.
Safety
- Keep fingers out of the intake. Safety glasses if you fire.
Setup
- PCS-01 done (each kind tuned).
pieces = add(Pieces.kinds(...).comingIn(...).max(4))before the launcher line; for the table,.tableFrom(pieces.nextKind())on the launcher.- Simulator: sensor lines in your robot file (
color.NAME = at=intake, see game pieces).
Steps
- INIT, START. Run the intake. Feed 4 pieces in one at a time. Read the count after each.
- At 4 the intake should stop taking more (if you used
stopsWhen(robot.pieces::isFull)). - Read
next: it should be the first piece that went in (or the one at the ready sensor). - With two tables: load a NECTAR next. The shot table line should switch to NECTAR.
- Fire them one by one. The count goes down by 1 each time.
- Feed 2 pieces that touch each other. Does it count 2?
Pass rule
In 10 single pieces fed, the count is right at least 9 times, and the table follows the next piece (the right table for at least 4 of 5 shots).
Record
Write these down while you test. The report form has them as a list to fill in.
- sensors and where they are
- count right out of 10
- what happened with 2 touching pieces
- shots where the wrong table was used
If your robot is different
A robot with no ready sensor counts only from the intake: say which sensors you have. A robot that holds fewer pieces: use your max(...).
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: TUR-03 Servo turret - two measured points and its start angle
Something wrong on this page? Tell us with a short GitHub form.