<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Handshake on HandShakeTec</title><link>https://handshaketec.com/tags/handshake/</link><description>Recent content in Handshake on HandShakeTec</description><generator>Hugo</generator><language>en</language><copyright>&amp;copy; 2026 Matt Oppenheim. All rights reserved.</copyright><lastBuildDate>Fri, 09 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://handshaketec.com/tags/handshake/index.xml" rel="self" type="application/rss+xml"/><item><title>Using HandShake</title><link>https://handshaketec.com/how_to_use_handshake/</link><pubDate>Fri, 09 Oct 2026 00:00:00 +0000</pubDate><guid>https://handshaketec.com/how_to_use_handshake/</guid><description>&lt;p>This page shows how to use the Lilygo T-Watch S3 and the Lilygo T-Embed to work as the &lt;a href="https://mattoppenheim.com/projects/handshake/">handshake project&lt;/a>.
This page assumes that you have already programmed both devices with the HandShake firmware.&lt;/p>
&lt;h1 id="summary">Summary&lt;/h1>
&lt;p>Turn on the watch using a long press on the button.&lt;/p>
&lt;p>Shake the watch gently and check that the receiver unit detects it and sends its keystroke. Do this test shake as soon as the receiver is plugged in: the first shake after plugging in sends its keystroke about half a second late (see &lt;a href="https://handshaketec.com/how_to_use_handshake/#the-first-shake-after-plugging-in-the-receiver">The first shake after plugging in the receiver&lt;/a>).&lt;/p>
&lt;p>Adjust the level of shake that will send a keystroke using the jog dial on the receiver, followed by a long press on the button in the middle of the jog dial. This sends the new shake detection threshold to the watch.&lt;/p>
&lt;h1 id="handshake-components">HandShake components&lt;/h1>
&lt;p>The HandShake system comprises two parts, a smart watch (Lilygo T-Watch S3) and a receiver unit that sends a keystroke to a communication device (Lilygo T-Embed) through a USB cable. The two devices are shown in the photo below.&lt;/p>
&lt;figure class="image center">
&lt;img src="https://handshaketec.com/images/t_watch_s3_off_t_embed_on.png" loading="lazy" width="400" height="121">
&lt;figcaption>
&lt;strong>Lilygo T-Watch S3 and Lilygo T-Embed&lt;/strong>&lt;br>&lt;/figcaption>
&lt;/figure>

&lt;p>When the watch starts, it shows a start-up screen for about two seconds:&lt;/p>
&lt;pre tabindex="0">&lt;code>firmware
2026-10-09d
reset:
power on (1)
&lt;/code>&lt;/pre>&lt;p>The date on the second line is the firmware version. The &lt;a href="https://handshaketec.com/firmware_changes/">Firmware changes&lt;/a> page lists what changed in each version.&lt;/p>
&lt;p>The last two lines say why the watch started. When you turn the watch on with the button, they show &lt;strong>power on (1)&lt;/strong>, the normal start. Anything else, such as &lt;strong>watchdog&lt;/strong> or &lt;strong>brownout&lt;/strong>, is explained in &lt;a href="https://handshaketec.com/flash_device_help/#what-the-reset-line-means">what the reset line means&lt;/a>. If the start-up screen keeps coming back every few seconds, the watch is restarting: see &lt;a href="https://handshaketec.com/watch_configuration_help/#watch-keeps-restarting-every-few-seconds">Watch keeps restarting every few seconds&lt;/a>.&lt;/p>
&lt;p>Watches with firmware older than 2026-10-09d show only the first two lines.&lt;/p>
&lt;p>The T-Embed shows the same, with the reason on the third line, e.g. &lt;strong>reset: power on (1)&lt;/strong>.&lt;/p>
&lt;p>When the watch has booted up, which takes a few seconds, you will see the display below:&lt;/p>
&lt;figure class="image center">
&lt;img src="https://handshaketec.com/images/t_watch_s3_standby.png" loading="lazy">
&lt;figcaption>
&lt;strong>Watch default display&lt;/strong>&lt;br>&lt;/figcaption>
&lt;/figure>

&lt;p>The screen has two sliders:&lt;/p>
&lt;ul>
&lt;li>The &lt;strong>top slider&lt;/strong> (yellow) shows the trigger level, the amount of shake needed to operate your communication software. Its value is also shown on the watch screen as &amp;lsquo;shake trigger: xxx&amp;rsquo; where xxx is a number that varies from 525 to 1000 (these limits may change). The lower the number, the softer the motion required to trigger a shake detection. This slider only changes when you send a new trigger level from the receiver.&lt;/li>
&lt;li>The &lt;strong>bottom slider&lt;/strong> (green) shows how close the latest movement came to triggering. It updates in real time.&lt;/li>
&lt;/ul>
&lt;p>The bottom slider runs from the watch at rest (empty) to the trigger level (full). Once it reaches the right-hand end, the shake detection is triggered. If you change the trigger level from the receiver, the green slider rescales to match, so a full bar always means a trigger.&lt;/p>
&lt;p>The green slider keeps the strongest movement of the last moment and then falls back over about a second, so even a short sharp punch is visible. If the watch is set to detect a roll rather than a punch, the green slider shows the strength of the roll.&lt;/p>
&lt;p>When an intended shake is detected this display is shown on the watch:&lt;/p>
&lt;figure class="image center">
&lt;img src="https://handshaketec.com/images/t_watch_s3_shake_detection.png" loading="lazy">
&lt;figcaption>
&lt;strong>Shake detected display&lt;/strong>&lt;br>&lt;/figcaption>
&lt;/figure>

&lt;p>The line below the battery reading is the watch&amp;rsquo;s status line. It shows &lt;strong>*** SHAKE ***&lt;/strong> or &lt;strong>*** NO LINK ***&lt;/strong> briefly after a gesture and is otherwise empty. If the watch has a lasting problem, the message stays there and comes back after each gesture:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>-- NO SAVE --&lt;/strong>: the watch cannot store its settings. It runs with the built-in trigger level and a new level sent from the receiver is lost when the watch restarts. Reflash the firmware.&lt;/li>
&lt;li>&lt;strong>- TASK FAIL -&lt;/strong>: the watch could not start one of its internal tasks. Restart the watch. If it comes back, reflash the firmware.&lt;/li>
&lt;/ul>
&lt;p>Watches with firmware older than 2026-10-09b lose these messages after the first gesture.&lt;/p>
&lt;p>If the watch cannot reach the receiver, the status line shows &lt;strong>*** NO LINK ***&lt;/strong> and keeps showing it until the receiver answers again. The watch checks every five or so seconds, so this appears without a gesture and clears by itself when the receiver is back in reach. It does not buzz for this: only a gesture that did not get through gives the three quick clicks. See &lt;a href="https://handshaketec.com/watch_configuration_help/#if-the-watch-shows-no-link">If the watch shows NO LINK&lt;/a>. Watches with firmware older than 2026-10-13 only show NO LINK after a gesture.&lt;/p>
&lt;p>To charge the watch, attach a USB cable to the micro USB socket in the side of the watch and connect to a USB socket or charger. For whatever reason, once the watch battery is at 0% it stays at 0% for an age while charging then starts ramping up to 100% fairly quickly. I don&amp;rsquo;t know how to improve this yet.&lt;/p>
&lt;figure class="image center">
&lt;img src="https://handshaketec.com/images/t_watch_s3_charging.png" loading="lazy">
&lt;figcaption>
&lt;strong>Charging the watch&lt;/strong>&lt;br>&lt;/figcaption>
&lt;/figure>

