Skip to content

About

Rowing monitor for the M5Stack Tab5 (ESP32-P4): stroke rate, GPS split, camera, offline waterway maps

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OpenRowCoach

OpenRowCoach

An open-source, SpeedCoach-style rowing monitor with stroke analysis. It is not tied to one device: today it runs on the M5Stack Tab5 (ESP32-P4), and other ESP hardware can follow. On the Tab5, stroke rate comes from the built-in BMI270 accelerometer; split, distance and distance per stroke come from a GPS unit on the Grove port; heart rate from any Bluetooth chest strap or a Garmin watch broadcasting HR. The built-in camera looks toward the bow, offline waterway maps sit on the microSD card, and every session is logged there for on-device review or GPX/TCX export. Runs standalone.

Main screen

Analyse your rowing online

openrowcoach.com is a web app for looking at a session after you have rowed it. You do not need to install anything or know how to code, and you can try it without a device: a demo race is already loaded.

  • Overview: your track on a map, coloured from slow to fast, with distance, time, split, best 500 m, rate, heart rate and graphs of the whole session, including how much the boat rolls and yaws.
  • Strokes: every stroke on its own, with the same coaching hint the device gives, and your strokes compared by rate.
  • Oars: for a session recorded with oar sensors: how far each seat's catch and finish lie from the stroke seat, how far apart the crew is, and each oar's arc, drive and angles over the session, with a mark where the sticks fell silent, and a replay of the oars from above and from the side.
  • Compare: tick several sessions and pick a stroke rate, and see the average stroke of each at that rate on top of each other, with a table of split, distance per stroke, drive and recovery time, catch, drive, finish and run side by side. Add a note to a session (for example the rigging you used) to tell them apart.
  • Guide: what the sensors measure, a drawn stroke (catch, drive, finish, run, approach), a real stroke from the demo with numbered marks, and what each figure of a session lets you conclude and what it cannot tell you. It is there before you load anything.
  • Strava and Garmin: download your session as a GPX or TCX file with one click, then upload it to Strava or Garmin Connect.

To load your own session, stop it on the tablet, plug the Tab5 into your computer with USB-C and press Read from Tab5 (Chrome or Edge). Or press Open files and pick the files you copied off the SD card. Loading your own sessions needs you to sign in: press Sign in, type your e-mail address and then the 6-digit code that is mailed to you. There is no password, and the first time makes your account. The guide and the demo race need no sign-in. Sessions you read in stay on the server, so they are there next time, and only you can open them. The session button at the top opens a calendar: days with a session are marked, a day lists its sessions, and All sessions lists everything, newest first. Rename and Delete next to it change your own sessions. Not built a device yet? Start with the install page.

Hardware

Part Notes
M5Stack Tab5 1280×720 display, BMI270 IMU, microSD, battery, camera, Bluetooth, 2.4 GHz Wi-Fi, battery-backed clock
M5Stack Unit GNSS / GPS v1.1 (ATGM336H-6N, AT6668) plug into Port A (red Grove, G53/G54)
microSD card FAT32 (exFAT is not supported); the F/Y serial command formats it on the device
Heart rate (optional) BLE chest strap or a Garmin watch with Broadcast Heart Rate; ANT+ is not supported
Waterproof case / phone mount the Tab5 is not water resistant

The firmware switches the Grove 5 V output on and turns Port A into a UART. It scans 115200/9600/38400/57600 baud and both pin orders, so the unit works with a standard Grove cable. Once found it configures 10 Hz updates (AT6668 / CASIC commands, with u-blox and MTK fallbacks) and only RMC + GGA sentences.

Mounting: any orientation works. The detector finds the boat's forward axis by itself (largest horizontal acceleration) and works out which way is forward from the shape of the stroke, or from GPS once you are moving above 1 m/s. After about half a minute of that, forward is held as a direction in the unit's own frame: the surge is measured along it and nothing else, so a sideways push is not counted as a forward one, and the sideways acceleration is kept apart (see sway below). Mount it rigidly: a wobbly holder adds noise that looks like strokes. Rotate screen 180 in Settings if the case is mounted the other way up.

Building and flashing

Flash from your browser

Chrome or Edge on a computer, and a USB-C cable that carries data.

  1. Open the install page.
  2. Plug the Tab5 into the computer.
  3. Press Tab5 (original, tested) for the earlier hardware (chip revision below 300), or Tab5 newer revision (experimental) for chip revision 300 or above. Choose the port when the browser asks.
  4. If no port appears, hold the boot button while resetting the Tab5, then try again.
  5. If the screen stays black, flash the other button. A wrong pick can be flashed over.

The same page flashes an oar sensor: plug in a StickS3 instead of the Tab5 and press Oar sensor (StickS3). Flash the Tab5 from the same release so both speak the same protocol.

The page asks whether to erase the tablet. Erase on a first install. Leave the data in place when you are updating and want to keep the saved Wi-Fi network, the paired heart-rate sensor, and the stroke and display settings. Maps and session logs sit on the microSD card and are left alone either way.

Build it yourself

PlatformIO with the pioarduino platform 55.03.312-1 (Arduino core 3.3.12, ESP-IDF 5.5) and the m5stack-tab5-p4 board. tab5 targets the pre-rev3 ESP32-P4 silicon. tab5x keeps that board and links the rev3 libraries for chip revision 300 and above. The camera library (ESP_Video) needs Arduino core 3.3.11 or later.

$env:PYTHONIOENCODING='utf-8'; $env:PYTHONUTF8='1'   # esptool prints non-cp1252 characters
python -m platformio run -e tab5 -t upload --upload-port COM10

Environments:

  • tab5 is the real firmware for the original Tab5 (chip revision below 300). This is the build on the install page that has been used.
  • tab5x is the same firmware for chip revision 300 and above. It has not been run on hardware. The install page offers it as the experimental button.
  • tab5_sim generates synthetic rowing (20 → 32 → 20 spm over 2 minutes, device tilted 35 degrees) and a synthetic GPS track, so the whole pipeline can be tested at a desk. The top bar shows a SIM badge. It is not on the install page.

Windows notes:

  • platformio.ini sets core_dir = C:/pio because the ESP32 Arduino libraries nest deeper than Windows' 260-character path limit. Delete that line if long paths are enabled or you build on Linux/macOS.

Releasing

The install page is built and deployed by .github/workflows/release.yml, which runs on a v* tag or by hand (gh workflow run release.yml --ref main). It builds all three images, stamps the manifests, attaches the images to the GitHub release and deploys the site.

Both the tag and the site need the same build, and the GitHub Pages environment only accepts deployments from refs it allows: main and v* tags. If that policy is ever narrowed to main alone, the tag run builds the release but its deploy job is refused before it starts, and the site silently stays on the old build. A tagged release and a manual run from main both have to be done when that happens. Check the version in manifest-sticks3.json: it reads dev-<commit> for a manual run, or the version number for a tag, so a dev- value on a release means the site is not showing that release.

The workflow sets PLATFORMIO_CORE_DIR instead of editing platformio.ini. Editing that tracked file would leave the checkout dirty, and stick/version.py would then report the build as <commit>+ (built from uncommitted changes) even on a clean build.

Using it

The right-most bottom button cycles seven screens, eight once an oar sensor is paired. Maps is opened with MAPS on the Map screen between sessions (Wi-Fi is only used there). GPS diagnostics opens from the GPS status in the centre of the top bar, or from OPEN on Settings → Sensors. TARGETS and SEGMENTS on the map open those lists. BACK returns to the screen you came from. Maps, GPS diagnostics, the target list, the segment list and the oar seat list are not part of the cycle.

Screen Content
Main eight metric tiles you can rearrange; optional camera or map picture-in-picture
Map offline waterway map with your position, heading, track, targets and segments
Efficiency metres per stroke against rate, efficiency score, rec:drive / check / bounce, coaching hint
Stroke one stroke split into catch, drive, finish, run and approach, against acceleration and GPS speed, with one coaching hint
Crew experimental: oar angle and catch / finish timing of every seat against the stroke seat (only with oar sensors paired)
Plot last 6 s of surge acceleration with catch, finish and threshold; IMU diagnostics
Settings STROKE, DISPLAY, SENSORS and WIFI tabs
Sessions recordings on the card: review, rename, delete
Maps download a library water, draw an area, or manage maps on the card

Buttons and sessions

