Puzzles

Factory puzzles

Mokxi hands you a work order and an automation line that is already wired to an Arduino Uno. Write the sketch, and add extra parts if you want them, any way you like. Run tests plays your build on the real simulator, along with surprise runs you have not seen. Pass them all and you are scored on parts cost, reaction and code size, next to everyone else's best.

You can play every puzzle without an account, and your best scores stay in this browser. .

How scoring works

A build that passes every run gets three scores. Lower is better for all three, and each one has its own histogram.

  • Parts cost

    What the parts you added cost. Fewer is better.

    Counted in points

  • Reaction

    How long your line takes to respond across the test runs. Less is better.

    Counted in milliseconds

  • Code size

    Bytes of program memory the build uses. Fewer is better.

    Counted in bytes

Histograms count everyone's best score and never show names. Students in a class are left out.

Work orders

Easiest first. Each one opens in the editor with the line already built.

  1. Tier 1: Warm-upTiming

    Gate Beacon

    Cars cross the yard gate one at a time. When the photo-eye at the gate sees one, light the beacon for 0.8 seconds, then switch it off.

    Parts list: 1 kind of part you may add

    Not solved yet

    Open puzzle
  2. Tier 2: EasyTiming without waiting

    Bottle Filler

    The bottling line needs a controller. Fill each bottle for 1.2 seconds when the sensor sees it.

    Parts list: 1 kind of part you may add

    Not solved yet

    Open puzzle
  3. Tier 3: MediumDebouncing

    Chattering Button

    The start panel has a worn button, and its contacts chatter for a few milliseconds every time it closes or opens.

    Parts list: 2 kinds of part you may add

    Not solved yet

    Open puzzle
  4. Tier 3: MediumSequencing

    Stack Light

    Pressing Start runs the stack light through one cycle: green for 1 second, yellow for half a second, red for 1 second, then all dark.

    Parts list: 1 kind of part you may add

    Not solved yet

    Open puzzle
  5. Tier 3: MediumCounting and displays

    Parts Counter

    Count the parts coming off the line on the seven-segment display. It starts at 0, goes up by one for every part the eye sees, and rolls over from 9 back to 0.

    Parts list: 2 kinds of part you may add

    Not solved yet

    Open puzzle
  6. Tier 3: MediumSorting with analog input

    Weigh and Sort

    Items roll over a scale and stop at a diverter. When the eye at the diverter sees an item, read the scale on A0.

    Parts list: 1 kind of part you may add

    Not solved yet

    Open puzzle
  7. Tier 4: HardInterlocks

    Two-Hand Press

    The stamping press must only come down when both operator buttons are pushed within 300 ms of each other and the guard door is closed.

    Parts list: 1 kind of part you may add

    Not solved yet

    Open puzzle
  8. Tier 4: HardPWM ramps

    Soft-Start Conveyor

    Start the conveyor gently. Pressing Start lights the run lamp and ramps the drive from 0 to full speed in a straight line over 2 seconds.

    Parts list: 1 kind of part you may add

    Not solved yet

    Open puzzle
  9. Tier 4: HardTimeouts and latches

    Line Watchdog

    A machine on the line sends a heartbeat pulse about every 300 ms. If 500 ms pass without one, turn on the alarm lamp and keep it on, even after the heartbeat comes back.

    Parts list: 1 kind of part you may add

    Not solved yet

    Open puzzle
  10. Tier 5: Shift leadFeedback control

    Oven Hold

    Hold the curing oven at the temperature the dial asks for. The heater is PWM on pin 9; the plate temperature comes back on A0 as a voltage; the dial on A1 sets the target, 0 to 4 V across its travel.

    Parts list: 2 kinds of part you may add

    Not solved yet

    Open puzzle