&lt;h1 id="setting-up-the-receiver-unit">Setting up the receiver unit&lt;/h1>
&lt;p>The T-Embed receiver unit is powered from the USB-C socket on its side.&lt;/p>
&lt;p>The receiver has a jog dial around the button.
This dial is used to adjust the trigger threshold.
Use the dial to set a new trigger threshold then send this new value to the watch by giving a long press (about 2s) to the button in the middle of the dial.
Turning the jog wheel clockwise will increase the amount of shake needed to send a trigger to your communication device, turning the jog wheel anti-clockwise decreases the amount of shake needed to send a trigger to your communication device.
The updated trigger will not take effect in the watch until you give a long press on the button though.
Check the watch to see that the new shake value is shown on the watch display.&lt;/p>
&lt;p>The button on the receiver can be used to adjust the sensitivity of the gesture detection algorithm running on the T-Watch:&lt;/p>
&lt;p>A short press: The receiver asks the watch for the largest shake it measured over the last 5 seconds and shows that value on the receiver display.
Ask the person wearing the watch to make the gesture you want to detect, then give a short press to see how strongly that gesture registered.
Set the trigger threshold a little below the value you see, so the gesture is detected reliably without every small movement triggering it.&lt;/p>
&lt;p>A long press: The receiver sends the trigger threshold shown on the receiver display to the watch.&lt;/p>
&lt;p>This allows the sensitivity of the gesture that is detected to be adjusted without having to touch the T-Watch.&lt;/p>
&lt;h2 id="the-first-shake-after-plugging-in-the-receiver">The first shake after plugging in the receiver&lt;/h2>
&lt;p>The first shake after the receiver is plugged in sends its keystroke about half a second late. Every shake after that sends its keystroke straight away.&lt;/p>
&lt;p>So as soon as the receiver is plugged in, make a test shake and check that the keystroke reaches the communication device. Do this each time the receiver is plugged in or has lost power, before it is needed. The test sends a keystroke to whatever is open on the communication device, so choose a moment when that does no harm.&lt;/p>
&lt;p>This delay cannot be avoided. It is the price of keeping the receiver easy to reprogram. Until the first shake the receiver keeps the connection that lets the &lt;a href="https://handshaketec.com/flash_device/">Device Flasher&lt;/a> reprogram it without pressing any buttons. The first shake turns it into a keyboard and the communication device then needs a moment to recognise the new keyboard. The receiver waits for that moment before sending the keystroke, so that it is not lost. Starting the keyboard as soon as the receiver is plugged in would remove the delay, but then reprogramming the receiver would mean holding its button down while plugging it in.&lt;/p>
&lt;p>Because of this, the receiver can only be reprogrammed from the website before its first shake. To reprogram it, unplug it, plug it back in and use the Device Flasher before shaking the watch.&lt;/p>
&lt;p>Receivers with firmware older than 2026-10-20 may not send a keystroke at all for the first shake after plugging in.&lt;/p>
&lt;h2 id="checking-on-the-watch-from-the-receiver">Checking on the watch from the receiver&lt;/h2>
&lt;p>The watch tells the receiver its battery level every five or so seconds. The bottom line of the receiver&amp;rsquo;s screen shows what it last heard:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>watch OK 85%&lt;/strong>: the watch is in reach and its battery is at 85%.&lt;/li>
&lt;li>&lt;strong>watch charging&lt;/strong>: the watch is on its charger.&lt;/li>
&lt;li>&lt;strong>watch LOW 15%&lt;/strong>: the watch&amp;rsquo;s battery is at 20% or less. The ring around the dial flashes amber every two seconds. Charge the watch soon.&lt;/li>
&lt;li>&lt;strong>*** NO LINK ***&lt;/strong>: the receiver has not heard from the watch for 20 seconds. It clicks three times and the ring flashes red every two seconds. The clicks repeat every five minutes until the watch is heard again.&lt;/li>
&lt;/ul>
&lt;p>The person wearing the watch may not be able to tell you it has stopped working and someone who has gone quiet can look as if they have nothing to say. If the receiver shows NO LINK, check that the watch is switched on, charged and within reach of the receiver. When the watch is back, the line returns to &lt;strong>watch OK&lt;/strong> and the flashing stops.&lt;/p>
&lt;p>The clicks play even when Audio is switched off on the configuration page. That switch only turns off the click for each gesture.&lt;/p>
&lt;p>When the receiver starts it shows &lt;strong>*** NO LINK ***&lt;/strong> until it first hears from the watch, but it does not click or flash for that, so a receiver switched on with no watch nearby stays quiet. A watch with firmware older than 2026-10-13 never tells the receiver its battery level, so the receiver shows NO LINK and stays quiet. Flash both devices with new firmware to use this.&lt;/p>
&lt;p>None of these warnings is ever sent to the communication device, so they cannot make a selection.&lt;/p></description></item><item><title>Device Flasher help</title><link>https://handshaketec.com/flash_device_help/</link><pubDate>Mon, 14 Sep 2026 00:00:00 +0000</pubDate><guid>https://handshaketec.com/flash_device_help/</guid><description>&lt;p>The &lt;a href="https://handshaketec.com/flash_device/">&lt;strong>Device Flasher&lt;/strong> page&lt;/a> is where you load
the firmware file you built on the configuration page onto your device. This works for
both the T-Watch S3 and the T-Embed, using the same page.&lt;/p>
&lt;p>This is called &amp;lsquo;flashing&amp;rsquo; the device, as the memory that the firmware is written to is
called flash memory.&lt;/p>
&lt;p>It all happens in your browser — there&amp;rsquo;s nothing to install. You&amp;rsquo;ll need &lt;strong>Google
Chrome or Microsoft Edge&lt;/strong>; other browsers such as Firefox and Safari can&amp;rsquo;t talk to the
device over USB and won&amp;rsquo;t work.&lt;/p>
&lt;p>You don&amp;rsquo;t need any programming knowledge — just work through the page from top to
bottom.&lt;/p>
&lt;h1 id="before-you-start">Before you start&lt;/h1>
&lt;p>You&amp;rsquo;ll need:&lt;/p>
&lt;ul>
&lt;li>The &lt;code>.bin&lt;/code> firmware file you downloaded from the &lt;a href="https://handshaketec.com/watch_configuration/">T-Watch-S3 configuration
page&lt;/a> or the &lt;a href="https://handshaketec.com/embed_configuration/">T-Embed configuration
page&lt;/a>.&lt;/li>
&lt;li>A USB cable that carries data, not just power. Some cables only charge — if your
device isn&amp;rsquo;t found in Step 2 below, try a different cable.
&lt;ul>
&lt;li>The &lt;strong>T-Watch S3&lt;/strong> uses a &lt;strong>USB micro&lt;/strong> cable.&lt;/li>
&lt;li>The &lt;strong>T-Embed&lt;/strong> uses a &lt;strong>USB-C&lt;/strong> cable.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h1 id="step-1--select-the-firmware-file">Step 1 — Select the firmware file&lt;/h1>
&lt;p>Under &lt;strong>1. Select Firmware File&lt;/strong>, click the file box and choose the &lt;code>.bin&lt;/code> file you
downloaded from the configuration page.&lt;/p>
&lt;p>The page checks the file and uploads it. You don&amp;rsquo;t have to set a start address or any
other technical option — the file you download already contains everything the device
needs and the page works out where it goes.&lt;/p>
&lt;p>If you see an error message here:&lt;/p>
&lt;ul>
&lt;li>&lt;em>&amp;ldquo;File must be .bin&amp;rdquo;&lt;/em> — you&amp;rsquo;ve picked the wrong file, or renamed the firmware so it no
longer ends in &lt;code>.bin&lt;/code>.&lt;/li>
&lt;li>&lt;em>&amp;ldquo;File too small&amp;rdquo;&lt;/em> — the file isn&amp;rsquo;t a firmware image. A real one is at least 0.3 MB.
This usually means a download didn&amp;rsquo;t finish, so download it again from the
configuration page.&lt;/li>
&lt;li>&lt;em>&amp;ldquo;This firmware file is damaged or not from HandShake&amp;rdquo;&lt;/em> — the part of the file that
says which device it is for doesn&amp;rsquo;t make sense. Download it again from the
configuration page.&lt;/li>
&lt;/ul>
&lt;h2 id="which-device-the-file-is-for">Which device the file is for&lt;/h2>
&lt;p>Each firmware file says which device it is for. Once the file is uploaded, the page
tells you, with a photo: for example &lt;em>&amp;ldquo;This firmware is for the &lt;strong>T-Embed&lt;/strong>. Plug in
your T-Embed.&amp;rdquo;&lt;/em> Check that the device in the photo is the one in front of you.&lt;/p>
&lt;p>Older firmware files, downloaded before this check was added in October 2026, don&amp;rsquo;t say
which device they are for. For one of
those the page says the file &lt;em>can&amp;rsquo;t be checked&lt;/em> and shows a &lt;strong>Continue&lt;/strong> button instead
of the &lt;strong>Connect&lt;/strong> button. Make sure the file is for the device you are about to flash,
then click &lt;strong>Continue&lt;/strong>. Downloading the file again from the configuration page gives
you one that can be checked.&lt;/p>
&lt;h2 id="about-the-audio-file-status-section">About the Audio File Status section&lt;/h2>
&lt;p>Section &lt;strong>2. Audio File Status&lt;/strong> is there for information only. It lists what it found
for &lt;strong>both&lt;/strong> devices, whichever firmware you happen to have selected, so seeing a line
about the other device is normal and isn&amp;rsquo;t a mistake.&lt;/p>
&lt;p>You don&amp;rsquo;t need to do anything in this section. If you chose to have sound on the
T-Embed, it is already built into the &lt;code>.bin&lt;/code> file — there&amp;rsquo;s no separate audio file for
you to select or flash.&lt;/p>
&lt;h1 id="step-2--connect-your-device">Step 2 — Connect your device&lt;/h1>
&lt;p>Plug your device into your computer with a data-capable USB cable — micro-USB for the
T-Watch S3, USB-C for the T-Embed.&lt;/p>
&lt;p>Once the firmware file has been checked, a &lt;strong>Connect&lt;/strong> button will appear under &lt;strong>3.
Connect &amp;amp; Flash&lt;/strong>. Click it. Your browser will show a list of devices — choose the one
for your watch or T-Embed and click &lt;strong>Connect&lt;/strong> in that list.&lt;/p>
&lt;p>The names in this list come from your computer, not from HandShake, so they&amp;rsquo;re often
unhelpful — something like &amp;ldquo;USB Serial Device&amp;rdquo;, &amp;ldquo;USB JTAG/serial debug unit&amp;rdquo;, or a
string of letters and numbers rather than &amp;ldquo;T-Watch S3&amp;rdquo;. If it&amp;rsquo;s not obvious which entry
is your device, close the list, unplug the device, click &lt;strong>Connect&lt;/strong> again and note down
what&amp;rsquo;s in the list without it, then plug the device back in and click &lt;strong>Connect&lt;/strong> once
more. The extra entry that appears only when the device is plugged in is the one you
want.&lt;/p>
&lt;p>If your device doesn&amp;rsquo;t appear in the list, make sure it&amp;rsquo;s powered on and properly
connected, then try disconnecting and reconnecting the cable.&lt;/p>
&lt;h1 id="step-3--install-the-firmware">Step 3 — Install the firmware&lt;/h1>
&lt;p>Once the device is connected, a small window opens with a few choices. Click
&lt;strong>Install HandShake code&lt;/strong>.&lt;/p>
&lt;p>You&amp;rsquo;ll be asked to confirm. There&amp;rsquo;s also an &lt;strong>Erase device&lt;/strong> tick box — you can leave
this alone. The firmware you downloaded is a complete image, so erasing first isn&amp;rsquo;t
needed.&lt;/p>
&lt;p>Before writing anything, the flasher checks which device is plugged in. If it matches
the firmware you see nothing more. If it doesn&amp;rsquo;t, it stops and asks you first: see
&lt;a href="https://handshaketec.com/flash_device_help/#the-flasher-says-this-is-the-wrong-device">the flasher says this is the wrong device&lt;/a>
below.&lt;/p>
&lt;p>You&amp;rsquo;ll then see it work through &lt;strong>Preparing installation&lt;/strong>, &lt;strong>Writing&lt;/strong> and finally
&lt;strong>Installation complete&lt;/strong>. Writing takes a short while — leave the cable connected and
don&amp;rsquo;t close the browser tab until it says it has finished.&lt;/p>
&lt;p>The device restarts on its own once installation is complete, so there&amp;rsquo;s nothing further
for you to do.&lt;/p>
&lt;h2 id="checking-which-firmware-version-is-on-the-device">Checking which firmware version is on the device&lt;/h2>
&lt;p>Each time the device starts, it shows a start-up screen for about two seconds before the
normal display appears.&lt;/p>
&lt;p>The &lt;strong>T-Watch S3&lt;/strong> shows four lines. Its screen is narrower, so the reset reason has a
line of its own:&lt;/p>
&lt;pre tabindex="0">&lt;code>firmware
2026-10-09d
reset:
power on (1)
&lt;/code>&lt;/pre>&lt;p>The &lt;strong>T-Embed&lt;/strong> shows three:&lt;/p>
&lt;pre tabindex="0">&lt;code>firmware
2026-10-09b
reset: power on (1)
&lt;/code>&lt;/pre>&lt;p>The date on the second line is the firmware version. The
&lt;a href="https://handshaketec.com/firmware_changes/">Firmware changes&lt;/a> page lists what changed in each version, so you
can see whether your device has a particular fix. A letter after the date, such as the
&lt;strong>d&lt;/strong> and &lt;strong>b&lt;/strong> above, marks a second or later change made on the same day.&lt;/p>
&lt;p>The date is the version of the program, not the day you built or flashed it. A device
flashed today can show an earlier date if nothing has changed since then. Each device has
its own version, so the watch and the T-Embed can show different dates.&lt;/p>
&lt;p>Firmware flashed before 9 October 2026 doesn&amp;rsquo;t show a start-up screen. Build and flash new
firmware to get it.&lt;/p>
&lt;h3 id="what-the-reset-line-means">What the reset line means&lt;/h3>
&lt;p>The reset line says why the device started. The number in brackets is the code the chip
itself recorded. The watch shows the same messages, split over two lines, so
&lt;strong>reset: power on (1)&lt;/strong> below appears on the watch as &lt;strong>reset:&lt;/strong> with &lt;strong>power on (1)&lt;/strong>
underneath.&lt;/p>
&lt;p>A watch whose version is earlier than 2026-10-09d shows the version but no reset line.
Build and flash new firmware to get it.&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>The screen shows&lt;/th>
 &lt;th>What it means&lt;/th>
 &lt;th>What to do&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>reset: power on (1)&lt;/strong>&lt;/td>
 &lt;td>It was switched on or plugged in.&lt;/td>
 &lt;td>Nothing: this is the normal start.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>reset: USB (21)&lt;/strong> or &lt;strong>(22)&lt;/strong>&lt;/td>
 &lt;td>The computer restarted it through the USB cable. This happens straight after flashing and can happen when software on the computer checks the device&amp;rsquo;s connection.&lt;/td>
 &lt;td>Nothing, if it happens once. If it restarts like this two or three times every time you plug it in, let me know.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>reset: brownout (15)&lt;/strong>&lt;/td>
 &lt;td>The power dipped too low: from the USB socket on the T-Embed, or a nearly flat battery on the watch.&lt;/td>
 &lt;td>T-Embed: try another USB socket on the computer, a shorter cable or a powered USB hub. Watch: charge it.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>reset: power glitch (19)&lt;/strong> or &lt;strong>(23)&lt;/strong>&lt;/td>
 &lt;td>A brief disturbance in the power supply.&lt;/td>
 &lt;td>As for brownout.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>reset: watchdog (7)&lt;/strong>, &lt;strong>(8)&lt;/strong>, &lt;strong>(9)&lt;/strong>, &lt;strong>(11)&lt;/strong>, &lt;strong>(13)&lt;/strong>, &lt;strong>(16)&lt;/strong>, &lt;strong>(17)&lt;/strong>, &lt;strong>(18)&lt;/strong>, &lt;strong>(3)&lt;/strong> or &lt;strong>(12)&lt;/strong>&lt;/td>
 &lt;td>The firmware stopped responding and the chip restarted it. The number says which of the chip&amp;rsquo;s watchdogs caught it.&lt;/td>
 &lt;td>Let me know: this is a fault in the firmware. If a watch keeps restarting, see &lt;a href="https://handshaketec.com/watch_configuration_help/#resetting-the-watch-if-it-becomes-unresponsive">resetting the watch&lt;/a>.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>reset: crash (12)&lt;/strong> or &lt;strong>(3)&lt;/strong>&lt;/td>
 &lt;td>The firmware hit an error and restarted.&lt;/td>
 &lt;td>Let me know: this is a fault in the firmware.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>reset: software (12)&lt;/strong> or &lt;strong>(3)&lt;/strong>&lt;/td>
 &lt;td>The firmware restarted itself on purpose.&lt;/td>
 &lt;td>Nothing, straight after flashing. Otherwise let me know, as HandShake doesn&amp;rsquo;t restart itself in normal use.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>reset: deep sleep (5)&lt;/strong>&lt;/td>
 &lt;td>It woke from deep sleep.&lt;/td>
 &lt;td>HandShake doesn&amp;rsquo;t use deep sleep, so let me know.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>reset: other&lt;/strong>&lt;/td>
 &lt;td>A reason not listed here.&lt;/td>
 &lt;td>Let me know, including the number.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>If the start-up screen appears more than once before the normal display, the device