Bottom buttons: START starts a session, LAP splits a lap, hold STOP (~0.8 s) ends it, hold RESET clears it (only while stopped). The fourth button is PIP on Main, map orientation on Map, and hold CLEAR on Efficiency. The fifth button is two arrows: tap the left one for the previous screen and the right one for the next screen, hold either to go back to Main (the metrics screen). Screens outside the cycle show BACK there instead.

Overview menu. Swipe down from the top bar (about 2 cm) to open it. The top half has a tile for each screen of the cycle (Crew only with an oar sensor paired); tap one to go there. The bottom half has quick settings: Theme (day / night), Brightness (- and +), Heart rate and Shelly button (PAIR, or FORGET once paired) and Restart and Power off (tap twice, the second tap within a few seconds confirms, as in Settings). Close it by swiping up, tapping the top bar, an empty spot or CLOSE.

Stroke rate and split run before START. Distance, time, averages, the GPS track and logging run only during a session. Without a card the session still runs on screen (RUNNING (no SD)); the Plot screen says it is not recording.

A LAP press freezes the previous piece in a banner for a few seconds (time, distance, average split and rate, and average heart rate if you have a sensor). Laps are stored in _laps.csv and become laps in the TCX export.

Top bar

  • Left: READY, REC S#### while recording, STOPPED, or RUNNING (no SD).
  • Centre: GPS (not connected / GPS on, searching until it sees satellites, then searching N sats / GPS n Hz n sats HDOP … once it has a fix), a lap banner, or a short hint (for example after pairing). Tap this status to open GPS diagnostics. Settings → Sensors has the same OPEN button.
  • Right: heart-rate state (HR, HR..., NO HR), WIFI / WIFI... on the Maps screen, SIM on a simulation build, local clock, battery (BAT n%, or USB when the Tab5 is on USB power with no pack attached).

Dates and times on screen are local (cfg::TIMEZONE, Amsterdam by default). Log files are UTC. The battery-backed clock is set from internet time whenever Wi-Fi is connected and from the GPS once it has a fix, and keeps time while the Tab5 is off.

GPS

Tap the centre of the top bar, or OPEN on the GPS row in Settings → Sensors. The page is the same tile layout as the main screen.

Tile Shows
GPS FIX, SEARCHING, SCANNING or NO LINK. The corner is the Grove pin and baud
SATELLITES satellites used
HDOP horizontal accuracy. A fix needs HDOP at or below 4, and at least 4 satellites
SPEED m/s, once there is a fix
COURSE degrees
TIME GPS time of day, UTC
SIGNAL update rate. The corner says bad if checksums are failing
POSITION last accepted latitude and longitude

Indoors the module can be powered and talking (GPS on, searching, 0 satellites, HDOP 25.5) while the fix LED stays dark. That LED blinks only once the receiver has a lock. Put the unit by a window or outside; a fix needs a clear view of the sky.

Main screen

Eight tiles. Tap the right half of a tile for the next metric, the left half for the previous; the layout is remembered. The same eight slots are used in every layout, so the four big Main tiles are the same four as the strip above the Map and full-width PIP. Duplicates are allowed.

Default layout: split, rate, distance, time on top; dist/stroke, avg split, heart rate, rec:drive below.

Tile Unit Notes
SPLIT /500m GPS speed over the last 3 strokes; live before START
RATE spm IMU, average of the last 3 strokes; live before START
DISTANCE m this session
TIME this session
DIST/STROKE m (m* with fusion on) last stroke
AVG SPLIT /500m this session
AVG RATE spm this session
STROKES this session
HEART RATE bpm orange -- while there is no reading
AVG HR bpm this session
REC:DRIVE SLOWER / GOOD / QUICKER recovery ÷ drive, see below
SPEED m/s GPS speed over ground
DTT target or segment name metres to the selected target. With a segment this is DTS (to the start line) until the boat crosses it, then DTF (still left along the points). -- until one is selected and a position is known
TTT target or segment name that distance at the current speed (TTS / TTF for a segment). -- when nearly stopped
FINISH target or segment name that distance at the session average split. Before a segment's start line the label is START. -- until the session has an average
STROKE drive / recovery s the stroke analysis graph of the Stroke screen: acceleration with the phase bands, and in a big tile the boat speed and a time scale below it. Small tiles show the acceleration only
OARS seats online the oar sensors: the oar angles live, and per seat how late the catch and finish are compared with the stroke seat, plus the arc. The header has how far apart the crew is. A small red or orange dot on a seat is a low stick battery. Small tiles show a dot per seat on a line for the catch and one for the finish. Shows "No oar sensors paired" without sticks

The last two are pictures and fit best in the big tiles. They are at the end of the list, so tap the left half of the first tile (SPLIT) to reach OARS, and again for STROKE.

Stroke and oars tiles

PIP cycles the picture-in-picture pane through OFF, CAMERA and MAP. Tap the pane (not a metric tile) to switch between picture-in-picture (pane top left, first two tiles big beside it) and full width (first four tiles in a strip above it).

  • CAMERA shows the built-in camera, which looks past the rower towards the bow. It runs only while shown, at about 20 fps, and stops on the other screens. The image is mirrored by default, like a rear-view mirror; turn that off in Settings. Flip display also flips the image so it stays upright.
  • MAP shows the same offline waterway map as the Map screen. The PIP map always follows the boat; pan and locate are for the full map.

Map in picture-in-picture

Shelly BLU button (remote)

A Shelly BLU Button Tough 1 ZB (or any Shelly BLU Button) works as a remote you can reach while rowing. It never connects: the Tab5 only listens to its Bluetooth broadcasts (BTHome), so there is no pairing in the Bluetooth sense and it works next to the heart rate sensor. In the Shelly app, leave the button in its default mode with encryption off; encrypted packets are ignored.

Register it in Settings, DISPLAY tab: tap PAIR on the Shelly button row and press the button once within 15 seconds. FORGET removes it.

Click Action
Single Next screen (BACK on screens outside the cycle)
Double Previous screen
Triple Picture-in-picture: off, camera, map (goes to the main screen first)
Long press (release after about a second) Start a session, or stop it when one is running
Keep holding (about 4 seconds, no release) Reset a stopped session, like the HOLD: RESET button
Double click, then hold Main screen
Triple click, then hold Stroke screen

The serial monitor logs every event ([remote] ...). Do not click five times quickly: that puts the button into Zigbee pairing mode. Over serial, 1 to 7 simulate single, double, triple, long, double long, triple long and hold.

Heart rate

Any Bluetooth heart rate sensor works: a chest strap (Polar H10, Garmin HRM, Wahoo TICKR, ...) or a Garmin watch with Broadcast Heart Rate switched on (controls menu, or "broadcast during activity" in the sensor settings), so you can keep recording on the watch too.

In Settings, tap PAIR on the heart rate row while the sensor is on and close by; the strongest one in range is saved. The Tab5 reconnects to it by itself at every start and whenever it drops out. FORGET removes it, after which you can pair another. A hint at the top confirms the name, or that none was found.

Heart rate is a tile you can put anywhere (it starts in the bottom row). The top bar shows HR, HR... (connecting) or NO HR. The lap banner and session review add average and maximum heart rate.

A chest strap reads much more reliably than a watch while rowing: grip tension and wrist flexion make optical wrist readings lag or drop out at high rates.

Map screen

