Mecanum Workshop v0.6.35Maker Lab Kids · 4WD holonomic · firmware 0.10.20
Not connected ROBOT BUSY
This browser has neither Web Serial nor Web Bluetooth. Use Chrome or Edge. Serial (USB, or a paired classic Bluetooth module) works on desktop; Web Bluetooth (BLE modules only) works on Android and desktop. The page must come from http://localhost or an https site, not a file:// URL.
Hold to drive speed 5/9
sending -
speed 56%
Keyboard: W A S D move, Q E spin, 1-9 speed, Space stop. Release = stop.
Two-stick controller → (slide and turn at once, analog or digital; firmware 0.10.8+) · Lesson plans
Let it drive itself idle
Set the sensors up and calibrate them in the Sensors tab first. A red STOP bar stays at the bottom of the screen while the robot drives itself, on every tab.
Speed 5
Level n = n/9 of the calibrated top wheel speed. The robot sends back the fraction it is using.
Command cheat sheet (serial or Bluetooth, 9600 baud)
Manual (case-insensitive, latched until x)
w s a dforward / back / strafe left / strafe right
q espin counter-clockwise / clockwise
xstop everything; also aborts a running demo or calibration run
m<bearing>,<mm>,<turn>;one program move: mm on a bearing while turning; mm 0 = turn in place. move: start, then move: done
v<f>,<r>,<s>;drive forward / right / clockwise at once, each -100..100 % of full speed (the two-stick controller sends these). No reply; stops unless repeated within 500 ms
1-9speed level (fraction of MAX_WHEEL_MM_PER_SEC)
Demos and calibration
pkrun the demo: circle strafe facing in (build anything else in the Program tab). The other 20 (pc pd pj pu, p1-p9, pa pb pe-pi) need the sketch flashed with USE_EXTRA_DEMOS 1 (and another feature off to fit, e.g. USE_IR_REMOTE 0); p? lists what this robot has
z1 .. z8demo size 25% .. 200% of every distance (z4 = 100%)
cf cs crfull power for 2 s: forward / strafe right / spin clockwise. Measure, then update CONFIG.
t0 t1 t2 t3twitch shield channel M1 / M2 / M3 / M4 forward for 300 ms, ignoring the wiring table
iIMU status: which one (BNO055 or MPU-6050, found at start-up), on/off, heading, calibration levels or gyro offset
iwwatch the IMU heading (I,<degrees>, clockwise positive) 5 times a second, until x
in / ifIMU heading hold on / off. On: moves track heading, settle after each move, cr measures its own spin
lw bwwatch the line / light sensors: raw and normalised readings 5 times a second, robot standing still, until x
ls lc lfline sensor: show one reading / calibrate by strafing across the line / follow the line until x (set up in the Sensors tab)
bs bc bflight sensors: show one reading / 5 s calibration (cover each LDR, then shine on each) / seek the light until x (set up in the Sensors tab)
rs rwlaser rangefinder (VL53L0X, found at start-up): one reading / watch 5 times a second (with the sonar), until x. Replies R,<mm>, -1 = nothing in range. Forward driving and line following stop 120 mm from a wall
rusonar (the kit's HC-SR04, A2 echo / A3 trig): one reading, U,<mm>, -1 = no echo. Only while no sensor is wired to A2 / A3
IR remote (receiver on D2)
arrows (2 4 6 8)hold to drive forward / strafe left / strafe right / back; release stops
1 3 (CH- CH+)hold to spin counter-clockwise / clockwise
OK 5 (>>|)stop. Any key stops a running demo
4 6 (|<< >||)slower / faster, one speed level
9 (EQ)circle strafe facing in. Other keys print their code (map them in IR_KEYS[])
* # (0 200+)follow the line / seek the light. The 21-key remote's labels are in brackets; its unmapped keys print their code
Sensor settings (end each with ; or Enter)
k?;list every line / light setting as K,key,value
k<key>=<value>;change one, live, e.g. kln=2; klp0=a2; klv=180; kbb1=45;
kw; ku; kr;save to EEPROM / undo unsaved changes / back to the sketch defaults
?print the help text
Connecting
BluetoothWeb Bluetooth. The kit's HC-06 is dual-mode: BLE service FFE0, notify on FFE1, writes on FFE2. Pick HC-06, PIN 1234 if asked. The console lists what the module offers on connect.
SerialUSB cable, or the HC-06's classic side after pairing it in the OS (PIN 1234). Desktop only.
While a demo runs
(anything)the firmware is blocking inside the move; every character except x (or any IR remote key) is discarded until it finishes
Build a program not loaded
Drag blocks from the left and snap them together under each other. RUN sends them to the robot one at a time, in order, and lights up the block it is doing. Heading hold turns the IMU on or off for the moves after it: run the same square both ways and compare where it ends up. Distances are millimetres at 250 mm/s; turns are degrees, right = clockwise.
The robot will do
    Save and open
    Programs are saved in this browser, on this device. The examples are always there. Needs firmware 0.10.12 or newer (the m command).
    Preprogrammed moves idle
    Tap a card to run it. Previews are drawn from the same geometry the firmware uses: path of the robot's centre, where the nose points every half second, start pose, end pose (hidden when it comes home). Sizes are the floor space needed at the size below, before any calibration error.
    Demo size 100%
    Scales every distance and circle in every demo (25-200%). Speed stays the same, so smaller runs are shorter. Sent to the robot as z1-z8 just before each demo.
    IMU (MPU-6050 or BNO055) unknown
    -
    Found by itself at start-up on A4/A5 (MPU-6050 0x68, BNO055 0x28). The heading updates by itself: 0-360 degrees, clockwise from where the robot pointed at power-on. Turn it by hand and watch it move (Watch makes it faster). If the number never moves, the robot did not find it: check the status line and the wiring. Heading hold on / off is on the Calibrate tab.
    Sensors on this robot not read yet
    The line follower and the light seeker are set up here, no re-flashing. Every change goes to the robot straight away (try it while it follows), and Save to robot keeps it after power-off. Needs firmware 0.10.2 or newer.
    ADS1115 boards: not read yet
    Two saved layouts: wired (Uno pins or the mux) and ADC (ADS1115 inputs). The robot picks one at start-up; the wiring panels below edit the one selected here.
    Line follower - wiring, wired layout
    The 8-channel board has outputs D1-D8, 8 mm apart. Wire the ones you want to free analog pins and tell the robot which is which. Two channels (D3 + D6) are enough for 19 mm tape.
    Not sure which way it goes? Tape under one channel, press Read (ls) below, move the tape away, Read again, and see which way that channel's raw number moved.
    Line follower - tuning
    Line follower - try it off
    line - offset - mm
    raw (0-1023) -
    Watch streams the readings with the robot standing still: slide white paper and black tape under each channel and its raw number should jump by 100 or more. If nothing moves, the emitters are off or the channel is not wired where the robot thinks. Then: put the line under the middle of the array, Calibrate (it strafes across the line and back), then Follow. The settings above change live while it follows. STOP ends following. Calibration is saved on the robot. Bars show how much tape each wired sensor sees, left to right; the green line is the computed offset.
    Light seeker - wiring, wired layout
    Each LDR (with its resistor) goes to a free analog pin and looks in one direction: its bearing, in degrees clockwise from the nose. Two at -45 / 45 steer toward the brighter side; three or more let the robot slide straight at the light from any side.
    Light seeker - tuning
    Light seeker - try it off
    brightest - light at -
    raw (0-1023) -
    Set it up above first. Calibrate gives you 5 seconds: cover each LDR with a thumb, then shine the torch on each. Seek drives toward the light and holds still when it gets there; the settings above change live while it seeks. Calibration is saved on the robot. Bars are the LDRs in table order; the dial points where the light is, nose up.
    Laser rangefinder (VL53L0X) and sonar unknown
    -
    sonar (HC-SR04) -
    Optional. Wire VIN 5V, GND, SDA A4, SCL A5; the robot finds it at start-up (restart it after plugging one in). It sees 30-1200 mm straight ahead in a narrow beam. Driving forward and line following stop by themselves 120 mm from a wall (TOF_STOP_MM in the sketch). Needs a BNO055, if you have one, at address 0x28 (ADD pin to GND on most cheap boards). The kit's sonar reads on A2 / A3 whenever no line or light sensor is wired there; Watch shows both.
    Make these the sketch defaults (for flashing more robots)
    Paste over the matching lines in the sketch's "line follower and light seeker DEFAULTS" CONFIG block. A robot flashed with it starts with this setup (calibration still has to be done per robot).
    Calibrating and tuning live on their own page
    Measure the robot's numbers step by step, try a number live, save it on the robot (it keeps it switched off and on), or go back to the code's numbers. The old steps below this panel are gone.
    Open Calibrate / Tune →
    The robot is driving with not connected
    Read-only here: change them on the Calibrate / Tune page.
    Connect to see the numbers the robot drives with.
    Calibrating
    The robot is running mecanum_holonomic. The speed curve and drive-straight steps are in calibration.ino: flash that, calibrate, flash this one back. Here you can re-check the distance (step 3) and make a small correction, or switch surfaces.
    Measure with
    The gyro measures the turns itself. Tape measure works on any robot, with or without an IMU: you watch, tap and measure. The IMU (if there is one) is off while the tape steps drive and back on afterwards; the robot keeps using it as usual.
    Step 1 - Speed curve (spins in place) needs an IMU
    Room to spin. It spins at a few power levels while the gyro measures how fast it really turns: first it finds the lowest power that gets it moving at all, then half, three-quarter and full power, and how far it coasts after the motors stop. About 20 seconds; STOP aborts and puts the old numbers back.
    not run yet
    Step 1 - Where it starts, and its speed
    Room to spin. It nudges itself, a little harder each time: first turning in place, then sliding sideways. Tap the green button the moment it really moves (humming does not count).
    not run yet
    Then about 2 m clear ahead. Mark where the tail is, drive, and measure how far the tail moved. Put it back on the mark before the second run.
    not run yet
    Step 2 - Drive straight (tape measure)
    A straight line on the floor (tape, or a floor board) and about a metre clear. Each run goes 1 m. Forward: start with the robot on the line, measure how far the middle of the robot ended up to the side of it (right +, left -). Strafe right: start with the robot across the line, measure how far it ended up ahead of it (ahead +, behind -). Apply: each wheel gets a trim and the robot uses it at once. Run again to check.
    not run yet
    Step 2 - Drive straight (each wheel)
    About a metre clear in front, behind and to each side. With heading hold off, it drives forward and back, then strafes right and left, slowly and fast. If one side or end is stronger, the robot turns while it should go straight; the gyro measures by how much, and each wheel gets its own trim (where it starts and how strong it is). It repeats until it runs straight, up to three rounds of about 30 seconds.
    not run yet
    Step 3 - Distance (tape measure)
    Nothing on the robot can see distance. Mark the start, drive, and measure how far it went and how far it ended up to the side (right +, left -). Apply: every speed is corrected and the robot uses it at once. Drive again to check.
    not run yet
    Wheel wiring, and numbers for the sketch (timed full-power runs)
    The science behind it: timed full-power runs measured with a tape. These give numbers for the sketch (the block at the bottom, for flashing more robots), not the robot directly. To calibrate this robot without an IMU, pick Tape measure above.
    Step 0 - Which wheel is which? (t0-t3)
    The shield has four channels, M1 to M4, and the kit's wiring decides which corner each one drives. Robot on a box so the wheels are free. Twitch a channel: one wheel turns for a third of a second. Say which corner it was and whether it rolled forward or backward. Do all four, then the block below has the wheelWiring[] table filled in.
    wheelWiring[] = ? - twitch all four channels
    Step 1 - Forward at full power (cf)
    Tail on a start line, robot pointing along a tape measure. It drives forward at full power for the run length, then stops. Measure how far the tail moved, in mm. If any wheel turns the wrong way here, step 0 is not finished.
    MAX_WHEEL_MM_PER_SEC = ? - run a trial
    Step 1b - Forward at half power (ch)
    Same as step 1, at half power. Motors are not straight lines: at half power they run much faster than half speed, and without this number every distance in the demos and programs comes out long (1 m asked, nearly 2 m driven). Measure the tail again, in mm.
    HALF_POWER_MM_PER_SEC = ? - run a trial
    Step 2 - Strafe right at full power (cs)
    Same start line, but now the tape runs to the robot's RIGHT. It strafes right for the run length. Measure how far it went sideways, in mm. If it went left instead, the wheels are mounted mirrored: swap the rollers, not the code.
    STRAFE_EFFICIENCY = ? - needs step 1 and a trial
    Step 3 - Spin clockwise at full power (cr)
    Tape an arrow on top pointing forward. It spins clockwise for the run length. Count the whole turns, then read the leftover like a clock face (1 clock-minute = 6 degrees, so a quarter turn past = 15 minutes = 90 degrees).
    SPIN_EFFICIENCY = ? - needs step 1 and a trial
    Optional - IMU (BNO055 or MPU-6050) unknown
    Wire either one to 5V, GND, SDA A4, SCL A5. The robot looks for a BNO055 and then an MPU-6050 at start-up and turns heading hold on for whichever answers; no re-flash. With it on, every move holds its heading against the gyro and squares up at the end, and step 3 measures the spin itself: the console prints SPIN_EFFICIENCY ready to paste. MPU-6050: power on with the robot sitting still, it measures the gyro's offset for a second. BNO055: wait for gyr3 in the status before trusting it.
    Step 4 - Prove it
    After re-flashing with the new numbers: drive 1 m and measure it (a difference goes into the distance check above), and turn a full circle: it should stop facing exactly the way it started, with little or no correction at the end. Try both with heading hold off (if) too: that shows how good the timing alone has become.
    Copy the numbers as sketch code
    Paste into the CONFIG - motion calibration section of mecanum_holonomic.ino: as the fleet defaults (what every robot that was never calibrated drives with), or, with CALIBRATION_IN_EEPROM 0, baked into one robot's own build.
    Robot console