restarted each time and the reset line shows why the last restart happened. When you
&lt;a href="https://handshaketec.com/contact/">get in touch&lt;/a> about any problem, please include the whole start-up screen:
the version and the reset line.&lt;/p>
&lt;h1 id="if-something-goes-wrong">If something goes wrong&lt;/h1>
&lt;p>&lt;strong>Don&amp;rsquo;t panic.&lt;/strong> If flashing fails partway through, or you flash the wrong file by
mistake, just reconnect the device and repeat the steps above with the correct file.
There&amp;rsquo;s no way to damage the device by flashing it again.&lt;/p>
&lt;h2 id="the-flasher-says-this-is-the-wrong-device">The flasher says this is the wrong device&lt;/h2>
&lt;p>The firmware file is for one device but the other one is plugged in: for example a
T-Embed file with a T-Watch S3 plugged in. Either you picked the other device&amp;rsquo;s file or
you plugged in the other device. The flasher stops before writing anything and shows
photos of both devices.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>To fix it&lt;/strong>, click &lt;strong>Cancel&lt;/strong>. Nothing is written to the device and it carries on
working as before. Then either plug in the device the file is for, or select the
file for the device that is plugged in. Each configuration page downloads the file
for its own device.&lt;/li>
&lt;li>&lt;strong>Flashing anyway&lt;/strong> is possible: tick &lt;em>&amp;ldquo;I understand…&amp;rdquo;&lt;/em>, then click &lt;strong>Flash anyway&lt;/strong>.
Nothing will be damaged, but the device&amp;rsquo;s screen will stay black and it won&amp;rsquo;t work
until you flash it again with its own firmware. That fixes it completely: the
flasher always recognises the device itself, whatever firmware is on it.&lt;/li>
&lt;/ul>
&lt;h2 id="the-flasher-could-not-tell-which-device-this-is">The flasher could not tell which device this is&lt;/h2>
&lt;p>The flasher reads the device to find out what it is, and this time it couldn&amp;rsquo;t tell.
It shows a photo of the device the firmware is for. If that is the device plugged in,
click &lt;strong>Continue&lt;/strong> and it flashes as normal. If not, click &lt;strong>Cancel&lt;/strong>: nothing is
written. Please &lt;a href="https://handshaketec.com/contact/">let me know&lt;/a> if you see this message with the right device
plugged in, as it means a new batch of devices reads differently.&lt;/p>
&lt;h2 id="other-problems">Other problems&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Device not detected?&lt;/strong> Check it&amp;rsquo;s connected and powered on. Try a different USB
cable or a different USB port on your computer.&lt;/li>
&lt;li>&lt;strong>Flash failed?&lt;/strong> Disconnect and reconnect the device, then try again.&lt;/li>
&lt;li>&lt;strong>Still stuck?&lt;/strong> Open the browser&amp;rsquo;s developer console (press F12) to see if there&amp;rsquo;s an
error message and get in touch if you need help — it&amp;rsquo;s useful for me to know if
you&amp;rsquo;ve hit a problem.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>T-Embed repeatedly not detected&lt;/strong>&lt;/p>
&lt;p>Once the watch has been shaken, the T-Embed becomes a keyboard and the Device Flasher
can no longer find it. Unplug the T-Embed, plug it back in and click &lt;strong>Connect&lt;/strong> before
shaking the watch, or switch the watch off first. If it is still not detected:&lt;/p>
&lt;ul>
&lt;li>Unplug the T-Embed from the USB cable.&lt;/li>
&lt;li>Push in the button in the middle of the jog dial.&lt;/li>
&lt;li>Keep this button pressed while you plug the USB cable back in.&lt;/li>
&lt;li>Release the button. The display will probably stay black.&lt;/li>
&lt;li>Now the T-Embed should be detected and flash.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>T-Watch repeatedly not detected&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Have a look at the section &amp;lsquo;Resetting the watch if it becomes unresponsive&amp;rsquo; in this page: &lt;a href="https://handshaketec.com/watch_configuration_help/#resetting-the-watch-if-it-becomes-unresponsive">watch_configuration_help&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>T-Embed configuration help</title><link>https://handshaketec.com/embed_configuration_help/</link><pubDate>Mon, 14 Sep 2026 00:00:00 +0000</pubDate><guid>https://handshaketec.com/embed_configuration_help/</guid><description>&lt;p>The &lt;a href="https://handshaketec.com/embed_configuration/">&lt;strong>T-Embed Configuration&lt;/strong> page&lt;/a> lets you choose what your T-Embed receiver does, then builds a
custom firmware file (the program that runs on the device) for you to download and
put onto the T-Embed. The T-Embed is the small receiver unit that sits plugged into
your computer or other device and passes on the signal sent by the watch — see the
&lt;a href="https://handshaketec.com/getting_started/">Getting Started&lt;/a> and
&lt;a href="https://handshaketec.com/how_to_use_handshake/">Using HandShake&lt;/a> pages if you&amp;rsquo;re not
sure which device is which.&lt;/p>
&lt;p>The options that you can set include:&lt;/p>
&lt;ul>
&lt;li>Whether the T-Embed plays a sound each time it gets a shake signal from the watch.&lt;/li>
&lt;li>Whether the T-Embed sends a keystroke to whatever it&amp;rsquo;s plugged into each time it gets a shake signal from the watch.&lt;/li>
&lt;li>Which key it sends: a, b, Enter or Space. The T-Embed sends a unless you choose another. Switch-access software often expects Space or Enter, so check what yours uses.&lt;/li>
&lt;li>Which watch the T-Embed should listen to.&lt;/li>
&lt;/ul>
&lt;p>You don&amp;rsquo;t need any programming knowledge — just work through the page from top to
bottom.&lt;/p>
&lt;p>How it works:
Each time you change an option on this page, that choice is written to a configuration
file for your session. When you create the firmware at the bottom of the page, this
configuration file is read and used to build the firmware. So, you can go back and
change your selections as many times as you want before you generate the firmware.&lt;/p>
&lt;p>If the option you&amp;rsquo;re setting has a &amp;lsquo;submit&amp;rsquo; button, the value you enter isn&amp;rsquo;t written to
the configuration file until you click that button. The two on/off switches (Audio and
Keyboard) and the choice of key save themselves the moment you click them — there&amp;rsquo;s no
separate submit button for those.&lt;/p>
&lt;h1 id="using-the-t-embed-configuration-website">Using the T-Embed configuration website&lt;/h1>
&lt;p>Using this website you will configure and download a file for your T-Embed which will be
called e.g.&lt;/p>
&lt;p>zeuss-tembed-firmware.bin&lt;/p>
&lt;p>You are free to rename the file after you download it.&lt;/p>
&lt;p>The Greek god&amp;rsquo;s name at the start of the filename will probably be different from the
example and will change each time that you restart the configuration page. See below for
details of why this is done.&lt;/p>
&lt;h2 id="step-1--check-your-session-name">Step 1 — Check your session name&lt;/h2>
&lt;p>At the top of the page you&amp;rsquo;ll see your &lt;strong>session name&lt;/strong>.
This is a name of a Greek god.&lt;/p>
&lt;p>Each time you re-open the configuration page, you will be assigned a new session name.
This is done so that the firmware you build doesn&amp;rsquo;t get mixed up with anyone else&amp;rsquo;s.
The names are taken randomly from a pool of Greek god names.
When you next use the site you will probably get a different session name.&lt;/p>
&lt;p>The firmware filename produced by the website contains the session name, e.g.
zeuss-tembed-firmware.bin, so that you get the firmware for your device and not
somebody else&amp;rsquo;s, even if several people are using the site at the same time.&lt;/p>
&lt;p>You&amp;rsquo;re free to rename the firmware after you&amp;rsquo;ve downloaded it to your own device.
Renaming the file won&amp;rsquo;t change how it works, so long as you keep &amp;lsquo;.bin&amp;rsquo; at the end of
the filename. The &amp;lsquo;.bin&amp;rsquo; ending is required so that the flashing tool recognises the
file as a firmware file.&lt;/p>
&lt;p>If the session name is &amp;lsquo;undefined&amp;rsquo; then there is a problem with the website! Try again
in 10 minutes, or let me know and I&amp;rsquo;ll get it fixed.&lt;/p>
&lt;h2 id="step-2--turn-audio-on-shake-on-or-off">Step 2 — Turn &amp;ldquo;Audio on shake&amp;rdquo; on or off&lt;/h2>
&lt;p>Under &lt;strong>Audio Control&lt;/strong>, the toggle switch controls whether the T-Embed plays a short
sound — a click, like a stick being tapped — whenever it receives a shake signal from
the paired watch. This gives you, or whoever is nearby, an audible confirmation that a
shake has been picked up, separate from anything that happens on the connected device.&lt;/p>
&lt;p>With this switched on, you also get the same sound when you double-click the T-Embed&amp;rsquo;s
button to test the switch, which is useful when you&amp;rsquo;re setting things up.&lt;/p>
&lt;p>Click the switch to turn it on (it turns green) or off. There&amp;rsquo;s no submit button to
click — the setting is saved as soon as you click the switch.&lt;/p>
&lt;h2 id="step-3--turn-the-keyboard-on-and-choose-its-key">Step 3 — Turn the keyboard on and choose its key&lt;/h2>
&lt;p>Under &lt;strong>Keyboard Control&lt;/strong>, the &lt;strong>USB keyboard on shake&lt;/strong> toggle controls whether the
T-Embed acts as a USB keyboard plugged into whatever it&amp;rsquo;s connected to (a computer,
tablet or other device that accepts a USB keyboard). When it is on, each time the
T-Embed receives a shake signal from the paired watch it presses one key on that device.&lt;/p>
&lt;p>Choose that key under &lt;strong>Key sent on shake, when the keyboard is on&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>a&lt;/strong> — the default.&lt;/li>
&lt;li>&lt;strong>b&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Enter&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Space&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>Switch-access software often expects &lt;strong>Space&lt;/strong> or &lt;strong>Enter&lt;/strong>, so check which key yours
uses for a switch press and choose the same one here. Whatever you want the shake to do
in your communication software, set it to be triggered by this key. The line under the
choices, such as &lt;em>Key sent on shake: Space&lt;/em>, shows the key that will be built into the
firmware.&lt;/p>
&lt;p>The first shake after the T-Embed is plugged in sends its key about half a second late:
see
&lt;a href="https://handshaketec.com/how_to_use_handshake/#the-first-shake-after-plugging-in-the-receiver">The first shake after plugging in the receiver&lt;/a>.&lt;/p>
&lt;p>The toggle and the key both save the moment you click them; there&amp;rsquo;s no submit button.
The key is built into the firmware, so after changing it, generate the firmware again
and flash it to the T-Embed. A T-Embed flashed before you changed the key keeps sending
the old one.&lt;/p>
&lt;p>You can turn both Audio Control and Keyboard Control on together, or use just one of
them, depending on what you need.&lt;/p>
&lt;h2 id="step-4--enter-the-t-watchs-mac-address">Step 4 — Enter the T-Watch&amp;rsquo;s MAC address&lt;/h2>
&lt;p>Under &lt;strong>Enter MAC Address for the Paired T-Watch&lt;/strong>, type in the MAC address of the
T-Watch S3 that this T-Embed should listen to. This is what pairs the two devices
together, so that your T-Embed only reacts to your own watch and ignores anybody
else&amp;rsquo;s.&lt;/p>
&lt;p>You can type the address either with colons (e.g. &lt;code>AA:BB:CC:DD:EE:FF&lt;/code>) or without them
(e.g. &lt;code>AABBCCDDEEFF&lt;/code>) — either format is accepted.&lt;/p>
&lt;p>If you don&amp;rsquo;t already know your watch&amp;rsquo;s MAC address, see the
&lt;a href="https://handshaketec.com/mac_identification/">Finding the MAC address of your module&lt;/a>
page for step-by-step instructions on reading it off the watch using a free website
called ESPConnect. Make sure you read the address &lt;strong>from the watch&lt;/strong>, not the T-Embed —
it&amp;rsquo;s easy to mix the two devices up when you have both plugged in.&lt;/p>
&lt;p>Once you&amp;rsquo;ve typed in the address, click &lt;strong>Submit MAC&lt;/strong>. A message will appear
confirming it&amp;rsquo;s been saved. If you see a warning about an invalid address instead,
double-check you&amp;rsquo;ve copied it correctly — the tips on the MAC identification page
about characters that look alike (0/O, 1/I/L, 8/B) are worth a look if you&amp;rsquo;re stuck.&lt;/p>
&lt;h2 id="step-5--generate-the-firmware">Step 5 — Generate the firmware&lt;/h2>
&lt;p>Beside the button is the firmware version the build will produce, for example
&lt;strong>Firmware version 2026-10-09b&lt;/strong>. It is the same date the T-Embed shows on its start-up
screen once flashed and its &lt;strong>what&amp;rsquo;s changed&lt;/strong> link goes to the T-Embed&amp;rsquo;s list on the
&lt;a href="https://handshaketec.com/firmware_changes/">Firmware changes&lt;/a> page.&lt;/p>
&lt;p>Once you&amp;rsquo;ve set the options above the way you want them, click &lt;strong>Generate Firmware&lt;/strong>.
The site reads your choices and builds the firmware file. This usually takes a minute
or two and you&amp;rsquo;ll see progress messages while it works, so please be patient.&lt;/p>
&lt;p>The build carries on if you leave the page. Come back to this page and you&amp;rsquo;ll see its
progress, or its result if it has finished.&lt;/p>
&lt;h2 id="step-6--download-the-firmware">Step 6 — Download the firmware&lt;/h2>
&lt;p>While the build runs, the download button shows &lt;em>Building&amp;hellip;&lt;/em>. Once the build finishes,
a &lt;strong>download&lt;/strong> option appears. Click it to save the firmware file to your computer.&lt;/p>
&lt;p>Once it&amp;rsquo;s downloaded, the firmware is yours forever! You own it. No time limits, no
subscriptions. All yours.&lt;/p>
&lt;p>To put this firmware onto your T-Embed, see the
&lt;a href="https://handshaketec.com/flash_device_help/">Device Flasher help page&lt;/a> for step-by-step
instructions.&lt;/p></description></item><item><title>Finding the MAC address of your module</title><link>https://handshaketec.com/mac_identification/</link><pubDate>Thu, 10 Sep 2026 00:00:00 +0000</pubDate><guid>https://handshaketec.com/mac_identification/</guid><description>&lt;h1 id="what-is-a-mac">What is a MAC?&lt;/h1>
&lt;p>Every wireless device has a MAC address. It is a unique code set at the factory. You can think of it as the device&amp;rsquo;s serial number for wireless communication.&lt;/p>
&lt;p>A MAC address is 12 characters long. It is usually written in pairs separated by colons, for example:&lt;/p>
&lt;p>&lt;code>34:85:18:A1:2B:3C&lt;/code>&lt;/p>
&lt;p>It only ever contains the numbers 0 to 9 and the letters A to F.&lt;/p>
&lt;h1 id="why-does-handshake-need-it">Why does HandShake need it?&lt;/h1>
&lt;p>The watch and the receiver each need to know the other&amp;rsquo;s MAC address:&lt;/p>
&lt;ul>
&lt;li>The &lt;strong>watch&lt;/strong> needs the receiver&amp;rsquo;s MAC address so it knows where to send its signals.&lt;/li>
&lt;li>The &lt;strong>receiver&lt;/strong> needs the watch&amp;rsquo;s MAC address so it knows which watch to listen to. It will then ignore every other watch.&lt;/li>
&lt;/ul>
&lt;p>This matters when several people use HandShake in the same room. Each watch talks only to its own receiver and each receiver responds only to its own watch.&lt;/p>
&lt;h1 id="how-to-find-the-mac-addresses">How to find the MAC addresses&lt;/h1>
&lt;p>You need two MAC addresses: one for the watch and one for the receiver. You can read both using a free website called ESPConnect. Nothing needs to be installed.&lt;/p>
&lt;p>&lt;strong>You will need:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>A computer running Google Chrome or Microsoft Edge. Other browsers such as Firefox and Safari will not work.&lt;/li>
&lt;li>A USB-C cable that carries data. Some cables only charge. If the device doesn&amp;rsquo;t appear in step 4, try a different cable.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Steps:&lt;/strong>&lt;/p>
&lt;p>Follow these steps for the watch, then repeat them for the receiver.&lt;/p>
&lt;ol>
&lt;li>Connect the device to the computer with the USB cable.&lt;/li>
&lt;li>Open Chrome or Edge and go to &lt;a href="https://thelastoutpostworkshop.github.io/ESPConnect/">https://thelastoutpostworkshop.github.io/ESPConnect/&lt;/a>&lt;/li>
&lt;li>Click &lt;strong>Connect&lt;/strong>.&lt;/li>
&lt;li>A box will pop up asking you to choose a device. Select the device. It is usually listed as &lt;em>USB JTAG/serial debug unit&lt;/em>. Then click &lt;strong>Connect&lt;/strong> in the box.&lt;/li>
&lt;li>Wait a few seconds for the page to finish connecting.&lt;/li>
&lt;li>Open the &lt;strong>Device Info&lt;/strong> tab. The MAC address is shown in the summary.&lt;/li>
&lt;li>Write the MAC address down and label it clearly as &lt;strong>watch&lt;/strong> or &lt;strong>receiver&lt;/strong>.&lt;/li>
&lt;li>Click &lt;strong>Disconnect&lt;/strong> and unplug the device.&lt;/li>
&lt;/ol>
&lt;p>If the device doesn&amp;rsquo;t start normally after unplugging, turn it off and on again.&lt;/p>
&lt;h1 id="tips-for-entering-the-mac-addresses">Tips for entering the MAC addresses&lt;/h1>
&lt;ul>
&lt;li>Don&amp;rsquo;t swap them. The watch is given the &lt;strong>receiver&amp;rsquo;s&lt;/strong> address. The receiver is given the &lt;strong>watch&amp;rsquo;s&lt;/strong> address.&lt;/li>
&lt;li>Copy each address carefully, one pair at a time.&lt;/li>
&lt;li>Watch out for characters that look alike. A MAC address never contains the letter O, so it is always the number zero. The same goes for I and L, which are always the number 1.&lt;/li>
&lt;li>Check that you haven&amp;rsquo;t mixed up 8 and B.&lt;/li>
&lt;li>Capital or lower-case letters make no difference.&lt;/li>
&lt;/ul>
&lt;p>If the watch and receiver don&amp;rsquo;t connect, a mistyped or swapped MAC address is the most likely cause. Check both addresses character by character before trying anything else.&lt;/p></description></item><item><title>Getting Started</title><link>https://handshaketec.com/getting_started/</link><pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate><guid>https://handshaketec.com/getting_started/</guid><description>&lt;p>This page shows how to get started with setting up the HandShake project.&lt;/p>
&lt;h1 id="what-youll-need">What you&amp;rsquo;ll need&lt;/h1>
&lt;p>&lt;a href="https://lilygo.cc/products/t-watch-s3">Lilygo T-Watch S3&lt;/a>, (~$45)&lt;/p>
&lt;p>&lt;a href="https://lilygo.cc/products/t-embed">Lilygo T-Embed&lt;/a> (~$30)&lt;/p>
&lt;p>One USB micro cable to connect with the T-Watch for programming and charging.&lt;/p>
&lt;p>One USB C cable to connect with the T-Embed for programming, to connect to the device you want to send a keystroke to and for powering the T-Embed through.&lt;/p>
&lt;h1 id="getting-started-with-the-t-watch-s3-and-the-t-embed">Getting started with the T-Watch S3 and the T-Embed&lt;/h1>
&lt;p>The first time that you use the T-Watch S3, you&amp;rsquo;ll need to turn on the battery. Instructions and photos showing how to do this are &lt;a href="https://handshaketec.com/t_watch_s3_first_time_use">on this page&lt;/a>.
I got caught out by not switching on the battery!&lt;/p>
&lt;p>The T-Embed is powered through the USB cable so you don&amp;rsquo;t need to worry about turning on a battery for this.&lt;/p>
&lt;p>Once you&amp;rsquo;ve checked that the two devices are in good working order, you need to program each device with the HandShake code.&lt;/p>
&lt;p>For each device you work through the relevant configuration page, generate the code for the device, then download and save the code to your own laptop or PC. Now you own the code. It&amp;rsquo;s yours.&lt;/p>
&lt;p>Once you have the code saved, you can load it on to the watch or receiver. This is called &amp;lsquo;flashing&amp;rsquo; the device as the memory that the code is written to is called flash memory.&lt;/p>
&lt;p>Each configuration page has a comprehensive help page.&lt;/p>
&lt;p>These are the pages that allow you to generate and download the code:&lt;/p>
&lt;p>&lt;a href="https://handshaketec.com/watch_configuration/">T-Watch-S3 configuration page&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://handshaketec.com/embed_configuration/">T-Embed configuration page&lt;/a>&lt;/p>
&lt;p>These are the help pages for the configuration pages:&lt;/p>
&lt;p>&lt;a href="https://handshaketec.com/watch_configuration_help/">T-Watch-S3 configuration help page&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://handshaketec.com/embed_configuration_help/">T-Embed configuration help page&lt;/a>&lt;/p>
&lt;p>Load the firmware onto the device using the &lt;a href="https://handshaketec.com/flash_device/">device flasher page&lt;/a>&lt;/p></description></item><item><title>HandShake T-Embed configuration</title><link>https://handshaketec.com/embed_configuration/</link><pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate><guid>https://handshaketec.com/embed_configuration/</guid><description>&lt;!-- HTMX loaded locally to avoid CDN dependency and improve performance -->
&lt;head>
&lt;script src="https://handshaketec.com/static/js/htmx.min.js">&lt;/script>