The Map screen draws an offline vector map of the waterways around you, built from OpenStreetMap data (see Offline maps). Water areas and canals are blue, bridges grey, locks and clubs red, weirs brown, piers grey. Your boat is the yellow triangle; the current session's track trails behind it in orange. Night theme uses a dark map (dark land, deeper water, light labels) so it does not glare; day theme is the paper map. The scale bar is bottom-left and the OpenStreetMap credit bottom-right. A red north arrow shows unless north is already up.

  • The HEAD UP / BOW UP / NORTH UP control cycles what is at the top of the map: the direction the rower looks (stern), the direction of travel (bow), or north. During a session it is an icon the same size as the zoom buttons (boat head-up, boat bow-up, or a compass for north-up); otherwise it is the fourth button under the map.
  • The + / − buttons bottom-right zoom in and out (100 m to 3.2 km across the view). During a session they are double size so they are easier to hit.
  • Drag the map to look ahead. A locate button appears to the left of − while the map is not following the boat; tap it to centre back on your position. Leaving the Map screen, leaving full-width PIP, or tapping locate resumes follow. Opening the target or segment list does not.
  • Hold a point on the map to drop a target there. On a named map it is saved as Map name - T1; otherwise just T1. It is selected immediately and drawn with a line from the boat. TARGETS opens the list: tap a row to select it (tap again to clear), RENAME changes the name, DELETE asks for a second tap before it removes it. The DTT, TTT and FINISH tiles follow the selected target.
  • SEGMENTS joins points into a course. NEW opens the map: tap to drop each point and it is connected to the one before. The first is the start, the last is the finish, and any in between are via points. Tap an existing target to use that one. Drag a point to move it. UNDO removes the last point, SAVE keeps the course; leaving the map discards the new points. On a named map the segment is saved as Map name - S1. The distance is the path along those points, not the straight line from start to finish. Within 100 m of a start, that segment's name appears on the map. Tap it to select the segment: the course is drawn and the distance tiles count down to the start line (DTS). Selecting a segment draws that path and its name on the map, and a start line through the start pin, square to the first leg and 40 m to each side. The points stay put while you look. EDIT on the map arms them: drag a point to reposition it (a point shared with another segment moves there too). Before the boat crosses the start line the distance tiles count down to it (DTS). Afterwards they follow what is left along the points (DTF). A finish line crosses the last pin, square to the last leg, the same 40 m to each side, drawn in red. Crossing the start line in the direction of the course, with the boat actually moving, starts the piece. Crossing the finish line the same way stops it and shows the time, distance, split, rate, strokes and heart rate. DONE closes that. The piece is saved as a race session named after the segment. In the list those actions are large icons, the same size as on Settings: a course to EDIT which targets are included and their order, two pages to COPY the same course or the points in opposite order, a pencil to RENAME, and a trash can for DELETE, which asks for a second tap before it removes the segment. Deleting a target drops it from every segment.

The map follows your GPS fix and automatically switches to whichever uploaded map file covers your position (up to 24 .rmap files on the card). Between sessions, MAPS on the map opens the download screen. ON CARD there, tap a map to show that one instead: it stays on screen, centred, so you can drop targets and build segments on it. The locate button returns to following the boat, and to whichever map covers your position.

Map screen

Rhythm and efficiency

REC:DRIVE is recovery time divided by drive time, averaged over 5 strokes. The target follows the stroke rate: about 2.5 at 20 spm, falling to about 1.3 at 34 spm (a long, calm recovery at low rates; at race pace the recovery has to shrink). Within 15% of the target the tile is green with GOOD; below it, orange SLOWER means you are rushing the slide; above it, QUICKER means the recovery drags. Red means more than 30% off. If your coach wants a different rhythm, shift the whole target up or down in Settings (−0.8 to +0.8).

The Efficiency screen compares each stroke with your own best in this session at the same rate:

  • The chart plots metres per stroke against stroke rate. The blue line is your best (3-stroke average, so a single GPS jump does not count), the big dot is now. The thin curves are lines of equal split: getting the same split at a lower rate means longer strokes, so aim to push your best line up and right.
  • EFFICIENCY is your current distance per stroke as a percentage of that best (it needs about 5 strokes at a rate before it scores).
  • The gauges show recovery:drive against its target band, and check and bounce against your usual values in this session (lower is better).
  • The line above the buttons gives one hint, in order of priority: rhythm, then a rough slide (check), then stroke length.

Wind and current change distance per stroke, so the best line is per session: it clears when you start a new session, and hold CLEAR clears it after you turn into the wind. EN or NL at the top right of the panel switches the coaching text on this screen and on Stroke. It stays until you tap it again.

Efficiency screen Efficiency screen in Dutch

Stroke screen

The Stroke screen splits the stroke you are rowing into five phases and compares the last few strokes with your own best at the same rate.

The chart is one stroke, from just before the catch to the next one. The top line is the hull acceleration, averaged over the last five strokes, with your reference stroke drawn behind it. The bottom line is the speed through the stroke, built from that acceleration and set to the GPS speed of the stroke; the GPS speed itself is the dots, so the two can be read against each other. The receiver reports speed late, from 0.1 to 0.6 s depending on the outing, so each dot is drawn that much earlier than it arrived; the last part of the stroke has no dots yet. The device measures the delay while you row (see below) and starts at 0.35 s until it has. (The stroke viewer on the PC measures it from the whole recording and follows it over the outing, see tools\gps_lag.py; the line above the stroke list gives it.) A green line marks the catch and a cyan line the finish, as on the Plot screen.

The shaded bands are the phases:

  • Catch. The dip as the blade goes in: how long it lasts, how deep it is, and how much speed it costs from the catch on.
  • Drive. The push: the speed it adds, and whether the peak comes early or late.
  • Finish. The release: how fast the push dies away, and any dip as the blade comes out.
  • Run. The glide: how evenly the boat runs (the scatter of the acceleration around a straight line, lower is steadier), and when the speed peaks.
  • Approach. The run-in to the next catch: how long before the catch the boat starts to slow, and the speed that costs. The chart starts 0.4 s before the catch, and the slowing there is drawn in the approach colour, because it belongs to the stroke before.

With a crew, the catch also counts its notches: separate dips inside the catch, where the curve comes back up by 15% of the depth before going down again. One is a clean catch. Ripple on the way down does not count.

The line above the buttons gives the one most useful hint. In order: catch together, dip later, a quicker catch, push harder, build the drive earlier or hold it through, then a cleaner release. With nothing to correct it says the stroke matches your reference.

CREW sets the boat to 1, 2, 4 or 8. With one rower a wide catch is worded as your own entry, because a single sensor on the hull cannot tell a slow blade from rowers out of time. With more than one it is worded as catching and finishing together: it can say the crew is not together, not which seat. Hold the button to clear the reference, as on Efficiency.

The reference is this session only. A stroke counts as one of your best when its distance per stroke is within 5% of your best at that rate on the Efficiency screen; until then the comparison is your usual stroke at that rate. It clears when a new session starts.

EN or NL at the top right of the panel is the same switch as on Efficiency. Dutch uses the words a crew hears on the water: inpik, haal, uitpik, oprijden. The screen font has no accents. Another language is a column in src/i18n.cpp.

Stroke screen Stroke screen in Dutch

Plot screen

The last 6 seconds of forward acceleration (surge), with the adaptive catch threshold in red, a green line at each catch and a cyan tick at each finish. Between strokes the red line drops for the short window in which a missed catch can still be filled in. Use it to see whether the detector is catching real strokes or bouncing on chop.

Two rows under the chart show IMU sample rate and overruns, the learned axis and sign, RMS and threshold, skew, live rate, stroke count, check and bounce, GPS speed, fused speed (or (off)), and log drops. While a session records it says REC S#### and raw IMU 100 Hz if raw logging is on; without a card it warns that nothing is being written.

Plot screen

Oar sensors (experimental)

One M5Stack StickS3 on the oar of each rower shows how the crew moves, seat by seat. Each stick works out its own oar angle and strokes from its IMU and broadcasts them as Bluetooth advertisements. Nothing connects, so the sticks never slow each other down and a stick can drop out and come back. The Tab5 listens with the scan it already runs for the heart rate sensor and the Shelly button. This is a first version: expect to tune it on the water.

What you see on the Crew screen (between Stroke and Plot, only with at least one stick paired):

  • Oar fan on the left: one line per seat, at the angle of its oar. The boat runs top (bow) to bottom (stern); an oar square to the boat points right and swings down when the angle is towards the stern.
  • Table, stroke seat on top: catch and finish offset in ms against the stroke seat (bar to the right = later than the stroke seat, left = earlier; green within 25 ms, orange within 50 ms, red beyond), arc in degrees, and drive and recovery time in seconds. All numbers are the average of the last five strokes.
  • Header: how far apart the crew is, latest minus earliest seat, for the catch and the finish.
  • Hint row: the seat that is furthest off, or that the crew is together.
  • SEATS opens the seat list.

The reference is the highest numbered seat that is online and has strokes, the stroke seat in a crew boat (seat 1 is the bow). If that stick drops out, the next seat becomes the reference.

What "catch" and "finish" mean here. They are the turning points of the oar at the two ends of its arc, not the blade entering and leaving the water. Every stick measures them the same way, so seats compare fairly with each other, but the numbers will not match what you see at the blade. The catch is the turn that is followed by the shorter phase (the drive is shorter than the recovery).

The blade. The stick also follows the oar turning about its own shaft and the tilt of the shaft. Square is learnt from the middle of every drive and feathered from the middle of the recovery, so the mounting does not matter. Per stroke it sends how far the blade feathered, when it was half way flat after the finish and half way square again before the catch, and the tilt of the shaft (positive with the blade end up) in the middle of the drive and of the recovery. The difference between those two tilts, how far the blade travels up and down, is the reliable number. The level itself is only as good as the stick's sense of "up", which the swing and the boat's surge still pull by a few degrees. Sticks with older firmware keep working; their rows simply have no blade figures.

