Kiboku is an ancient Japanese divination ritual in which heated turtle shells were used to seek guidance from the gods by interpreting the patterns of cracks appearing on the shell.
I created an IoT gadget that reimagines this traditional practice as a safe and personal interactive experience for everyday life.
Instead of using a real turtle shell and fire, this device uses a shell-shaped interface with LEDs. By simply placing your hand over the device, you can start the experience. The LED patterns represent symbolic cracks on the shell, creating a modern interpretation of the traditional ritual.
The device then uses AI to generate a positive fortune message, which is converted into speech and played through the built-in speaker. Each message is designed to encourage and inspire the user.
Start your morning by placing your hand over the shell, receiving a positive message, and beginning your day with a brighter mindset.
2. IntroductionI have always been fascinated by Kiboku, an ancient Japanese divination ritual that uses a turtle shell to seek insight from the future.
Traditional Kiboku, however, is not easy to experience in everyday life. It requires a real turtle shell, the use of fire, and specialized knowledge to interpret the patterns created by cracks on the shell. These requirements make it difficult to practice as a personal and casual experience.
I wanted to transform this traditional ritual into a modern interactive experience — something that anyone could enjoy safely in daily life, while receiving a small moment of positivity and inspiration.
This project reimagines Kiboku as an IoT device. Instead of using fire and real cracks, a turtle-shell-inspired interface with LEDs creates unique glowing patterns when a user places their hand above the device. The device then uses AI to generate a personalized positive message and speaks it back to the user.
The idea of a glowing turtle shell was inspired by Cassiopeia, the magical turtle character from Michael Ende's novel Momo. In the story, Cassiopeia communicates by displaying words on her shell instead of speaking. She also has the ability to know a little about the future, which made her a perfect inspiration for this interactive fortune experience.
By combining ancient Japanese culture, imaginative storytelling, AI, and IoT technology, I created a new way to interact with a traditional idea and start the day with a positive feeling.
3. How It Works- Connect the device to a USB power source to enter standby mode. In standby mode, the LED lights on the top of the device slowly pulse, indicating that the gadget is ready.
- When a user places their hand above the gadget, the distance sensor mounted on the top detects the hand and starts the fortune experience.The top LEDs turn red to indicate that the divination process has begun.
- As the fortune pattern, 5 to 7 LEDs are randomly selected from the 49 LEDs arranged on the shell-like surface, and each LED is assigned a randomly selected color. In addition to random patterns, several special predefined patterns are also prepared.
- After the LED pattern has been displayed, the microcontroller connects to OpenAI via Wi-Fi. OpenAI generates a positive fortune message, converts it into speech audio, and sends the audio data back to the device.
- The microcontroller receives the audio data and plays it through the built-in speaker, allowing the user to hear the fortune message.
- After playback is complete, the LEDs turn off and the microcontroller resets itself so that every session starts from a clean state, returning the device to standby mode.
A video showing the device in operation is available below:
4.HardwareThe system is built around an M5Stack Atom VoiceS3R(EchoS3R), which controls the LEDs, reads the distance sensor, communicates with the OpenAI API over Wi-Fi, and plays the generated audio through its built-in speaker.
The main hardware components are:
- M5Stack Atom VoiceS3R(EchoS3R) – Main microcontroller and Wi-Fi communication
- VL53L0X Distance Sensor – Detects when the user places a hand above the shell
- 7 × NeoPixel Ring Modules (7 LEDs each) – Creates the glowing crack patterns on the turtle shell
- Built-in Speaker – Plays the AI-generated fortune message
- USB Power – Supplies power to the entire system
When a hand is detected, the M5Stack generates a lighting pattern on the NeoPixel rings and simultaneously sends a prompt request to the OpenAI API. The returned speech audio is then played through the built-in speaker, completing the interactive fortune experience.
5. Making5.1 Design Concept- The overall design is based on the traditional form of Kiboku. In the original ritual, the flat underside of the turtle shell is used for divination, but I felt that this would be difficult for most people to recognize visually. Instead, I used the hexagonal pattern of the upper shell as the basis for the LED layout, making the connection to a turtle shell immediately recognizable.
- I also wanted the device to feel intimate and easy to interact with, so I kept the overall size as compact as possible. The enclosure was designed in a trapezoidal shape, which allowed me to place a large number of LEDs while maintaining a small footprint and giving the device a friendly, cute appearance.
- The enclosure was 3D printed using a translucent filament so that the LED light could gently diffuse through the surface. This gives the shell a soft, glowing appearance and creates a calm, welcoming atmosphere.
- When I was considering how to represent the symbolic cracks of Kiboku, I remembered Cassiopeia, the magical turtle from Michael Ende’s novel Momo, who communicates by displaying words on her shell. That inspired me to use LEDs as a modern interpretation of the cracks. Using ring-shaped addressable LED modules made it possible to control many LEDs efficiently, and this discovery significantly simplified the implementation of the project.
- This allowed the shell itself to become a visual interface that connects ancient symbolism with modern interactive technology.
Before assembling the device, the following are required:
- A Wi-Fi environment for connecting the M5Stack to the Internet.
- An OpenAI account and API key for generating the fortune messages.
- The enclosure is fabricated using a 3D printer with translucent filament.
- Positioning pins are built into the enclosure, allowing the LED modules and distance sensor to be press-fitted into place without additional brackets.
- The components are connected to the GPIO pins of the M5Stack.
- The ring-shaped LED modules are connected together by soldering and linked in a daisy-chain configuration, making it easy to control all LEDs from a single data line.
- The software was developed using Arduino. Existing libraries made it easy to control the M5Stack hardware, connect to Wi-Fi, send HTTP requests, process JSON data, play audio, and control the LEDs.
- The LED display patterns are not entirely random. I felt that completely random behavior would become less interesting over time, so I also implemented several predefined lighting patterns. Encountering one of these special patterns feels like a small “lucky” event for the user.
- I spent considerable time refining the prompt used for the OpenAI API. As a result, the device can generate fortune messages that maintain a consistent tone while still producing different messages each time.
- At the moment, the fortune messages are generated only in Japanese. If you would like the device to speak in English, Chinese, or another language, please check the source code and modify the prompt and language settings accordingly.
亀卜(Kiboku) は、日本に古くから伝わる占いの儀式の一つです。伝統的な亀卜では、亀の甲羅を火で熱し、甲羅の表面に現れるひび割れの形を読み取ることで、神々からの導きや状況の吉凶を占いました。
私は、この伝統的な儀式を、日常の中で安全かつ個人的に楽しめる、インタラクティブな体験として再解釈したIoTガジェットを制作しました。
本物の亀の甲羅や火を使う代わりに、このデバイスでは亀の甲羅をイメージしたインターフェースとLEDを使用しています。デバイスの上に手をかざすだけで体験が始まり、LEDの光のパターンによって、伝統的な亀卜における甲羅のひび割れを現代的に表現します。
その後、デバイスはAIを利用してポジティブな占いメッセージを生成し、音声に変換して内蔵スピーカーから再生します。それぞれのメッセージは、利用者を励まし、前向きな気持ちにすることを目的として設計されています。
朝、甲羅に手をかざし、前向きなメッセージを受け取り、明るい気持ちで一日を始めてみてください。
2. イントロダクション私は、日本に古くから伝わる 「亀卜(Kiboku)」 という、亀の甲羅を使って未来への導きを求める伝統的な占いの儀式に以前から興味を持っていました。
しかし、伝統的な亀卜を日常生活の中で体験することは簡単ではありません。実際の亀の甲羅を用意し、火を扱い、さらに甲羅に生じたひび割れの形を読み解く専門的な知識が必要になります。そのため、個人が気軽に楽しむ体験として再現することは困難です。
私は、この伝統的な儀式を現代的なインタラクティブ体験へと変化させたいと考えました。誰もが安全に日常の中で楽しむことができ、そこから小さな前向きな気持ちやインスピレーションを得られるようなものにしたいと思いました。
このプロジェクトでは、亀卜をIoTデバイスとして再構築しました。火や実際のひび割れを使う代わりに、亀の甲羅をイメージしたLEDによるインターフェースを採用し、ユーザーがデバイスの上に手をかざすと、独自の光のパターンを表示します。その後、AIがユーザーのためのポジティブなメッセージを生成し、音声で届けます。
光る亀の甲羅というアイデアは、ミヒャエル・エンデの小説 『モモ』 に登場する不思議な亀のキャラクター 「カシオペイア」 から着想を得ました。物語の中でカシオペイアは、話す代わりに甲羅に文字を表示することでコミュニケーションを取ります。また、少し先の未来を知る能力も持っており、このインタラクティブな占い体験のインスピレーションとして最適な存在だと感じました。
古代日本の文化、想像力豊かな物語、AI、そしてIoT技術を組み合わせることで、私は伝統的な考え方と新しい形で触れ合い、一日の始まりに前向きな気持ちをもたらす新しい体験を作り出しました。
3.動作の説明(仕組み)1,電源(USB)を繋ぐとスタンバイ状態になります。スタンバイ状態では上面のLEDがゆっくり点滅しています。
2,ガジェットの上に手をかざすと、上面に取り付けた距離センサが反応して占いを開始します。上面のLEDが赤色に光るのが占い開始の合図です。
3,占いの結果として、49個配置したLEDからランダムに5から7個選定し、発光色もランダムに選定して光らせます。たまにランダムではなく規則的なパターンで発光するパターンも準備しています。
4,LEDを発光させたあとWi-Fiを経由してOpenAIに接続し、占い結果を生成して音声データに変換したものをマイコンに送り返します。
5,受け取った音声データをマイコンが再生してスピーカから流します。
6,再生が終わったら、LEDを消灯して、マイコンをリセットしてスタンバイ状態に戻ります。
下記に動作中の動画を表示します。
4. ハードウェアこのシステムは M5Stack Atom VoiceS3R(EchoS3R) を中心に構成されています。M5StackはLEDの制御、距離センサの読み取り、Wi-Fi経由でのOpenAI APIとの通信、そして生成された音声データの再生を担当します。
主なハードウェア構成は以下の通りです。
- M5Stack Atom VoiceS3R(EchoS3R)— メインマイコンおよびWi-Fi通信
- VL53L0X 距離センサ — ユーザーが甲羅の上に手をかざしたことを検知
- NeoPixel Ring × 7(各リング7個のLED) — 亀の甲羅に現れるひび割れをイメージした光のパターンを表示
- 内蔵スピーカー — AIが生成した占いメッセージを音声で再生
- USB電源 — システム全体に電力を供給
ユーザーが手をかざすと、まずNeoPixelリングに光のパターンが表示されます。その後、M5StackがWi-Fi経由でOpenAI APIへリクエストを送信し、生成された音声データを受信して内蔵スピーカーから再生します。視覚的な演出と音声によるメッセージを組み合わせることで、古代の亀卜を現代的なインタラクティブ体験として表現しています。
5,制作5.1, デザインコンセプト・デザインの基本構成は本物の亀卜(Kiboku)をベースとしています。しかし実際の亀卜では亀の甲羅の裏側の平面部を使用する為、伝わりづらい為に甲羅の表側の意匠である6角形をLEDの位置にデザインしました。また大きさは手をかざした時に全体が覆われるように極力小さくまとめる事を意識しました。形を台形にする事で多くのLEDを取り付けながら小さくまとめて、尚且つ可愛らしさも表現出来たと思います。
・筐体の素材としては、LEDの光が透過出来るように半透明のフィラメントを使用しています。この素材を使った事によりLEDが淡く光り、優しいイメージになったかと思います。
・ヒビを表現する方法を考えいた時に甲羅に文字を表示する”カシオペイア”の事を思い出して、LEDを使用する事を思いつきました。Ring型LEDを使えば複数のLEDを簡単に制御出来ます。この発見により制作をスムーズに進めることができました。
5.2事前準備・M5Stackをインターネットに繋ぐためのWi-Fi環境が必要です。
・OpenAIのAPIを使用する為にアカウント及びAPI Keyの準備が必要です。
5.3組み立て・筐体は3Dプリンタで作成します。使用するフィラメントは半透明です。
・筐体にピンを立てているので、LEDと距離センサははめ込む事で固定できます。配線はM5StackのGPIOピンと接続します。
・LED同士は半田付けで配線します。Ring型LEDはデイジーチェーンで接続出来ます。
・ソフトウェアはArduinoで作成しています。提供されているライブラリによって、M5Stackのハードウエア制御、Wi-Fi接続、HTTP制御、JSON処理、音声データの再生、LED制御を簡単に行う事が出来ました。
・LEDの表示パターンは、全てがランダムだと逆に面白みが減ると思い、直接制御を行うプログラムも追加しています。直接制御のパターンに当たると”ラッキー”という気持ちになります。
・OpenAIから適切な回答を引き出す為のプロンプトは工夫しました。このおかげで統一感がありながら毎回違うコメントを出力できるようになったと思います。現時点では”日本語”の回答のみ対応しています。英語や中国語等で回答を得たい場合は、コードを確認頂き、編集して見てください。









Comments