&lt;div id="backend-status-banner" role="alert" aria-live="assertive" hidden
 style="border:1px solid #b45309;border-left:4px solid #b45309;background:#fffbeb;
 color:#7c2d12;padding:0.85rem 1rem;border-radius:4px;margin:1rem 0;
 font-family:system-ui,-apple-system,'Segoe UI',sans-serif;line-height:1.5;">
 &lt;strong style="display:block;margin-bottom:0.25rem;">Cannot reach the server&lt;/strong>
 &lt;span>
 This page cannot contact the configuration service, so the controls below will
 not work. Check your connection and reload the page.
 &lt;/span>
&lt;/div>

&lt;script>
(function () {
 if (typeof htmx === 'undefined') {
 console.error('backend_status: htmx is not loaded yet — include this shortcode after the htmx script tag.');
 return;
 }

 
 
 
 
 
 htmx.config.responseHandling = [
 { code: '204', swap: false },
 { code: '[23]..', swap: true },
 { code: '5..', swap: true, error: true },
 { code: '[45]..', swap: false, error: true }
 ];

 
 document.body.addEventListener('htmx:sendError', function () {
 var banner = document.getElementById('backend-status-banner');
 if (banner) banner.hidden = false;
 });
})();
&lt;/script>


&lt;script>
window.csrfToken = null;
window.csrfTokenError = null;