Mounting. Fasten the stick to the oar shaft, any position and direction, with the screen where the rower can read it. Fix it so it cannot rotate on the shaft. The same stick must stay on the same oar.

Zeroing. A stick zeroes itself after about 15 to 20 strokes. The oar turns about a pin that is fixed to the boat, so across the boat the stick only feels gravity and the oar's own swing about that pin; the boat's surge runs along it. The stick keeps a running fit (about the last 40 s) of the one level direction for which that holds, and with it where on the oar it sits. Once that direction comes out the same (within 2°) four strokes running, it becomes 0 degrees, and from then on it follows slowly. The stick shows auto zero and the Crew screen auto zero for that seat. In the simulation it lands within about 6° of square, with full boat surge; less surge (a slow paddle) makes it less sure. For an exact zero, hold the front button (A) for two seconds with the oar square to the boat (blade at right angles): the screen flashes and that position becomes 0 degrees, and a zero by hand is kept over the auto zero. Until a stick is zeroed either way the angle is relative to where it started, and the stick shows not zeroed. Knowing where it sits on the oar also lets the stick take the oar's swing out of its accelerometer, which keeps its sense of "up" from drifting over a long session. The B button switches between the angle and a large version of its id. The stick works out which way is the bow: the catch always has the larger angle.

Pairing. Settings → SENSORS → Oar sensors → OPEN, then PAIR on the seat (1 is the bow) and press the front button of the stick. The seat is bound to that stick for good (the Tab5 remembers it); FORGET frees it. Pair the sticks one at a time so you know which is which; the 4-character id (hexadecimal, so it can contain letters, e.g. 4BE3) on the stick is the one in the seat list. The row shows online seats against paired seats and the signal level.

Log. While a session records, every stroke of every seat adds a row to S####_oars.csv:

Column Meaning
t_s session clock when the row was written
seat, stick seat number (1 = bow) and the stick's id
catch_t_s, finish_t_s when this stick's catch and finish were, on the same clock as the other files
catch_offset_ms, finish_offset_ms against the reference seat, positive = later (empty when no reference stroke matched)
catch_deg, finish_deg, arc_deg oar angle at the catch and finish, and the difference
drive_s, recovery_s phase times of this stroke on this oar
rssi, battery_pct signal and the stick's battery
feather_deg how far the blade turned from square in the recovery before this catch
feather_ms, square_ms blade half way flat this long after the previous finish, and half way square again this long before this catch (negative: after it)
drive_tilt_deg, recovery_tilt_deg the shaft's tilt in the middle of this drive and of the recovery before it, positive with the blade end up

The blade columns are empty for sticks with older firmware, and when the stick could not tell (no feathering, or not enough strokes yet to know which end is the blade).

Every packet of every stick, about 20 a second, also adds a row to S####_oarlive.csv: t_s on the session clock, seat, and the oar's angle_deg, feather_deg (0 square, about 90 flat) and tilt_deg at that moment. That is the whole swing of the oar, not only its turning points.

Battery. The StickS3 has a 250 mAh cell. To make it last, the stick runs its CPU at 80 MHz and its screen sleeps: it is on for a minute after the start and for 30 s after every button press (A or B wakes it; the press that wakes it does nothing else). The Tab5 shows a stick's battery in the seat list, and on the Crew screen once it is at 25% or below. The percentage is the median voltage of the last 10 s on a Li-ion discharge curve, which tops out at 4.15 V: that is where a fully charged cell of this size actually rests, so a full stick reads 100%. On USB the level is the voltage minus the lift of the charging current, and that lift is tapered away towards full (the charger cuts the current as the cell fills), so a stick that has finished charging reads 100% rather than looking like it still has to charge further. It only goes down while the stick is on battery and shows a + while USB is plugged in, then it is an estimate, because the charger lifts the voltage. The stick also switches off the 5 V boost converter that M5Unified turns on by default (Grove, Hat and IR power, none of which is used): left on, it drained the cell and fought the USB supply, so the stick barely charged and its voltage reading jumped by 100 mV. A cell that is nearly empty reads a few percent below 3.5 V.

Charge mode. The stick's charger has a fixed current that the firmware cannot change, and what the stick does meanwhile (20 radio packets a second, the IMU at 100 Hz) comes out of it. So a stick that sits still on USB for a minute stops advertising and sleeps its screen; moving it, a button press or unplugging USB wakes it. It then does not show on the Crew screen while it charges. Measured on one stick, between 3.8 and 4.0 V, the voltage rose about 10% faster in charge mode at best, which is within the noise of the test: the charger itself sets the charge time, a stick takes roughly an hour and a half from 3.7 to 4.0 V.

Build. The page you get with the big side button (the big ID) has the git commit and build time of the firmware at the bottom, for example 6dc772d 30 Nov 18:32; a + after the commit means it was built with uncommitted changes. It is also in the stick's boot line on USB serial.

For a discharge test the stick logs its battery voltage and level every minute in flash (the last 16 hours, screen, USB and charge-mode state included, c for charge mode). Plug it in over USB and send h on the serial port (115200 baud) to print it, x to clear it, s to switch its screen, c to switch charge mode and n to turn the automatic charge mode off or on (for comparing charging speed, until the next start).

Flashing the stick. Easiest from the install page in Chrome or Edge: press Oar sensor (StickS3), choose the port, repeat for every stick.

Building the stick firmware. The stick is its own PlatformIO project in stick/; src/oar_protocol.h is shared with the Tab5 firmware:

cd stick
python -m platformio run -e sticks3 -t upload

There is no StickS3 board file yet, so the project builds as an ESP32-S3 dev board with the M5Unified library, and the stick runs NimBLE-Arduino.

Trying it without sticks. The tab5_sim build creates four simulated seats with slightly different timing and arc, so the Crew screen and the log can be seen on the bench. tools/oar_sim.py is a Python copy of the stick's tracker with a rowing simulation (--selftest checks catch and finish timing, bow and stroke side, seat offsets, and the blade: feather angle, when it feathers and squares, and the shaft's tilt; every case also rows once without a zero by hand and checks that the auto zero lands within 10° by stroke 30; --plot draws it). The simulated stick sits off the pin on the oar and the boat surges and sways. Change the tracker in stick/src/oar_tracker.h and the Python copy together.

Known limits. The angle drifts a little with the gyro and is pulled back towards the middle of the arc every stroke, so very short or very irregular strokes read less well. A stick that was knocked loose follows its new place through the auto zero, unless it was zeroed by hand; then zero again. The auto zero has only been tried in simulation so far, not yet on the water. How many packets reach the Tab5 while the heart rate sensor and the Shelly button are also in range has not been measured on the water yet.

Settings

Five tabs. Values are kept in flash.

STROKE

  • Catch threshold factor (× RMS), default 1.8. Lower if strokes are missed.
  • Catch threshold floor (g), default 0.12. A minimum even when the boat is quiet.
  • Threshold from last 5 catch depths: follow your recent catch size instead of a fixed multiple of RMS. Helps in rough water (fewer double counts).
  • Rec:drive target shift. Added to the rate-based target (2.5 at 20 spm).

DISPLAY

  • Theme: day (light, paper map) or night (dark UI and dark map). Brightness shares its row.
  • Rotate screen 180, for a case mounted the other way up (camera image follows). Camera mirror image (on by default) shares its row.
  • Language: CHANGE switches between English and Dutch, the same as EN / NL on the Efficiency and Stroke screens.
  • Shelly BLU button: PAIR / FORGET, see above.

SENSORS

  • Heart rate sensor: PAIR / FORGET, see above.
  • GPS+IMU fusion for distance/stroke: complementary filter (high-passed IMU speed + low-passed GPS). When on, the dist/stroke tile shows m* instead of m.
  • Raw IMU logging at 100 Hz, on by default. About 13 MB per hour; needed for analyse.py / replay.py.
  • GPS: OPEN shows the same tiles as the GPS page. The row shows SEARCHING, FIX, SCANNING or NO LINK.
  • Oar sensors (StickS3, experimental): OPEN shows the seat list, see Oar sensors.

WIFI

