{"id":547,"date":"2026-09-26T21:21:14","date_gmt":"2026-09-26T20:21:14","guid":{"rendered":"https:\/\/www.fabidouille.com\/?p=547"},"modified":"2026-10-25T19:48:23","modified_gmt":"2026-10-25T18:48:23","slug":"lunii-stories","status":"publish","type":"post","link":"https:\/\/www.fabidouille.com\/?p=547","title":{"rendered":"A Fabrique of One&rsquo;s Own: Homebrew Stories for a Closed Box"},"content":{"rendered":"<p>Someone threw this Lunii \u00ab\u00a0Ma Fabrique \u00e0 Histoires\u00a0\u00bb in the trash because its selection wheel was broken. I took it home.<\/p>\n<p>One resoldered knob and one new regulator later, it works again. And it now plays a story that no shop sells: made at home, about our own village, read with my own voice.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/device.jpg\" alt=\"The Lunii V2 story box held in hand, its small screen showing a helicopter, next to the big yellow selection wheel and the home, pause and OK buttons\"\/><figcaption>The box, working. The name label is pixelated on purpose.<\/figcaption><\/figure>\n<h2 class=\"wp-block-heading\">The repair<\/h2>\n<p>First the wheel: a broken solder joint on the knob, resoldered. Then, a few stories later, the box started to show NO SD CARD. Merci du cadeau.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/opened.jpg\" alt=\"The Lunii taken apart on a blue silicone repair mat, the back shell covered in character stickers\"\/><figcaption>Just out of the bin, with all its stickers.<\/figcaption><\/figure>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/board.jpg\" alt=\"The Lunii V2 with its case open: green board with an ST ARM microcontroller in the middle, the microSD socket at its lower left, USB-C and headphone jack at the top, and the speaker on the right\"\/><figcaption>Inside: microcontroller in the middle, microSD socket on its left, USB-C and jack at the top, speaker on the right.<\/figcaption><\/figure>\n<p>The 3.3 V rail was at 2.5 V. The regulator, an AP7362-33, had its ground pin not soldered to the board.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/regulator.jpg\" alt=\"A new AP7362-33 voltage regulator, eight pins, still in its tape\"\/><figcaption>The new AP7362-33.<\/figcaption><\/figure>\n<p>The fix: a new regulator, plus a small wire from its ground pin to the USB-C connector ground. Kapton tape first, because hot air also heats what is next to the part.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/bench.jpg\" alt=\"Left: the electronics bench with a hot air station, soldering station, fume extractor and a magnifier lamp. Right: the Lunii board seen through the magnifier\"\/><figcaption>The bench, and the board under the magnifier.<\/figcaption><\/figure>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/kapton.jpg\" alt=\"The Lunii board inside its shell, almost entirely covered with amber Kapton tape\"\/><figcaption>Kapton tape on everything that must not get hot.<\/figcaption><\/figure>\n<p>3.3 V again. It boots.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/running.gif\" alt=\"Animated: the opened Lunii box running on the bench, its screen showing the character selection\"\/><figcaption>Case still open, and working.<\/figcaption><\/figure>\n<p>Then a cleaning: stickers removed with hot air and a scalpel, shells washed with 99.9 % isopropanol.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/cleanup.jpg\" alt=\"Left: removed stickers next to a hot air gun and tools. Right: the two shell halves drying next to a bottle of 99.9 percent isopropanol\"\/><figcaption>Stickers off, shells washed.<\/figcaption><\/figure>\n<h2 class=\"wp-block-heading\">The format<\/h2>\n<p>There is no official way to add your own stories. Thanks to the work of the community, here is what a V2 box wants:<\/p>\n<ul class=\"wp-block-list\">\n<li>Content encrypted with XXTEA (the V3 uses AES-128)<\/li>\n<li>A key made from the box&rsquo;s own <code>.md<\/code> file (512 bytes on a V2): a story pack plays on one box only<\/li>\n<li>MP3, mono, 44.1 kHz, no ID3 tag at all, and 300 ms of silence at the start (if not, the first word is cut)<\/li>\n<li>Images: 320 x 240, 16 levels of grey, BMP RLE4<\/li>\n<li>The pack itself: small binary files called <code>ni<\/code>, <code>li<\/code>, <code>ri<\/code>, <code>si<\/code>, <code>bt<\/code>, <code>nm<\/code>, plus folders <code>rf\/<\/code> (images) and <code>sf\/<\/code> (sounds)<\/li>\n<li>A <code>.pi<\/code> index file that sets the order of the stories on the wheel<\/li>\n<\/ul>\n<p>One small mistake, and the story does not play.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/sd-socket.jpg\" alt=\"Close-up of the Lunii board: the microSD socket next to the ST ARM microcontroller\"\/><figcaption>The microSD card holds all the stories.<\/figcaption><\/figure>\n<h2 class=\"wp-block-heading\">The pipeline<\/h2>\n<ol class=\"wp-block-list\">\n<li>The story: I took photos of places in our village and gave them to an AI agent, with a brief file (<code>STORY_CREATION_PROMPT.md<\/code>) that explains the format. It wrote a tree of 3 places x 3 companions = 9 branches of 7 sentences each: real places and real habits, turned into children&rsquo;s stories.<\/li>\n<li>The narration is my voice, cloned by a model running locally. The clone reads better than I do. Vexant. Missing lines use a standard TTS voice (edge-tts, fr-FR-DeniseNeural).<\/li>\n<li>The images come from Google Imagen 4, always with the same style prompt:<\/li>\n<\/ol>\n<pre class=\"wp-block-code\"><code>Minimalist white silhouette of {subject} on a solid black background,\nflat 2D icon style, high contrast, no writing, no text, no words<\/code><\/pre>\n<p>Then converted to 320 x 240, 16 greys, RLE4. Same images are kept once (MD5), so the whole story uses only 9 images.<\/p>\n<ol class=\"wp-block-list\" start=\"4\">\n<li>A script builds the pack and encrypts it with XXTEA. Another one finds the SD card (<code>lsblk<\/code>), copies the files, updates the <code>.pi<\/code> index, checks and unmounts. A third one puts everything back as before.<\/li>\n<\/ol>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.fabidouille.com\/wp-content\/uploads\/2026\/09\/story.gif\" alt=\"Animated, silent: the finished custom story playing on the Lunii, an opening screen, then a place to choose, then a companion\"\/><figcaption>The finished story, without sound on purpose.<\/figcaption><\/figure>\n<h2 class=\"wp-block-heading\">How AI was used<\/h2>\n<p>Almost everywhere, and that is the fun part:<\/p>\n<ul class=\"wp-block-list\">\n<li>the story text: an AI agent, from my photos and my brief<\/li>\n<li>the images: Google Imagen 4<\/li>\n<li>the voice: my own voice, cloned by a local model<\/li>\n<li>the code (compiler, encryption, deployment): written with an AI coding agent (Claude Code), from the community documentation of the format<\/li>\n<\/ul>\n<p>My part: the photos, the choices, the soldering iron, and checking every story before it reaches the box.<\/p>\n<p>Note: I don&rsquo;t have much time for the blog these days, so this post was written with the help of an AI, from my own notes, then read and corrected by me. Better to share the content this way than not at all.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Lunii story box found in the trash, a new regulator, and a home-made bedtime story about our village, with my voice.<\/p>\n","protected":false},"author":0,"featured_media":537,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-547","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-non-classe"],"_links":{"self":[{"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=\/wp\/v2\/posts\/547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=547"}],"version-history":[{"count":5,"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=\/wp\/v2\/posts\/547\/revisions"}],"predecessor-version":[{"id":625,"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=\/wp\/v2\/posts\/547\/revisions\/625"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=\/wp\/v2\/media\/537"}],"wp:attachment":[{"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fabidouille.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}