document.addEventListener('htmx:configRequest', (event) => {
 if (window.csrfToken) {
 event.detail.headers['X-CSRFToken'] = window.csrfToken;
 }
});














window.sessionReady = fetch('/whoami', { signal: AbortSignal.timeout(10000) })
 .then(r => r.json().then(data => {
 if (!r.ok) throw Object.assign(new Error(data.error || `HTTP ${r.status}`), { data });
 return data;
 }));

window.sessionReady
 .then(() => fetch('/csrf_token', { signal: AbortSignal.timeout(10000) }))
 .then(r => {
 if (!r.ok) throw new Error(`HTTP ${r.status}`);
 return r.json();
 })
 .then(data => {
 window.csrfToken = data.csrf_token;
 
 document.body.dispatchEvent(new CustomEvent('session-ready'));
 })
 .catch(err => {
 console.error('Failed to initialize page:', err);
 window.csrfTokenError = err.message;
 const statusEl = document.getElementById('csrf-error');
 if (statusEl) {
 statusEl.textContent = 'Security error: Could not initialize. Please refresh the page.';
 statusEl.style.color = '#dc3545';
 statusEl.style.padding = '10px';
 statusEl.style.backgroundColor = '#ffe6e6';
 statusEl.style.marginBottom = '15px';
 statusEl.style.borderRadius = '4px';
 }
 });
&lt;/script>

&lt;/head>
&lt;h1 id="introduction">Introduction&lt;/h1>
&lt;p>HandShake configuration tool for the T-Embed device.&lt;/p>
&lt;div style="background-color: #fff3cd; border: 1px solid #ffc107; border-radius: 4px; padding: 15px; margin-bottom: 20px; color: #856404; border-left: 4px solid #ff9800;">
 &lt;strong>⚠️ Disclaimer:&lt;/strong> HandShake is free, open-source software provided as-is, with no warranty of any kind. It configures unmodified, manufacturer-certified hardware (Lilygo T-Watch S3 / T-Embed) that you purchase separately. Before relying on any device for communication access, test its switch response thoroughly with a professional (Occupational Therapist, Speech and Language Therapist, Technologist, experienced Carer). Report issues to &lt;a href="matt@mattoppenheim.com">matt@mattoppenheim.com&lt;/a>
&lt;/div>

&lt;div id="csrf-error">&lt;/div>
&lt;!-- shortcodes are in layouts/shortcodes -->

&lt;link rel="stylesheet" href="https://handshaketec.com/css/watch-configuration.css?v=3">

&lt;div class="session-box" id="session-box">
 &lt;h2>Your session name&lt;/h2>
 &lt;div class="session-name" id="session-name">…&lt;/div>
&lt;/div>

&lt;script type="module">
 import { SessionNameComponent } from '/js/components/session-name.js';
 new SessionNameComponent('session-box');
&lt;/script>