The saved network, or No network saved. FORGET drops it. Below that, the access points in range (2.4 GHz), strongest first, with signal level and open or lock. Tap a locked network and type the password on the on-screen keyboard (SYM for symbols). Tap the saved network to join it again without retyping. RESCAN looks again. The top bar shows WIFI once it is connected. Wi-Fi still turns off when you leave Settings, except while the Maps screen is open.

SYSTEM

RESTART and POWER OFF sit on the top row. Tap one and it turns red and reads CONFIRM for four seconds; tap it again to go ahead. A running session is stopped and its files are closed on the card first, so the recording so far is kept. Power off sends the board's power-off pulse. If USB-C power is plugged in, the board may keep its supply; it then goes to deep sleep with the screen dark and wakes on a reset.

Below that, one line each for:

  • CPU load: how busy each of the two cores was over the last second, and the clock. Core 0 runs the IMU, GPS and logger tasks; the screen and the main loop run on core 1.
  • Internal RAM: free now, the largest block that can still be allocated (a low value next to plenty of free memory means the heap is fragmented), and the lowest free amount since the tablet started. Bluetooth and every task live here.
  • PSRAM: free of total. Screen buffers, maps and tracks.
  • SD card present or not, how many log lines were dropped, and the build: the git short commit and the date and time of the build (for example d538277 6 Apr 09:12), SIM on a simulation build, and the time since the tablet started. A + after the commit means it was built with local changes that were not committed.

Settings screen

Sessions screen

Lists every session on the card with its number, start date and time, duration and size. A race finished on a segment is named after it, for example Tromp - S2 race. The header reminds you of python tools\fetch.py COM10 to copy them off.

  • The pencil gives a session a name such as Bosbaan intervals (on-screen keyboard). Its files become S0022_Bosbaan_intervals_imu.csv and so on, and fetch.py and analyse.py understand both forms.
  • Tap a session's name to review it: the GPS track on the offline map, coloured from red (slow) to green (fast) with a start dot and a finish square, plus distance, time, average split, fastest 500 m, average rate, strokes, distance per stroke, top speed, average and maximum heart rate, and graphs of split, rate and heart rate over the session. Drag the map to pan, +/− to zoom, tap the map to fit the whole track again; BACK returns to the list. The track is drawn without a map when no map on the card covers it.
  • A session without a GPS fix still shows what was recorded: time, average rate, strokes, laps, average and maximum heart rate, and the rate and heart rate graphs.
  • The trash can, tapped twice (it turns red after the first tap), removes all files of a session.

Sessions screen Session review

Session logs

Each session writes /rowing/S####_*.csv on the SD card:

File One row per Contents
_strokes.csv stroke rate, drive/recovery time, one-stroke split (split_s), the 3-stroke split shown on screen (split3_s), speed, distance per stroke, distance, catch depth, check, bounce, position, catch time (t_s), and rescued when the normal threshold missed it
_seconds.csv second UTC, position, speed, the 3-stroke split, distance, rate, HDOP, satellites, battery, heart rate (empty without a sensor), free internal heap (heap_free_b), largest free internal block (heap_largest_b), heart rate state (hr_state) and the number of oar sensors heard (oars_online)
_laps.csv lap lap time, distance, average split and rate, strokes, average and maximum heart rate
_oars.csv stroke of an oar sensor catch and finish time, offset against the stroke seat, oar angles, drive and recovery, and the blade's feathering and tilt (only with oar sensors paired, see Oar sensors)
_oarlive.csv packet of an oar sensor (about 20 a second per stick) the oar's angle, feather and tilt at that moment
_info.csv setting build, start time, and the detector settings in use, so a session can be replayed exactly
_imu.csv IMU sample (100 Hz) raw accelerometer and gyro, filtered and unfiltered surge, vertical, threshold, catch / finish flags, GPS speed, and the boat's motion: sway_lin_g (sideways acceleration),
oll_deg and yaw_deg (only with raw logging on)

t_s is the same clock in every file, so strokes and IMU samples line up. _info.csv records where the session time came from (time_source: NTP, GPS or RTC).

Exporting to Strava or Garmin Connect

The easy way: open the session on the analysis site and press Download GPX. The command line below does the same for many sessions at once.

Fetch the session (or copy it with a card reader), then write GPX and TCX files next to it:

python tools\fetch.py COM10 latest
python tools\export.py 21                    # recordings\S0021.gpx and S0021.tcx
python tools\export.py all --format gpx --out exports
  • GPX: track, time, speed, stroke rate (as cadence) and heart rate, marked as rowing. Strava recognises the type; upload it at strava.com/upload/select.
  • TCX: also distance and one lap per LAP press. TCX has no rowing sport, so pick rowing after uploading.

Seconds without a GPS fix are left out of the GPX track.

