You build a robot out of real parts, wire it up, and write the code that
runs it. Nothing here is pretend: a servo asked for more than it can give
will not give it, a block wider than the jaws will not be picked up, and an
arm told to reach past its own length will not stretch.
Four steps, in this order
- Build. Click parts in the library on the left. For the robot
arm, add the Arm Base Plate first — everything else clips onto it.
The list will not let you run until every part is on the bench.
- Wire. Click a glowing pin, then click the pin it should join.
The list on the right ticks off each connection as you make it. If two
pins should not be joined, the lab says so instead of quietly accepting
it.
- Run. Press RUN SIMULATION. If something is missing or
miswired, a box tells you exactly what — it is not a puzzle.
- Code. Press Edit Arduino Code, change one number, press
Apply & Run, and watch what the robot does differently. That
loop — change one thing, look — is the whole point of the lab.
What is on the screen
- Four views of the same robot: top, isometric, front and side.
Drag to orbit the isometric one, scroll to zoom, double-click any view to
make it fill the screen. Press
R to reset one view,
H to reset them all.
- The bar across the top is the robot's own controls — how many
blocks, what size, where to put them. It only appears while the
simulation is running.
- The readout is the small panel of live numbers. Drag it by its
title if it is covering something you want to see.
- The two side rails — parts on the left, wiring on the right —
slide away on their own once you press Run, because the building is over.
Hover the tab at the screen edge to peek, click it to keep it out.
The robot arm, in particular
The arm has three joints and a gripper. The base turns left and
right, the shoulder lifts, the elbow bends, and the
jaws open and close. Every servo takes 0–180°, and nothing you write
can make one go further.
- Blocks are what the arm picks up. Press Place → Block
on the top bar, then click anywhere on the table. There is no snapping:
the block lands exactly where you clicked, even somewhere the arm cannot
reach — and then the lab tells you it cannot reach it.
- Place → Stand drops a small platform to put a block on top of,
and Clear takes the stands away.
- Size picks which block the next click drops. They are not just
bigger: a cube twice as wide is eight times as heavy, so the large one
needs a much harder squeeze.
- Shuffle moves every block to a new angle, so a mission that
only worked because you remembered the numbers stops working.
- Click a block to open its card — where it is, how far out, at
what angle, how big, how heavy, and whether the arm can reach it. The
card follows the block while the arm carries it. Drag it by its title
bar.
The code panel has four tabs
| Equations | The three formulas the arm actually obeys —
travel time, grip force, torque. Edit one, press Apply, and the arm
changes behaviour. A wrong formula is not an error message; it is an
arm that drops the block. |
| Drawing | A dimensioned engineering drawing of the machine.
Every length, angle and limit you need to plan a mission is on it. |
| Mission | Plan before you code. Say where the block is and
where it must end up, then decide each step: which joints move, what
angle, how fast, how wide the jaws. The planner checks every row
against the real arm and then writes it into the sketch for you. |
| Sketch | The Arduino code itself. SpyralArm.h
does the plumbing — attaching servos, waiting for a joint to arrive,
reading sensors. It contains no physics on purpose: the equations are
yours to write. |
A first mission, start to finish
- Run the simulation, then open the code panel and go to
Mission.
- Pick a block size. Set where it starts (a distance and an angle) and
where it has to go.
- Press Plan it. Each step appears as a row you can edit. Rows
the arm cannot do are marked, with the reason.
- Press Write it into the sketch. Your plan becomes real Arduino
code.
- Put a block on the table where your plan said it would be, then press
Apply & Run.
Numbers worth knowing
| 0–14.4 cm | how far the jaws reach on the bench. It is not
one number: reaching down to the table spends arm length, so the higher
you work the further out you can get |
| 0–180° | every servo, including the base. Half the table is
simply behind the arm |
| 0.54–2.40 cm | how far the jaws open, shut to wide |
| 11 kg·cm | what the shoulder servo can hold. Reach further
out with the same block and the number climbs |
| 13.4 / 50 / 107.4 g | the three blocks |
When something does not work
- "jaws closed on nothing" — the arm shut its gripper where no
block was. Check the angle you sent it to against the block's card.
- "slipped" — the squeeze was too weak for the weight. Your
gripForce() was asked for a mass; check you gave it the
right one.
- "stalled at 2.16 cm" — not a fault. The jaws were told to
close and met a solid block, so they stopped on its faces. That is what
holding something looks like.
- "out of reach" — no combination of angles will get there. Move
the block, or accept it and plan around it.
- The arm keeps repeating — that is
loop() doing
what loop means. If the job is finished, the code has to say so.
Nothing in this lab hides a mistake from you. If a
number looks wrong, it is telling you something true about the machine you
built.