&lt;script>
(function () {
 function init() {
 const form = document.getElementById("mac_form_tembed");
 if (!form) return;

 const errorDiv = document.getElementById("mac-twatch-submit-error");
 const responseDiv = document.getElementById("mac_response_tembed");

 form.addEventListener('htmx:responseError', function () {
 if (errorDiv) errorDiv.style.display = 'block';
 });

 form.addEventListener('htmx:beforeRequest', function () {
 if (errorDiv) errorDiv.style.display = 'none';
 if (responseDiv) responseDiv.innerHTML = '';
 });
 }

 
 
 if (document.readyState === 'loading') {
 document.addEventListener('DOMContentLoaded', init);
 } else {
 init();
 }
})();
&lt;/script>

&lt;h1 id="audio-control-tembed">Audio Control&lt;/h1>

&lt;div class="audio-control-section">
 &lt;label for="audio-toggle-tembed" class="audio-label">Audio on shake:&lt;/label>
 &lt;div class="toggle-wrapper">
 &lt;div hx-get="/get_audio_input_tembed" hx-trigger="load, session-ready from:body" hx-swap="innerHTML" hx-on::afterSwap="htmx.process(this)">
 &lt;input type="checkbox" id="audio-toggle-tembed" name="audio_enabled" class="toggle-checkbox" hx-post="/submit_audio_tembed" hx-trigger="change" hx-target="#audio-response-tembed" hx-swap="innerHTML">
 &lt;/div>
 &lt;label for="audio-toggle-tembed" class="toggle-label">&lt;/label>
 &lt;/div>
 &lt;div id="audio-load-error" class="toggle-error" style="display:none;">
 ⚠️ Failed to load audio setting. Please refresh the page.
 &lt;/div>
 
 &lt;div id="audio-response-tembed" class="audio-response"
 hx-get="/get_audio_status_tembed" hx-trigger="load, session-ready from:body" hx-swap="innerHTML">&lt;/div>
&lt;/div>

&lt;style>
 .audio-control-section {
 padding: 1em;
 border: 1px solid #ddd;
 border-radius: 6px;
 background: #fafafa;
 margin-bottom: 1.5em;
 }

 .audio-label {
 display: block;
 margin-bottom: 0.5em;
 font-weight: bold;
 color: #333;
 }

 .toggle-wrapper {
 display: flex;
 align-items: center;
 gap: 1em;
 }

 .toggle-checkbox {
 appearance: none;
 -webkit-appearance: none;
 width: 50px;
 height: 28px;
 background: #ccc;
 border-radius: 14px;
 cursor: pointer;
 position: relative;
 outline: none;
 transition: background 0.3s ease;
 }

 .toggle-checkbox:checked {
 background: #4caf50;
 }

 .toggle-checkbox::before {
 content: '';
 position: absolute;
 width: 24px;
 height: 24px;
 border-radius: 50%;
 background: white;
 top: 2px;
 left: 2px;
 transition: left 0.3s ease;
 box-shadow: 0 2px 4px rgba(0,0,0,0.2);
 }

 .toggle-checkbox:checked::before {
 left: 24px;
 }

 .toggle-label {
 display: inline-block;
 cursor: pointer;
 }

 .audio-response {
 margin-top: 0.5em;
 font-size: 0.9em;
 }

 .audio-response.success {
 color: #4caf50;
 padding: 0.5em;
 background: #e8f5e9;
 border-radius: 4px;
 }

 .audio-response.error {
 color: #f44336;
 padding: 0.5em;
 background: #ffebee;
 border-radius: 4px;
 }

 .toggle-error {
 margin-top: 0.5em;
 padding: 0.75em;
 background-color: #fff3cd;
 color: #856404;
 border: 1px solid #ffc107;
 border-radius: 4px;
 font-size: 0.9em;
 }

 @media (prefers-color-scheme: dark) {
 .toggle-error {
 background-color: #664d03;
 color: #fff;
 border-color: #997404;
 }
 }
&lt;/style>


&lt;h1 id="keyboard-control-tembed">Keyboard Control&lt;/h1>

&lt;div class="keyboard-control-section">
 &lt;label for="keyboard-toggle-tembed" class="keyboard-label">USB keyboard on shake:&lt;/label>
 &lt;div class="toggle-wrapper">
 &lt;div hx-get="/get_keyboard_input_tembed" hx-trigger="load, session-ready from:body" hx-swap="innerHTML" hx-on::afterSwap="htmx.process(this)">
 &lt;input type="checkbox" id="keyboard-toggle-tembed" name="keyboard_enabled" class="toggle-checkbox" hx-post="/submit_keyboard_tembed" hx-trigger="change" hx-target="#keyboard-response-tembed" hx-swap="innerHTML">
 &lt;/div>
 &lt;label for="keyboard-toggle-tembed" class="toggle-label">&lt;/label>
 &lt;/div>
 &lt;div id="keyboard-load-error" class="toggle-error" style="display:none;">
 ⚠️ Failed to load keyboard setting. Please refresh the page.
 &lt;/div>
 
 &lt;div id="keyboard-response-tembed" class="keyboard-response"
 hx-get="/get_keyboard_status_tembed" hx-trigger="load, session-ready from:body" hx-swap="innerHTML">&lt;/div>

 
 &lt;label class="keyboard-label keyboard-key-label">Key sent on shake, when the keyboard is on:&lt;/label>
 &lt;div class="keyboard-key-options"
 hx-get="/get_keyboard_key_input_tembed" hx-trigger="load, session-ready from:body" hx-swap="innerHTML"
 hx-on::afterSwap="htmx.process(this)"
 hx-on::response-error="document.getElementById('keyboard-key-load-error').style.display='block'">
 &lt;/div>
 &lt;div id="keyboard-key-load-error" class="toggle-error" style="display:none;">
 ⚠️ Failed to load the key setting. Please refresh the page.
 &lt;/div>
 &lt;div id="keyboard-key-response-tembed" class="keyboard-response"
 hx-get="/get_keyboard_key_status_tembed" hx-trigger="load, session-ready from:body" hx-swap="innerHTML">&lt;/div>
&lt;/div>

&lt;style>
 .keyboard-control-section {
 padding: 1em;
 border: 1px solid #ddd;
 border-radius: 6px;
 background: #fafafa;
 margin-bottom: 1.5em;
 }

 .keyboard-label {
 display: block;
 margin-bottom: 0.5em;
 font-weight: bold;
 color: #333;
 }

 .keyboard-key-label {
 margin-top: 1em;
 }

 .keyboard-key-options {
 display: flex;
 flex-wrap: wrap;
 align-items: center;
 gap: 0.25em 1.5em;
 }

 
 .keyboard-key-option label {
 display: inline;
 margin-left: 0.3em;
 cursor: pointer;
 }

 .toggle-wrapper {
 display: flex;
 align-items: center;
 gap: 1em;
 }

 .toggle-checkbox {
 appearance: none;
 -webkit-appearance: none;
 width: 50px;
 height: 28px;
 background: #ccc;
 border-radius: 14px;
 cursor: pointer;
 position: relative;
 outline: none;
 transition: background 0.3s ease;
 }

 .toggle-checkbox:checked {
 background: #2196f3;
 }

 .toggle-checkbox::before {
 content: '';
 position: absolute;
 width: 24px;
 height: 24px;
 border-radius: 50%;
 background: white;
 top: 2px;
 left: 2px;
 transition: left 0.3s ease;
 box-shadow: 0 2px 4px rgba(0,0,0,0.2);
 }

 .toggle-checkbox:checked::before {
 left: 24px;
 }

 .toggle-label {
 display: inline-block;
 cursor: pointer;
 }

 .keyboard-response {
 margin-top: 0.5em;
 font-size: 0.9em;
 }

 .keyboard-response.success {
 color: #2196f3;
 padding: 0.5em;
 background: #e3f2fd;
 border-radius: 4px;
 }

 .keyboard-response.error {
 color: #f44336;
 padding: 0.5em;
 background: #ffebee;
 border-radius: 4px;
 }

 .toggle-error {
 margin-top: 0.5em;
 padding: 0.75em;
 background-color: #fff3cd;
 color: #856404;
 border: 1px solid #ffc107;
 border-radius: 4px;
 font-size: 0.9em;
 }

 @media (prefers-color-scheme: dark) {
 .toggle-error {
 background-color: #664d03;
 color: #fff;
 border-color: #997404;
 }
 }
&lt;/style>


&lt;h1 id="esp-now-mac-address-configuration-tembed">Enter MAC Address for the Paired T-Watch&lt;/h1>

&lt;div id="esp-now-mac-tembed-component">
 &lt;form hx-target="#mac_submit_response_tembed" hx-post="/submit_mac_tembed" hx-swap="innerHTML" hx-on::after-request="htmx.ajax('GET', '/get_mac_status_tembed', {target: '#mac_response_tembed', swap: 'innerHTML'})" id="mac_form_tembed">
 &lt;label for="mac_address_tembed">T-Watch MAC Address (e.g. AA:BB:CC:DD:EE:FF or AABBCCDDEEFF):&lt;/label>&lt;br>
 &lt;div hx-get="/get_mac_input_tembed" hx-trigger="load, session-ready from:body" hx-swap="innerHTML" hx-on::response-error="document.getElementById('mac-twatch-load-error').style.display='block'">
 &lt;input type="text" name="mac_address" id="mac_address_tembed" class="mac-address-input" required
 maxlength="23" placeholder="AA:BB:CC:DD:EE:FF or AABBCCDDEEFF" style="margin-top: 10px;">
 &lt;/div>
 &lt;div id="mac-twatch-load-error" class="control-error" style="display:none; margin-top: 10px;">
 ⚠️ Failed to load MAC address field. Please refresh the page.
 &lt;/div>
 &lt;div id="mac-twatch-submit-error" class="control-error" style="display:none; margin-top: 10px;">
 ⚠️ Invalid MAC address. Please enter a valid address (e.g., AA:BB:CC:DD:EE:FF).
 &lt;/div>
 &lt;br>
 &lt;input type="submit" value="Submit MAC" class="button-primary">
 &lt;/form>
 &lt;div id="mac_submit_response_tembed" style="display: none;">&lt;/div>
 &lt;div id="mac_response_tembed" hx-get="/get_mac_status_tembed" hx-trigger="load, session-ready from:body" hx-swap="innerHTML">&lt;/div>

&lt;style>
 .control-error {
 padding: 0.75em;
 background-color: #fff3cd;
 color: #856404;
 border: 1px solid #ffc107;
 border-radius: 4px;
 font-size: 0.9em;
 }

 #mac_response_tembed {
 margin-top: 10px;
 font-size: 0.9em;
 color: #333;
 }

 @media (prefers-color-scheme: dark) {
 .control-error {
 background-color: #664d03;
 color: #fff;
 border-color: #997404;
 }
 #mac_response_tembed {
 color: #e0e0e0;
 }
 }