Recording strokes for detector tuning

  1. Check Raw IMU logging is ON in Settings (it is by default) and press START.

  2. The Plot screen says REC S#### while it records.

  3. Row a mix: steady state, rate changes, starts, easy paddling, rough water, stopping and restarting. Row at least a few minutes so the detector has settled, and keep the Tab5 firmly mounted: tilting it mixes gravity into the signal.

  4. Hold STOP when done. Name the session on the Sessions screen if you like. Then copy the files with a card reader (/rowing/ on the card), or over USB:

    python tools\fetch.py COM10                 # list the sessions on the card
    python tools\fetch.py COM10 latest          # download the newest into recordings\
    python tools\fetch.py COM10 7 9             # or specific sessions; 'all' for everything

    About 550 KB/s, so an hour of rowing downloads in under half a minute. Files already in recordings\ are skipped. Stop the session first: downloads are refused while it is recording.

  5. Analyse a session (needs pip install numpy matplotlib):

    python tools\analyse.py recordings\S0007
    python tools\analyse.py recordings\S0007 --replay --k 2.0 --floor 0.10

    This writes recordings\S0007_analysis\ with a summary.txt, an overview (rate, stroke interval and GPS speed over the session), all strokes overlaid at the catch with the average stroke shape per rate band, the detector's view of the whole session one minute per page, and a close-up around every suspicious stroke (an interval far from its neighbours: probably a missed catch or a double count). The summary also compares the stroke count with how many strokes the surge signal's own rhythm implies, and reports how far the split jumps from stroke to stroke. --replay also runs the offline detector from replay.py, with the session's settings or the ones you give, and shows its catches as orange triangles, so you can see whether other settings fix a problem.

    To inspect a stroke the way the Stroke screen does, and to see the marks the coaching tip is read from:

    python tools\stroke_view.py

    Open http://127.0.0.1:8765/. Sessions in recordings\ are listed. Open uploads an _imu.csv, with the _seconds.csv, _laps.csv and _info.csv from the same session when you have them. The upload is kept under recordings\uploads\, so it does not replace a recording already there. Tab5 reads a recording straight off the tablet over USB, in Chrome or Edge, and then opens it, with the same session files. The server cannot see the tablet, so the browser does the reading. Stop the session on the tablet first: connecting can restart it, and a download is refused while it is recording. The list shows the newest session first, with the date it was recorded, and the port is released when the window closes. A recording over 80 MB is too big for the hosted server. The strokes are found again with the current detector, so a catch the device missed is filled in from the rhythm and marked as such. Forward is settled from GPS over the whole recording, so the first strokes are drawn the right way up even where the device had not worked out the direction yet. Each stroke gets the same hint and gauges as the device. View → Last 5 at this rate is what the device shows; This stroke reads one stroke, which carries more ripple and so draws more tips. Below the speed a third chart shows the roll, yaw or sideways swing of the stroke (Boat motion), with the usual one at that rate in grey. The list follows the view. Chart → By rate averages every stroke at one rate and draws the average of the best strokes at that rate on top: the fifth that went furthest per stroke, at least three. The split of a rate is its time over its distance. Tick the rates in the list to compare only those. The rate marked "hold" is the quickest pace in that outing that was actually kept up, with a stroke that stays clean. A faster split that only lasted a few strokes is named beside it. When the outing was rowed in spells of hard and light strokes, no rate is marked: the rates then differ because the effort did, and the spells are listed instead, with how many there were, how long, and at what rate and split. The viewer always lists one demo recording, the BBR race (S0018), from tools\demo\, so there is something to look at before you load your own. A session you upload under the same name replaces it in the list. The Overview tab (shown when the session has its _seconds.csv) is the device's Session review on the web: the track on a map, coloured from slow (red) to fast (green) with a start dot and a finish square, the distance, time, split, best 500 m, rate, strokes, distance per stroke, top speed and heart rate, the laps, and split, rate and heart rate over the session. Two more graphs show how much the boat rolls and yaws: the rms in degrees over a 15 s window, only while rowing, with the session average among the figures. They measure the boat's movement around its own mean, so a steady list or a steady turn does not show. They need a recording made with the gyro columns and appear a moment after the page, when the strokes have been analysed. Hover a graph and the map shows where you were. A session without GPS shows the figures and graphs without a map. The map is OpenStreetMap, loaded by your browser. Download GPX and Download TCX make a file Strava, Garmin Connect and the like accept (the same as python tools\export.py); Upload to Strava opens Strava's own upload page, where you pick the downloaded file. The GPX is marked as rowing and carries stroke rate and heart rate. Blade in the water is shown on the stroke chart (a bar along the top, a chip and a gauge with the time and its share of the stroke), on the whole-session chart (one bar per stroke in a panel of its own, as wide as the blade was in the water, with the median of nine strokes as a line), and in the Compare table. It is an estimate: the sensor is on the hull and never sees the oar. The blade is taken as in at the bottom of the catch dip and out where the push has died away, the acceleration back to zero after the drive peak (blade_span() in tools/stroke_view.py). Expect it to be a tenth of a second off; use it to compare strokes, rates, sessions and rigging, not to read the last hundredth. The Oars tab (shown when the session has an _oars.csv, tools/oars.py) reads what the sticks on the oars logged, seat by seat. Against the stroke seat (or any seat you pick) it charts how early or late each seat's catch and finish are, with the middle value of nine strokes as the line and every stroke as a dot, the spread of the crew (latest minus earliest seat at each stroke), and each oar's arc, drive time and catch and finish angle. The table gives the same as averages, with the stick's signal and battery. Strokes that cannot be rowing are left out and counted: an arc under 45° or over 130°, an angle beyond 120° (a stick not yet zeroed), a drive outside 0.2 to 4 s, or a stroke more than 5 s outside the strokes the boat sensor found. Where the boat kept rowing but no stick reported for 12 s or more (the Bluetooth dropping out), the charts are shaded and a note gives the times. Above the charts a replay draws the boat from above and from the side, playing the session back stroke by stroke (slowed down, step by step, or from any point you click in a chart). Each oar swings from its measured catch angle to its measured finish angle at the measured times; the blade's depth and height and the rowers' slide are drawn, not measured. Line up arcs puts every seat's arc around the same middle, since each stick's zero differs, and the rig can be set to sweep (stroke seat on port or starboard) or sculling. The Compare tab puts sessions side by side at one stroke rate. Each ticked session is analysed once (/api/rates) and its average stroke per rate is kept in the page, so ticking sessions on and off is instant; reading a recording again under the same name replaces it. A rate counts every stroke within half a stroke per minute of it and needs three. The lines are acceleration and speed against seconds from the catch; hover the chart for the values at that moment. The table gives each figure with its difference against the first ticked session, and marks the best split and distance per stroke. Once you are in a club, the list can be narrowed by club, boat, rower and date, and Same boat as the open session lists every session in that boat, yours and your club mates', to compare crews or days (it is the starting filter when the open session has a boat). A session that names its crew is labelled with the rowers and the day. A note typed under a session (rigging, say) is kept in this browser only and wins over that label. Up to six sessions at once. On the hosted server only two analysed sessions stay in memory, so ticking one that was pushed out analyses it again (a long one takes up to a minute or two); sessions already shown stay in the page until it is reloaded. The Guide tab is for someone who has not seen the data before. It is always there, also with no session loaded (the welcome page has a "How to read your data" button). It explains where the numbers come from (GPS, accelerometer, gyro, heart rate), draws the acceleration and speed of one stroke split into its phases, marks a real stroke from the demo recording with numbers you can point at, and lists for each figure of the Overview and By rate what you can deduce and what it cannot tell you. The real stroke is read from the demo recording once per start of the server (/api/guide) and is not kept in the session cache. Chart → Whole session draws the outing on one timeline: scroll to zoom in until the strokes separate, drag to move along it, and double-click a stroke to open it. On a single stroke, scroll to zoom, drag to move, and click a mark (catch width, drive peak, finish, release, approach) to jump to the part of the curve that mark is measured on. The reference is your best at that rate in the finished session when at least three strokes earned it, otherwise your usual. Crew 1, 2, 4 or 8 changes the catch and finish wording the same way the device does.

    render.yaml runs this same server as a Render web service. Render sets PORT and the process listens on 0.0.0.0. The instance has 512 MB of memory, and an upload has to stay under 80 MB, so a very long raw log needs a larger instance. Analysing a long recording takes the server a minute or more, so it runs in the background: the page shows "Analysing the recording" and asks again every couple of seconds, instead of one request waiting until the host gives up on it.

    Keeping sessions across deploys. What is read in is saved under RECORDINGS_DIR (default recordings, in uploads/). Render's own filesystem is wiped on every deploy and restart, so render.yaml attaches a persistent disk at /var/data and sets RECORDINGS_DIR=/var/data/recordings. A disk needs a paid plan (Starter or up), and a service with a disk runs as one instance with a short pause on each deploy instead of a zero-downtime switch. Plan on roughly 25 sessions of 40 MB per GB. Things to know:

    • Every stored session belongs to the user who read it in, and only that user can open it (see Accounts below). The files are stored with -u<id> added to the name (S0018_BBR_race-u3_imu.csv), so two users who both have an S0018 do not meet.
    • Reading the same file name in again as the same user replaces that session, so after reformatting the card (the tablet starts at S0001 again) read the new sessions before the old name is reused, or delete the old one first.
    • Uploads are refused with a clear message when less than 300 MB would be left on the disk. Remove sessions you no longer need.
    • GET /api/config tells the page whether storage is persistent (a mounted disk, or always when you run it on your own computer). STORAGE_PERSISTENT=0 or 1 overrides the guess. If RECORDINGS_DIR cannot be created the server starts anyway with a local recordings folder and says so in its log.
    • Without a disk (a free instance) it works as before, but uploads are lost on restart and the welcome page says they are not kept.

    Saved analysis. Analysing a long recording takes about 25 seconds on a PC and longer on a small host, and the hosted server keeps only two analysed sessions in memory. So each analysis is also saved in cache/ next to uploads/ and read back in a fraction of a second when you switch to that session again, after a restart, or after a deploy. A saved analysis is only used while it still fits: the recording's files are unchanged and the analysis code (stroke_view.py down to the server part, anatomy.py, replay.py) is the same, otherwise the session is simply analysed again. A rename does not affect it. It takes about 40% of the recording's size on top (a 40 MB session adds roughly 15 MB); it is skipped when the disk is nearly full, goes away with the session, and the Disk tab can clear all of it.

    Disk tab. A tab of the Settings window (the cogwheel at the top right, next to Clubs), which only the site admins see. Shows how full the disk is and lists every stored session with its owner, size (including its saved analysis) and date (plus any loose files in the uploads folder). Rename gives a session a name of your own (empty goes back to the file name) and the ticked ones can be deleted. The site admins are the e-mail addresses in SITE_ADMINS. Everybody else renames and deletes their own sessions with the Rename and Delete buttons in the toolbar.

    Accounts. Signing in is by e-mail: POST /api/auth/request mails a 6-digit code (it works for 10 minutes, five wrong tries throw it away, and the number of codes per address, per visitor and in all is limited), POST /api/auth/verify swaps the right code for a cookie (orc_session, HttpOnly, SameSite=Lax, 60 days of use). Users, codes and who owns which session are in accounts.db (SQLite) next to the recordings, so they live on the same disk; python tools/accounts.py --selftest checks the rules. Every call that reads a session checks that the user may open it and answers 404 when not. The demo recording is open to everybody. Settings on the host:

    Variable What it does
    RESEND_API_KEY API key of Resend, which sends the code over HTTPS (it works on every Render plan; outbound SMTP does not). The sender domain has to be verified there
    MAIL_FROM Sender, default OpenRowCoach <login@openrowcoach.com>
    SITE_ADMINS e-mail addresses (comma separated) that may use the Disk tab
    LEGACY_OWNER_EMAIL sessions stored before there were accounts have no owner and stay hidden; this user gets them (as the owner) the next time they sign in
    AUTH 1 or 0 forces accounts on or off. The default is on when hosted (PORT is set) and off on your own computer, where everything works as it did before. With accounts on and no RESEND_API_KEY on your own computer, the sign-in code is printed in the console instead of mailed

    Clubs, boats and sharing. Anyone signed in can start a club (Settings → Clubs) and becomes its admin. Admins add the club's boats (name and class: 1x, 2x, 2-, 4x, 4-, 4+, 8+), invite members by e-mail (the invitation is taken when that address signs in) or share the 8-character join code, make other members admin, and remove members. The last admin cannot leave while others are in the club; the last member leaving ends it. Members see the boats and each other's names; addresses, invitations and the join code are for admins only. One account can be in up to 10 clubs.

    Any member can add a boat, but only admins rename or archive one.

    The person who reads a recording in says, in the Session details window, which club and boat it was, who rowed (members of that club) and who may see it. It opens after every recording that is read in, and from Details in the toolbar (or the Overview) for a session you already have. In it you can pick the boat or type a new one, start or join a club if you have none yet, and, as an admin, invite a team mate by e-mail (they can be added to the crew once they have signed in):

    Visibility Who sees the session
    Private (default) the owner and the crew
    Club the owner, the crew and every member of that club

    Only the owner changes the details, renames or deletes a session (and a site admin). When someone leaves a club, their sessions in it become private again and lose the club and boat, the crew keeps seeing them. Sharing never reaches other clubs. The session list has Mine and From my clubs filters and shows boat, crew and a private/club tag. The API is GET /api/clubs, POST /api/clubs/{create,join,leave,rotate-code,invite,uninvite,role,remove,boat} and POST /api/session/meta; GET /api/sessions carries club, boat, crew and visibility of each session. python tools/accounts.py --selftest covers the visibility rules for the owner, crew, club mates, other clubs and signed-out visitors.

