Source: https://mokxi.com/docs/classrooms/grader
Updated: 2026-09-27

Getting started The editor Boards Parts Accounts and plans Live collaboration Classrooms Running a class Join codes, rosters and seats Assignments and submissions Auto-graded checks Joining a class and submitting work Lessons and the learning game Troubleshooting Reference

Docs / Classrooms / Auto-graded checks

# Auto-graded checks

Write the checks once; every submission is measured against them.

## What a check is

A check is one thing you expect a student's circuit to do, written in a
sentence: pin 13 blinks every 1000 ms, within 50 ms. You add a few of them to
an assignment, and from then on every student who presses Check my work gets
each one marked pass or fail with the number that was measured beside the number
you asked for.

The grading runs on the real engine, in the browser it is pressed in. Nothing is
sent anywhere to be graded, nothing is queued, and the same list runs the same
way on your machine and on theirs.

## Adding them

On the class page, under an assignment, press Checks. You get what is on it
already, and an Add a check menu of the kinds below. Each kind is a sentence
with gaps in it: fill in the gaps and the sentence is the check.

Two fields are worth saying more about.

The student sees. The name you give a check is the whole of what the class
reads when it fails, so write it as the thing you asked for: "The lamp blinks
once a second", not "check 1". Leave it blank and the sentence is used instead.

The pin. A pin is written <part>:<pin>, so uno1:13 is pin 13 on the board
called uno1. The boxes offer the parts and pins your own starter circuit
already has, so you can usually pick rather than type.

Press Save the checks when the list is right. The list is saved whole, so
removing one and saving is how a check comes off.

## Try it on the starter

Beside Save is Try it on the starter, and it is the button that matters. It
runs your list against your own solution, right there, and shows you each check
with what it measured.

check that will fail on thirty answers, and this is how you find that out in
four seconds rather than in a lesson.

## The kinds

Kind
What it measures

A pin is high or low
The level on a pin at a moment

A pin blinks
The period between one rising edge and the next, averaged over the window

A pin carries PWM
The switching frequency, and the duty cycle if you give one

The serial monitor prints something
Text or a regular expression, anywhere in what the boards printed

The serial monitor prints things in order
Several patterns, each after the one before it

A net is at a voltage
The solved voltage of the net a pin sits on

An LED is lit / is dark
The LED part's own brightness, the way the canvas draws it

After a button is pressed
Presses a button, then holds a pin to a level afterwards

The board serves a page
Fetches a path from the board's own simulated web server and looks for text in the page

The sketch builds
Whether the student's sketch compiled

Two notes on the awkward ones. A PWM check takes any for the duty cycle,
which is the right answer for a sketch that sweeps it: the fade examples have a
frequency worth checking and no one duty cycle. The board serves a page only
means anything where the WiFi is simulated, which today is the ESP32-C3, the
ESP32-C6, the ESP32 DevKit, the NodeMCU and the Pico W; see
the WiFi article for what that network is and is not.

## What the student gets

On their class page, under the work, Check my work. It runs your list on
what they submitted and shows each check with the measurement and the
expectation:

Failed The lamp blinks once a second
It toggled every 1462 ms. Expected: pin 13 on uno1 toggles every 1 s, within
50 ms, watched for 4 s.

That is the whole point of the phrasing: a student who is told "failed" learns
nothing, and a student who is told they blinked at 1462 ms when you asked for
1000 knows exactly which number to go and change.

Nothing about your circuit reaches them. They see the names you wrote, what
their own circuit measured, and what the check asked for. Your solution, your
own run, and everybody else's work stay where they are.

## What you get back

The results go up with the submission. On your side:

- the class wall carries the score as a pill on each card, so you can scan the
room in one look;

- What came back shows each submission with the score and every check;

- every failed check has a Quote button that drops the sentence straight
into the feedback box.

There is one more button, Grade it, and it is there because of an honest
limitation. A student's results are what their browser measured. Their browser
belongs to them, and a determined student could post numbers it never produced.
Grade it runs the same list on the same submission on your machine, and the panel
always says which of the two it is showing. For work that counts for something,
press Grade it.

## What a check can and cannot see

A check measures the simulation. That is a real measurement of real firmware on
a real model of the chip, and it is not a bench:

- Timing is ideal. The clock is the chip's clock as our board contract
describes it. There is no crystal drift, no temperature and no jitter that is
not in the model.

- There is no analog noise. A net reads the voltage the solver produced. A
circuit that would be marginal on a breadboard reads clean here.

- An LED's brightness is the model's, a low pass of the current through it,
which is what makes "lit" mean something under PWM. It is not a photometer.

- Nothing mechanical is measured. No bounce a part does not model, no heat,
no wires falling out.

- The network is simulated. The page a board serves comes from our own
runtime and the three .mokxi origins; there is no internet behind it.

Where that matters, say so to the class. Mokxi's rule is that what a student is
shown is accurate or says plainly that it is not, and every results panel in the
product carries the line: every check here measures the simulation, not a
bench: ideal timing, no analog noise.

## The limits

- Twenty checks on one assignment.

- A check can watch for up to sixty seconds of simulated time, and a whole run
is cut off well before that on the clock as well. A sketch that waits for
something that never happens comes back as ran out of time with what was
measured up to that point, rather than hanging the page.

- A submission whose sketch has been edited is compiled before it is graded, with
the same compiler the editor uses. The first build in a browser fetches the
toolchain, which is a large download; after that it is cached. A sketch that
does not compile is never graded against the example it started from. The run
refuses, and the results say why.

### On this page

What a check is Adding them Try it on the starter The kinds What the student gets What you get back What a check can and cannot see The limits