&lt;/style>
&lt;/div>



&lt;h1>Generate T-Embed Firmware&lt;/h1>

&lt;div id="generate-container-tembed">
 &lt;button
 id="generate-btn-tembed"
 hx-post="/generate_firmware_tembed"
 hx-trigger="click"
 hx-swap="none"
 class="generate-button"
 hx-on::after-request="window.onGenerateRequestFinishedTembed?.(event)"
 >
 Generate Firmware
 &lt;/button>
 
 &lt;span id="firmware-version-tembed" hx-get="/get_firmware_version_tembed" hx-trigger="load" hx-swap="innerHTML">&lt;/span>

 &lt;p id="other-build-note-tembed" class="build-note" hidden>&lt;/p>

 &lt;div id="throbber-tembed" style="display:none; margin-top:10px;">
 &lt;div class="spinner">&lt;/div>
 &lt;p>Building T-Embed firmware, please wait...&lt;/p>
 &lt;/div>

 &lt;div id="output-box-tembed" style="display:none; margin-top:10px;">
 &lt;div class="output-container">
 &lt;h3>Build Output:&lt;/h3>
 &lt;pre id="output-text-tembed" class="output-text">&lt;/pre>
 &lt;div id="build-result-tembed">&lt;/div>
 &lt;/div>
 &lt;/div>
&lt;/div>


&lt;script type="module">
 import { GenerateFirmwareComponent } from '/js/components/generate-firmware.js?v=3';

 
 console.log('Checking elements:');
 console.log('generate-container-tembed:', !!document.getElementById('generate-container-tembed'));
 console.log('output-box-tembed:', !!document.getElementById('output-box-tembed'));
 console.log('throbber-tembed:', !!document.getElementById('throbber-tembed'));
 console.log('output-text-tembed:', !!document.getElementById('output-text-tembed'));

 new GenerateFirmwareComponent('generate-container-tembed', 'tembed');
&lt;/script>

&lt;h1>Download T-Embed Firmware&lt;/h1>

&lt;div id="download-elf-container-tembed">
 
 &lt;div
 id="elf-check-container-tembed"
 hx-get="/check_elf_tembed"
 hx-trigger="load, refreshDownload from:body"
 hx-swap="innerHTML"
 hx-on::response-error="document.getElementById('download-elf-tembed-load-error').style.display='block'"
 >
 &lt;p>Checking for firmware file...&lt;/p>
 &lt;/div>
 &lt;div id="download-elf-tembed-load-error" class="control-error" style="display:none; margin-top: 10px;">
 ⚠️ Failed to check firmware file. Please refresh the page.
 &lt;/div>
&lt;/div>

&lt;style>
 .download-button {
 padding: 10px 20px;
 font-size: 16px;
 background-color: #28a745;
 color: white;
 border: none;
 border-radius: 5px;
 cursor: pointer;
 transition: background-color 0.3s;
 text-decoration: none;
 display: inline-block;
 }

 .download-button:hover {
 background-color: #218838;
 }

 .download-button:active {
 background-color: #1e7e34;
 }

 .file-info {
 margin-top: 10px;
 padding: 10px;
 background-color: #f8f9fa;
 border: 1px solid #dee2e6;
 border-radius: 5px;
 font-size: 14px;
 color: #495057;
 }

 .no-file-message {
 color: #6c757d;
 font-style: italic;
 }

 .control-error {
 padding: 0.75em;
 background-color: #fff3cd;
 color: #856404;
 border: 1px solid #ffc107;
 border-radius: 4px;
 font-size: 0.9em;
 }

 @media (prefers-color-scheme: dark) {
 .control-error {
 background-color: #664d03;
 color: #fff;
 border-color: #997404;
 }
 }
&lt;/style>
</description></item><item><title>HandShake T-Watch S3 configuration</title><link>https://handshaketec.com/watch_configuration/</link><pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate><guid>https://handshaketec.com/watch_configuration/</guid><description>&lt;!-- HTMX loaded locally to avoid CDN dependency and improve performance -->
&lt;head>
&lt;script src="https://handshaketec.com/static/js/htmx.min.js">&lt;/script>

&lt;div id="backend-status-banner" role="alert" aria-live="assertive" hidden
 style="border:1px solid #b45309;border-left:4px solid #b45309;background:#fffbeb;
 color:#7c2d12;padding:0.85rem 1rem;border-radius:4px;margin:1rem 0;
 font-family:system-ui,-apple-system,'Segoe UI',sans-serif;line-height:1.5;">
 &lt;strong style="display:block;margin-bottom:0.25rem;">Cannot reach the server&lt;/strong>
 &lt;span>
 This page cannot contact the configuration service, so the controls below will
 not work. Check your connection and reload the page.
 &lt;/span>
&lt;/div>

&lt;script>
(function () {
 if (typeof htmx === 'undefined') {
 console.error('backend_status: htmx is not loaded yet — include this shortcode after the htmx script tag.');
 return;
 }

 
 
 
 
 
 htmx.config.responseHandling = [
 { code: '204', swap: false },
 { code: '[23]..', swap: true },
 { code: '5..', swap: true, error: true },
 { code: '[45]..', swap: false, error: true }
 ];

 
 document.body.addEventListener('htmx:sendError', function () {
 var banner = document.getElementById('backend-status-banner');
 if (banner) banner.hidden = false;
 });
})();
&lt;/script>


&lt;script>
window.csrfToken = null;
window.csrfTokenError = null;



document.addEventListener('htmx:configRequest', (event) => {
 if (window.csrfToken) {
 event.detail.headers['X-CSRFToken'] = window.csrfToken;
 }
});














window.sessionReady = fetch('/whoami', { signal: AbortSignal.timeout(10000) })
 .then(r => r.json().then(data => {
 if (!r.ok) throw Object.assign(new Error(data.error || `HTTP ${r.status}`), { data });
 return data;
 }));

window.sessionReady
 .then(() => fetch('/csrf_token', { signal: AbortSignal.timeout(10000) }))
 .then(r => {
 if (!r.ok) throw new Error(`HTTP ${r.status}`);
 return r.json();
 })
 .then(data => {
 window.csrfToken = data.csrf_token;
 
 document.body.dispatchEvent(new CustomEvent('session-ready'));
 })
 .catch(err => {
 console.error('Failed to initialize page:', err);
 window.csrfTokenError = err.message;
 const statusEl = document.getElementById('csrf-error');
 if (statusEl) {
 statusEl.textContent = 'Security error: Could not initialize. Please refresh the page.';
 statusEl.style.color = '#dc3545';
 statusEl.style.padding = '10px';
 statusEl.style.backgroundColor = '#ffe6e6';
 statusEl.style.marginBottom = '15px';
 statusEl.style.borderRadius = '4px';
 }
 });
&lt;/script>

&lt;/head>
&lt;h1 id="introduction">Introduction&lt;/h1>
&lt;p>HandShake configuration tool for the T-Watch S3.&lt;/p>
&lt;div style="background-color: #fff3cd; border: 1px solid #ffc107; border-radius: 4px; padding: 15px; margin-bottom: 20px; color: #856404; border-left: 4px solid #ff9800;">
 &lt;strong>⚠️ Disclaimer:&lt;/strong> HandShake is free, open-source software provided as-is, with no warranty of any kind. It configures unmodified, manufacturer-certified hardware (Lilygo T-Watch S3 / T-Embed) that you purchase separately. Before relying on any device for communication access, test its switch response thoroughly with a professional (Occupational Therapist, Speech and Language Therapist, Technologist, experienced Carer). Report issues to &lt;a href="matt@mattoppenheim.com">matt@mattoppenheim.com&lt;/a>
&lt;/div>

&lt;div id="csrf-error">&lt;/div>
&lt;!-- shortcodes are in layouts/shortcodes -->

&lt;link rel="stylesheet" href="https://handshaketec.com/css/watch-configuration.css?v=3">

&lt;div class="session-box" id="session-box">
 &lt;h2>Your session name&lt;/h2>
 &lt;div class="session-name" id="session-name">…&lt;/div>
&lt;/div>

&lt;script type="module">
 import { SessionNameComponent } from '/js/components/session-name.js';
 new SessionNameComponent('session-box');
&lt;/script>

&lt;script>
(function () {
 function init() {
 const form = document.getElementById("mac_form");
 if (!form) return;

 const errorDiv = document.getElementById("mac-embed-submit-error");
 const responseDiv = document.getElementById("mac_response");

 form.addEventListener('htmx:responseError', function () {
 if (errorDiv) errorDiv.style.display = 'block';
 });

 form.addEventListener('htmx:beforeRequest', function () {
 if (errorDiv) errorDiv.style.display = 'none';
 if (responseDiv) responseDiv.innerHTML = '';
 });
 }

 
 
 if (document.readyState === 'loading') {
 document.addEventListener('DOMContentLoaded', init);
 } else {
 init();
 }
})();
&lt;/script>

&lt;h1 id="gesture-selection">Gesture Selection&lt;/h1>

&lt;form id="gesture_to_detect">
 
 &lt;div hx-get="/get_gesture_selection_input"
 hx-trigger="load, session-ready from:body"
 hx-swap="innerHTML"
 hx-on::afterSwap="htmx.process(this)"
 hx-on::response-error="document.getElementById('gesture-load-error').style.display='block'">
 &lt;/div>
 &lt;div id="gesture-load-error" class="control-error" style="display:none; margin-top: 10px;">
 ⚠️ Failed to load gesture control. Please refresh the page.
 &lt;/div>
&lt;/form>


&lt;div id="gesture_response"
 hx-get="/get_gesture_status" hx-trigger="load, session-ready from:body" hx-swap="innerHTML">&lt;/div>

&lt;style>
 .control-error {
 padding: 0.75em;
 background-color: #fff3cd;
 color: #856404;
 border: 1px solid #ffc107;
 border-radius: 4px;
 font-size: 0.9em;
 }

 @media (prefers-color-scheme: dark) {
 .control-error {
 background-color: #664d03;
 color: #fff;
 border-color: #997404;
 }
 }
&lt;/style>



&lt;h1 id="gesture-sensitivity-control">Gesture Sensitivity Control&lt;/h1>