Serial tools

Open the port with DTR/RTS held low; otherwise opening it resets the ESP32-P4. The scripts in tools/ do this.

Command What it does
N next screen
M open Maps (refused while recording)
C cycle PIP off / camera / map (Main)
V picture-in-picture ↔ full width
H cycle map head-up / bow-up / north-up
+ / - zoom the map
G / X / L / R start / stop / lap / reset
g open GPS diagnostics (N or BACK returns)
t open the target list (N or BACK returns)
s open the segment list (N or BACK returns)
h pair the strongest heart rate sensor in range
S screenshot (RGB565; use screenshot.py)
D list /rowing session files and /map files
B path download a file (fetch.py)
U path size crc upload a file (send_file.py)
W SSID|PASSWORD join Wi-Fi and remember it; W reconnects
T x y / P x y / Z x0 y0 x1 y1 tap / hold / drag
F then Y within 10 s erase the SD card (one FAT32 partition) and restart
K for 10 s, print every change on the inputs of the two PI4IOE5V6408 expanders (Power button diagnostic)
python tools\serial_log.py COM10 60                       # print status every 5 s and every stroke
python tools\serial_log.py COM10 60 log.txt --send "3:G,40:L,70:X"   # start, lap, stop at those seconds
python tools\send.py COM10 N
python tools\send.py COM10 C
python tools\send.py COM10 H
python tools\send.py COM10 M
python tools\send.py COM10 h
python tools\send.py COM10 'T 640 360'
python tools\send.py COM10 'W MyNetwork|MyPassword'       # single quotes in PowerShell
python tools\serial_log.py COM10 5 --send "1:D"
python tools\serial_log.py COM10 40 --send "1:F,2:Y"      # format the card
python tools\fetch.py COM10 latest
python tools\export.py 21
python tools\screenshot.py COM10 shots\main.png           # needs Pillow

Status lines on the serial port report IMU rate and overruns, GPS, heart rate, camera fps, loaded map, track points, heap and PSRAM, uptime and reset reason (rst POWERON(1), EXT(2), SW(3), WDT(7), USB(11) and so on). The boot line and Settings → SYSTEM (Build row, start:) show the same reason.

Offline maps

Maps are vector .rmap files drawn on the device, not raster tiles, so they are small and fast (a 6 × 6 km city area is about 300 KB). On the water no network is needed: the map that contains your GPS position is loaded automatically.

Downloading maps on the Tab5

Tap MAPS on the Map screen (between sessions). Wi-Fi switches on while this screen is open and off again when you leave it. 2.4 GHz only.

  • LIBRARY: well-known rowing waters. Tap the download arrow; for a map already on the card, the circular arrow fetches a fresh copy.

    Netherlands: Bosbaan, Amstel, Willem-Alexander Baan, Kralingse Plas, Delftse Schie, Galgewater / Oude Rijn, Zegerplas, Reeuwijkse Plassen, Vinkeveense Plassen, Spaarne, Vecht, Beatrixkanaal, Paterswoldsemeer, IJssel, Maas. Belgium: Watersportbaan (Gent). Germany: Regattabahn Wedau, Beetzsee. UK: Dorney Lake, Henley Reach, Tideway. Switzerland: Rotsee. Slovenia: Lake Bled.

  • DRAW AREA: an OpenStreetMap background centred on your position (or on a map you already have). Drag to pan, +/− to zoom, tap SELECT AREA and drag a rectangle over the water you row on (up to 8 × 8 km), then DOWNLOAD AREA. Boxes already on the card are shown so you can see coverage.

  • ON CARD: the maps on the SD card with their size. Tap a row to make that map the one on screen. It stays there, centred, until you tap locate on the map, so a fix on another water does not switch it away while you place targets. The one currently shown is marked. A map you drew is named after its centre (Area 52.226 5.072); tap the pencil to give it a proper name with the on-screen keyboard. The file name on the card stays the same. The trash can, tapped twice, removes a map.

A download takes 30–60 s, mostly waiting for the Overpass map server; the header shows progress. The Tab5 then converts the data itself (about 2 s) and shows the new map. Downloads are refused while a session is recording. If the server is busy, try again a minute later.

Map library Drawing an area Maps on the card

Wi-Fi setup. On Settings → WIFI, pick a network from the list. The same setup still works from the Maps screen: the first time, tap WIFI SETUP (later: hold the WIFI button to choose another network). The Tab5 opens its own network TabRowing-XXXX and shows a QR code; scan it with your phone, or join that network and open http://192.168.4.1, then pick your home network (2.4 GHz) and enter its password. The Tab5 remembers it. Tap CANCEL SETUP to leave without changing it. Over USB you can also send python tools\send.py COM10 'W MyNetwork|MyPassword' (single quotes in PowerShell).

Wi-Fi setup

Map data is fetched over plain HTTP from overpass-api.de (that server only accepts TLS 1.3, which the ESP32 TLS stack in this core does not support); the background map uses HTTPS from tile.openstreetmap.org without certificate checks. Only public map data is transferred.

Building maps on a PC

Alternatively build a map with make_map.py (needs requests, osm2geojson, shapely and pillow), then upload it to the card.

pip install requests osm2geojson shapely pillow
python tools\make_map.py --center 52.3245,4.8360 --radius-km 3 --name "Bosbaan" --out maps\bosbaan.rmap
python tools\send_file.py COM10 maps\bosbaan.rmap /map/bosbaan.rmap

make_map.py queries the Overpass API for water, bridges, locks, weirs, piers and rowing clubs, clips and simplifies them, and writes the .rmap plus a .png preview so you can check it before uploading. --bbox south,west,north,east is an alternative to --center / --radius-km. send_file.py streams the file to /map/ on the SD card in small acked chunks and verifies a CRC; the firmware picks up the new map without a reboot. Uploads are refused while a session is recording. Map data is (c) OpenStreetMap contributors, ODbL.

