morse-code / README.md
RemiFabre
fix: drop repo OAuth scopes β€” app touches no HF repos
64dc954
|
Raw
History Blame Contribute Delete
3.29 kB
metadata
title: Morse Code
emoji: πŸ“‘
colorFrom: blue
colorTo: purple
sdk: static
pinned: false
hf_oauth: true
hf_oauth_expiration_minutes: 480
short_description: Talk to Reachy Mini in Morse β€” taps, beeps, mic decode.
tags:
  - reachy_mini
  - reachy_mini_js_app

Morse Code

Make your Reachy Mini speak and understand Morse code. The robot transmits by clapping its antennas together β€” each hit is an audible click. Your phone or laptop can transmit too, with beeps. Either device (or a second Reachy Mini sitting across the table) listens through its microphone, detects the hits, and decodes them back to text in real time.

Open the Space URL, sign in with Hugging Face, pick your robot. No install.

Three tabs

  • Compose β€” type a message, see its Morse, and pick who sends it: the robot's antennas or this device's speaker. Watch it transmit.
  • Listen β€” turn on the mic and decode incoming clicks/beeps live, with a scope that drops a marker on every detected hit.
  • Learn β€” the letter ↔ rhythm chart. Tap any tile to feel the rhythm (a letter is just a pattern of short and long beats).

How it works (the impulse wire code)

An antenna hit is impulsive β€” one short click. You can't hold a click long the way you hold a tone, so classic "short tone = dot, long tone = dash" can't work on the robot. Instead every channel here uses one onset-only code so a tapping robot, a beeping phone, and a second robot are all mutually intelligible through a single detector:

  • dot = one impulse
  • dash = a quick double-tap (two impulses)
  • letters and words are separated by progressively longer gaps

It's still real Morse β€” the Learn chart shows the standard ·– patterns β€” just carried as a rhythm of hits instead of tone length.

Detection is a transient-onset detector (high-pass β†’ short-term energy β†’ spectral flux β†’ peak pick) ported from the Marionette audio-sync tests and validated end-to-end against synthetic audio (npm test). All timing and detection thresholds live in Settings, so the robot clap and mic sensitivity can be calibrated on real hardware without code changes.

Develop

npm install
npm test          # unit tests: morse codec, wire code, detector round-trip
npm run test:e2e  # playwright (optional)

No build step β€” sdk: static, the host shell + SDK load from jsDelivr. Local dev: serve the folder (e.g. python3 -m http.server) and open with a ?embedded=1-capable dev token, or just push to the Space.

SDK pin

@pollen-robotics/reachy-mini-sdk@1.8.0-rc1-main.dbe26af, pinned in three places that must stay in sync: the two modulepreload links in index.html, the two import URLs in main.js, and the re-export in lib/animation-helpers.js.

Credits

Built for Reachy Mini by Pollen Robotics. Antenna-collision recipe and the transient detector adapted from the Marionette project.