&lt;form id="sensitivity_form">
 &lt;label for="gesture_sensitivity">Trigger threshold (580-900):&lt;/label>&lt;br>
 &lt;div style="display: flex; align-items: center; gap: 1em; margin-top: 10px;">
 &lt;span style="font-size: 0.9em; color: #666; min-width: 50px;">softer shake&lt;/span>
 &lt;div style="min-width: 200px;">
 &lt;div hx-get="/get_gesture_sensitivity_input" hx-trigger="load, session-ready from:body" hx-swap="innerHTML" hx-on::afterSwap="htmx.process(this)" hx-on::response-error="document.getElementById('sensitivity-load-error').style.display='block'" style="display: flex; flex: 1; min-width: 200px;">
 &lt;input type="range" id="gesture_sensitivity" name="gesture_sensitivity" style="flex: 1; min-width: 200px;">
 &lt;/div>
 &lt;div style="position: relative; height: 1.5em; margin-top: 0.25em; font-size: 0.75em; color: #999;">
 &lt;span style="position: absolute; left: 0%; transform: translateX(-50%);">580&lt;/span>
 &lt;span style="position: absolute; left: 37.5%; transform: translateX(-50%);">700&lt;/span>
 &lt;span style="position: absolute; left: 68.75%; transform: translateX(-50%);">800&lt;/span>
 &lt;span style="position: absolute; left: 100%; transform: translateX(-50%);">900&lt;/span>
 &lt;/div>
 &lt;/div>
 &lt;span style="font-size: 0.9em; color: #666; min-width: 50px;">harder shake&lt;/span>
 &lt;/div>
 &lt;div id="sensitivity-load-error" class="control-error" style="display:none; margin-top: 10px;">
 ⚠️ Failed to load sensitivity control. Please refresh the page.
 &lt;/div>
 &lt;br>&lt;br>
&lt;/form>

&lt;div id="sensitivity_response"
 hx-get="/get_gesture_sensitivity_status" hx-trigger="load, session-ready from:body" hx-swap="innerHTML">&lt;/div>

&lt;style>
 .control-error {
 padding: 0.75em;
 background-color: #fff3cd;
 color: #856404;
 border: 1px solid #ffc107;
 border-radius: 4px;
 font-size: 0.9em;
 }

 @media (prefers-color-scheme: dark) {
 .control-error {
 background-color: #664d03;
 color: #fff;
 border-color: #997404;
 }
 }
&lt;/style>



&lt;h1 id="min-shake-interval-control">Minimum Shake Interval Control&lt;/h1>

&lt;form id="shake_interval_form">
 &lt;label for="min_shake_interval">Minimum Intershake Interval (ms) (0-1000):&lt;/label>&lt;br>
 &lt;div style="display: flex; align-items: center; gap: 1em; margin-top: 10px;">
 &lt;span style="font-size: 0.9em; color: #666; min-width: 50px;">&lt;/span>
 &lt;div style="min-width: 200px;">
 &lt;div hx-get="/get_twatch_config_input" hx-trigger="load, session-ready from:body" hx-swap="innerHTML" hx-on::afterSwap="htmx.process(this)" hx-on::response-error="document.getElementById('shake-load-error').style.display='block'" style="display: flex; flex: 1; min-width: 200px;">
 &lt;input type="range" id="min_shake_interval" name="min_shake_interval" style="flex: 1; min-width: 200px;">
 &lt;/div>
 &lt;div style="position: relative; height: 1.5em; margin-top: 0.25em; font-size: 0.75em; color: #999;">
 &lt;span style="position: absolute; left: 0%; transform: translateX(-50%);">0&lt;/span>
 &lt;span style="position: absolute; left: 25%; transform: translateX(-50%);">250&lt;/span>
 &lt;span style="position: absolute; left: 50%; transform: translateX(-50%);">500&lt;/span>
 &lt;span style="position: absolute; left: 75%; transform: translateX(-50%);">750&lt;/span>
 &lt;span style="position: absolute; left: 100%; transform: translateX(-50%);">1000&lt;/span>
 &lt;/div>
 &lt;/div>
 &lt;span style="font-size: 0.9em; color: #666; min-width: 50px;">&lt;/span>
 &lt;/div>
 &lt;div id="shake-load-error" class="control-error" style="display:none; margin-top: 10px;">
 ⚠️ Failed to load shake interval control. Please refresh the page.
 &lt;/div>
 &lt;br>&lt;br>
&lt;/form>

&lt;div id="shake_interval_response"
 hx-get="/get_shake_interval_status" hx-trigger="load, session-ready from:body" hx-swap="innerHTML">&lt;/div>

&lt;style>
 .control-error {
 padding: 0.75em;
 background-color: #fff3cd;
 color: #856404;
 border: 1px solid #ffc107;
 border-radius: 4px;
 font-size: 0.9em;
 }

 @media (prefers-color-scheme: dark) {
 .control-error {
 background-color: #664d03;
 color: #fff;
 border-color: #997404;
 }
 }
&lt;/style>



&lt;h1 id="esp-now-mac-address-configuration">Enter MAC Address for the T-Embed&lt;/h1>

&lt;div id="esp-now-mac-component">
 &lt;form hx-target="#mac_submit_response" hx-post="/submit_mac" hx-swap="innerHTML" hx-on::after-request="htmx.ajax('GET', '/get_mac_status', {target: '#mac_response', swap: 'innerHTML'})" id="mac_form">
 &lt;label for="mac_address">T-Embed MAC Address (e.g. AA:BB:CC:DD:EE:FF or AABBCCDDEEFF):&lt;/label>&lt;br>
 &lt;div hx-get="/get_mac_input" hx-trigger="load, session-ready from:body" hx-swap="innerHTML">
 &lt;input type="text" name="mac_address" id="mac_address" class="mac-address-input" required
 maxlength="23" placeholder="AA:BB:CC:DD:EE:FF or AABBCCDDEEFF" style="margin-top: 10px;">
 &lt;/div>
 &lt;div id="mac-embed-load-error" class="control-error" style="display:none; margin-top: 10px;">
 ⚠️ Failed to load MAC address field. Please refresh the page.
 &lt;/div>
 &lt;div id="mac-embed-submit-error" class="control-error" style="display:none; margin-top: 10px;">
 ⚠️ Invalid MAC address. Please enter a valid address (e.g., AA:BB:CC:DD:EE:FF).
 &lt;/div>
 &lt;br>
 &lt;input type="submit" value="Submit MAC" class="button-primary">
 &lt;/form>
 &lt;div id="mac_submit_response" style="display: none;">&lt;/div>
 &lt;div id="mac_response" hx-get="/get_mac_status" hx-trigger="load, session-ready from:body" hx-swap="innerHTML">&lt;/div>

&lt;style>
 .control-error {
 padding: 0.75em;
 background-color: #fff3cd;
 color: #856404;
 border: 1px solid #ffc107;
 border-radius: 4px;
 font-size: 0.9em;
 }

 #mac_response {
 margin-top: 10px;
 font-size: 0.9em;
 color: #333;
 }

 @media (prefers-color-scheme: dark) {
 .control-error {
 background-color: #664d03;
 color: #fff;
 border-color: #997404;
 }
 #mac_response {
 color: #e0e0e0;
 }
 }
&lt;/style>
&lt;/div>



&lt;h1>Generate Firmware&lt;/h1>

&lt;div id="generate-container">
 &lt;button
 id="generate-btn"
 hx-post="/generate_firmware"
 hx-trigger="click"
 hx-swap="none"
 class="generate-button"
 hx-on::after-request="window.onGenerateRequestFinished?.(event)"
 >
 Generate Firmware
 &lt;/button>
 
 &lt;span id="firmware-version" hx-get="/get_firmware_version_twatchs3" hx-trigger="load" hx-swap="innerHTML">&lt;/span>

 &lt;p id="other-build-note" class="build-note" hidden>&lt;/p>

 &lt;div id="throbber" style="display:none; margin-top:10px;">
 &lt;div class="spinner">&lt;/div>
 &lt;p>Building firmware, please wait...&lt;/p>
 &lt;/div>

 &lt;div id="output-box" style="display:none; margin-top:10px;">
 &lt;div class="output-container">
 &lt;h3>Build Output:&lt;/h3>
 &lt;pre id="output-text" class="output-text">&lt;/pre>
 &lt;div id="build-result">&lt;/div>
 &lt;/div>
 &lt;/div>
&lt;/div>


&lt;script type="module">
 import { GenerateFirmwareComponent } from '/js/components/generate-firmware.js?v=3';
 new GenerateFirmwareComponent('generate-container');
&lt;/script>

&lt;h1>Download Firmware&lt;/h1>

&lt;div id="download-elf-container">
 
 &lt;div
 id="elf-check-container"
 hx-get="/check_elf"
 hx-trigger="load, refreshDownload from:body"
 hx-swap="innerHTML"
 hx-on::response-error="document.getElementById('download-elf-load-error').style.display='block'"
 >
 &lt;p>Checking for firmware file...&lt;/p>
 &lt;/div>
 &lt;div id="download-elf-load-error" class="control-error" style="display:none; margin-top: 10px;">
 ⚠️ Failed to check firmware file. Please refresh the page.
 &lt;/div>
&lt;/div>

&lt;style>
 .download-button {
 padding: 10px 20px;
 font-size: 16px;
 background-color: #28a745;
 color: white;
 border: none;
 border-radius: 5px;
 cursor: pointer;
 transition: background-color 0.3s;
 text-decoration: none;
 display: inline-block;
 }
 
 .download-button:hover {
 background-color: #218838;
 }
 
 .download-button:active {
 background-color: #1e7e34;
 }
 
 .file-info {
 margin-top: 10px;
 padding: 10px;
 background-color: #f8f9fa;
 border: 1px solid #dee2e6;
 border-radius: 5px;
 font-size: 14px;
 color: #495057;
 }
 
 .no-file-message {
 color: #6c757d;
 font-style: italic;
 }

 .control-error {
 padding: 0.75em;
 background-color: #fff3cd;
 color: #856404;
 border: 1px solid #ffc107;
 border-radius: 4px;
 font-size: 0.9em;
 }

 @media (prefers-color-scheme: dark) {
 .control-error {
 background-color: #664d03;
 color: #fff;
 border-color: #997404;
 }
 }
&lt;/style>
</description></item></channel></rss>