On-water validation against an NK SpeedCoach

  1. Mount the Tab5 next to the SpeedCoach. Check Raw IMU logging is ON in Settings.

  2. Start both at roughly the same time. Row a mix: steady state at 18–22 spm, a few minutes at 24–28, some starts and bursts at 30+, and some easy paddling.

  3. Export the session from NK LiNK Logbook as CSV and copy the SD card files.

  4. Compare per stroke. The time offset between the devices is found automatically:

    python tools\compare_nk.py S0007_strokes.csv nk_export.csv

    It reports bias, mean absolute error and the 95% range for stroke rate, split and distance per stroke, the total distance, and lists strokes whose rate differs by 2 spm or more.

  5. The catch threshold follows the signal by itself (Settings, Stroke, Automatic catch threshold), so a light boat or a seat far from the stroke needs no setting. If strokes are still missed or doubled, replay the raw log; to try the old fixed K and floor, switch the automatic threshold off on the device or add --manual here, and copy the best values to the Settings screen:

    python tools\replay.py S0007_imu.csv --sweep            # grid of K / floor / minima
    python tools\replay.py S0007_imu.csv                   # the automatic threshold, like the device
    python tools\replay.py S0007_imu.csv --manual --k 1.2 --floor 0.08
    python tools\replay.py S0007_imu.csv --plot 60 90       # needs matplotlib
    python tools\replay.py --synthetic 120                  # self-test on simulated rowing
    python tools\replay.py recordings\S0019_imu.csv --rebuild
    python tools\replay.py S0021_imu.csv --rebuild --auto  # a session recorded before the automatic threshold

    --rebuild writes the strokes the current detector finds back into that session, using the threshold settings stored with it (--auto: the automatic threshold instead, which is what a session from before it existed needs when no strokes were found). A catch the original file missed is filled in and marked. The rate on each second and the stroke count on each lap are updated to match. Before the first rebuild the device's own stroke, second and lap files are copied to recordings\original\, and the session's info file gets a strokes_rebuilt line.

    A rebuild, the stroke viewer and --hindsight settle the forward direction from GPS over the whole recording, then run the detector again with it. The device cannot do that: it has to decide as it goes. Without --hindsight, replay.py does what the device does.

    replay.py is a line-by-line port of src/stroke_detector.cpp; keep them in sync when changing the detector.

    How late the GPS speed is in a recording can be measured from the whole recording, without the device's running estimate (replay.py also has a port of that, GpsLagEstimator, which --selftest checks as well):

    python tools\gps_lag.py                                  # every recordings\*_imu.csv
    python tools\gps_lag.py recordings\S0017_imu.csv --blocks   # and the lag per minute
    python tools\gps_lag.py --selftest                       # check the method on a known delay

    In blocks of a minute the logged surge is integrated to speed and cross-correlated with the GPS speed; the lag of the peak is the delay. The table gives the median lag, the spread between blocks, the match (r), the lag over the first and last third of the session, and how often the logged surge had the wrong sign (the lag is still found, from the negative match). The logged surge has the slow gravity estimate taken off, a high-pass that runs a little ahead of the boat, so the GPS speed gets the same filter before the two are compared.

Tuning hints:

  • Missed or doubled strokes: the automatic threshold (on by default) reads how deep your catches are over the last half minute, so a 4, a 2 or a steer seat far from the stroke all work without changing anything. A change in the Settings screen applies at once, mid-session. It needs about ten seconds of rowing before it knows the depth; until then it sits at 0.045 g.
  • With the automatic threshold off, K and the floor are fixed: lower both (0.08 g, K about 1.2) for smooth or shallow catches, raise K for rough water or a big bounce at the finish. K × RMS is what normally sets the bar, so lowering only the floor does nothing until it is below that.
  • Drive and recovery look swapped on the Plot screen during the first strokes without GPS: the forward direction is still being learned from the stroke shape. It settles within a few strokes, and GPS overrides it from about 10 s of rowing with a fix.

How it works

  • Stroke rate: gravity is tracked with a slow average and removed. The remaining acceleration is band-passed (0.1–3 Hz) and projected onto the horizontal axis with the most motion. The catch is the sharp deceleration dip: a catch is the midpoint of where the signal crosses an adaptive threshold on the way down and up again. The threshold is 0.55 × the typical catch depth, never below 0.045 g: the deepest surge is kept per second, the deepest of the last four seconds always holds a catch, and the typical depth is the median of those over the last 30 s. A dip only counts when the surge then climbs at least 0.06 g (or half the threshold) above zero within 0.8 s: that is the drive. A slow stroke has a second, shallower dip halfway through the recovery with no drive after it, which is how a 2-man boat at 18 spm used to be counted at twice the rate. (With the automatic threshold off, the threshold is K × RMS or 0.6 × recent catch depth, and a dip counts at once.) When that misses, a shallower dip still counts if it lands where the last intervals say the next stroke should be: the catch itself between 90% and 135% of that interval, at half the threshold but never below 0.06 g. The dip is allowed to start a little earlier, so the crossing is not cut off. That stroke becomes the new anchor, so a run of light strokes stays tracked, and its depth is remembered. The chain stops after 120 such strokes in a row; a normal catch or a pause starts it again. Rate is the average of the last 3 stroke intervals. Strokes more than 6 s apart are a pause, not a slow stroke.
  • Forward direction: the catch dip is short and deep, the drive is long and shallow, so the forward acceleration has negative skew. When GPS is moving, the integrated acceleration is correlated with the GPS speed fluctuations, which settles the direction even for smooth rowers. The receiver reports speed late, so the acceleration is held back by that much first. Compared without the delay the two are a fifth of a stroke apart and the match can tip either way.
  • GPS delay, measured: how late the speed is differs from one outing to the next (0.1 to 0.6 s over the recordings so far; the time stamp is when the sentence is read, so it includes the receiver and the serial line). The integrated forward surge rises and falls with the speed of the boat once per stroke, so the two curves match best when the surge is held back by exactly that delay (gps_lag.h). The match is kept as a running average of about a minute at 19 delays between 0 and 0.9 s, once forward is known from GPS and the boat moves faster than 1 m/s, and the delay with the best match is taken about once a second (a quarter of the way each time, so it settles gently). Both curves go through the same filters, so only the delay is left between them; the speed is held between fixes, which adds half a fix interval that is taken off again. It starts at 0.35 s (GPS_LAG_INITIAL_S) and the first reading comes after one to a few minutes of rowing (it waits for forward to be known and for 30 s of matching); the estimate is kept when a new session starts. Over the recordings so far it follows the delay measured from the whole recording to within 0.04 s on average. It is used for the direction check above and to draw the GPS dots in a stroke. The info file has gps_speed_delay_s (where the session began) and gps_lag_auto, which tools/replay.py uses to run the same estimate again.
  • Forward held, sway kept apart: the same comparison is made on all three axes, to learn which way in the unit's frame speeds the boat up. That direction is averaged over a couple of minutes (FORWARD_TAU_S) and, once 30 s of moving GPS agree with it (r of at least 0.3), the surge is measured along it. A sideways push then stays out of the surge, which the axis that follows the largest motion could not promise. What is left, perpendicular to forward and horizontal, is the sway: positive towards starboard, logged as sway_lin_g. The gyro gives the angles: its rate about forward and about up, less its slow average (so bias and a steady turn drop out), integrated with a 3 s leak, logged as oll_deg (positive with the starboard side down) and yaw_deg (positive with the bow towards starboard). They are the boat's movement around its own mean, not a compass heading. In the viewer one of the three is drawn under the speed, picked with Boat motion. One stroke of the sideways acceleration is mostly waves and noise; the swing that repeats stroke after stroke shows as the grey line, the usual one at that rate. It is acceleration, not distance, and a rolling boat tilts the unit a little too, which also reads as sideways.
  • Split and distance per stroke: the split on screen is the GPS speed over the last 3 strokes, taken as distance over time, so it does not jump with the speed swing inside a single stroke. Right after a start or a pause it uses however many strokes there are. Distance per stroke stays the GPS speed of that one stroke. Distance accumulates GPS positions with a 3 m minimum step so it does not drift while stationary. Optionally a complementary filter blends GPS speed with the integrated accelerometer for distance per stroke (the m* tile).
  • Check / bounce: check is how unevenly the boat decelerates during the recovery (scatter around a straight line, in mg); bounce is the vertical acceleration RMS.
  • Map drawing: a full map frame is rendered on the other CPU core so the timer and metrics keep updating at 20 Hz while the map refreshes about five times a second.
  • Clock: logs are UTC; the screen shows local time. NTP when Wi-Fi is up, GPS time once there is a fix, RTC in between.

Contributing

Rowers and developers are both welcome. The project is MIT licensed, so you can use it, change it, and send the changes back.

If you row with it, a recorded session is the most useful thing you can share. Turn raw IMU logging on, row a mix of steady pieces, rate changes, light paddling and rough water, then name the session and open an issue. Those files show where the stroke detector misses a catch or counts one twice. A water that is missing from the map library, a mounting trick that keeps the Tab5 steady, or a coaching language you want on the screen are welcome too. Another language is a column in src/i18n.cpp.

If you write code, fork the repository and open a pull request. Firmware is in src/. When you change the stroke detector, keep tools/replay.py in step with src/stroke_detector.cpp, and say which recorded session you checked it against.

License

MIT License

Copyright (c) 2026 Marco de Keizer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Rowing monitor for the M5Stack Tab5 (ESP32-P4): stroke rate, GPS split, camera, offline waterway maps

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages