<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AbeMarkn</title>
    <description>The latest articles on DEV Community by AbeMarkn (@__a89d9b07f01c701f35c).</description>
    <link>https://dev.to/__a89d9b07f01c701f35c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4080840%2Ff1ef2a3b-79b6-4749-afbc-acb6c0efedf5.png</url>
      <title>DEV Community: AbeMarkn</title>
      <link>https://dev.to/__a89d9b07f01c701f35c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/__a89d9b07f01c701f35c"/>
    <language>en</language>
    <item>
      <title>Automated Hardware Testing on Raspberry Pi Pico - Testing ePaper with a Test Jig, Camera, and Gemini API</title>
      <dc:creator>AbeMarkn</dc:creator>
      <pubDate>Sun, 23 Aug 2026 08:41:02 +0000</pubDate>
      <link>https://dev.to/__a89d9b07f01c701f35c/automated-hardware-testing-on-raspberry-pi-pico-testing-epaper-with-a-test-jig-camera-and-4idk</link>
      <guid>https://dev.to/__a89d9b07f01c701f35c/automated-hardware-testing-on-raspberry-pi-pico-testing-epaper-with-a-test-jig-camera-and-4idk</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;AI has made software development much easier. But for &lt;strong&gt;embedded software&lt;/strong&gt;, testing is still tough.&lt;/p&gt;

&lt;p&gt;Embedded devices require pressing physical buttons and visually checking the screen. Because hardware is involved, manual testing is usually required.&lt;/p&gt;

&lt;p&gt;I wanted to change that, so I built an automated testing setup!&lt;/p&gt;

&lt;p&gt;Now, everything from &lt;strong&gt;pressing the buttons&lt;/strong&gt; to &lt;strong&gt;verifying the ePaper display with AI&lt;/strong&gt; is fully automated.&lt;/p&gt;




&lt;h1&gt;
  
  
  What I Built
&lt;/h1&gt;

&lt;p&gt;I am building a battery-powered "Time Recorder" (punch clock) using a Raspberry Pi Pico and an ePaper display.&lt;/p&gt;

&lt;p&gt;When a button is pressed, the device records the time and displays it on the screen.&lt;/p&gt;

&lt;p&gt;In this project, I automated the entire test cycle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Triggering the physical button press via hardware.&lt;/li&gt;
&lt;li&gt;Waiting for the ePaper to update.&lt;/li&gt;
&lt;li&gt;Capturing the screen with a camera.&lt;/li&gt;
&lt;li&gt;Using the Gemini API to verify the displayed content automatically.&lt;/li&gt;
&lt;/ol&gt;




&lt;h1&gt;
  
  
  How It Works
&lt;/h1&gt;

&lt;p&gt;Normally, pressing Button A (Fig 1: ★1) displays the recorded timestamp on the ePaper (Fig 1: ★2).&lt;/p&gt;

&lt;p&gt;To automate this test, the system runs through these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Custom Test Jig&lt;/strong&gt;: Built a testing jig (Pico_Tester) to control the button lines (Fig 1: ★4).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Button Press&lt;/strong&gt;: The test jig triggers the button electronically (a green LED turns on so humans can see it was pressed).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Camera Capture &amp;amp; AI Verification&lt;/strong&gt;: A Raspberry Pi 5 camera captures the ePaper screen (Fig 1: ★5), and the Gemini API inspects the image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Report&lt;/strong&gt;: The AI evaluation and test result are reported automatically (Fig 2: ★3).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Fig 1: Overall System Setup
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj3cgwi4sbkh2bb75509k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj3cgwi4sbkh2bb75509k.png" alt="Overall System Setup" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Fig 2: Test Result Report (Google Antigravity)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7rl9nsr9o0wrbe69lbl0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7rl9nsr9o0wrbe69lbl0.png" alt="Test Result Report" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Fig 3: Circuit Diagram
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fumtadmeux47k0cymhbfa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fumtadmeux47k0cymhbfa.png" alt="Circuit Diagram" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Gemini API &amp;amp; Google Antigravity
&lt;/h1&gt;

&lt;p&gt;Here is how AI is used in this test pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prompt&lt;/strong&gt;: Sends structured text instructions with the Base64 image, asking to extract text/status and compare it with the expected output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accuracy&lt;/strong&gt;: Recognized custom 7-segment bitmap fonts, timestamps, and punch records (&lt;code&gt;0002-0003&lt;/code&gt;, etc.) with &lt;strong&gt;100% accuracy&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implementation&lt;/strong&gt;: Uses Python's standard &lt;code&gt;urllib&lt;/code&gt; to call the &lt;code&gt;gemini-3.6-flash&lt;/code&gt; REST API directly. No external SDKs required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration&lt;/strong&gt;: The AI output is parsed and saved into the test result JSON (snapshot info + AI verdict) as test evidence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Development Speed&lt;/strong&gt;: Pair-programmed with &lt;strong&gt;Google Antigravity&lt;/strong&gt; to quickly design and deploy API endpoints, concurrency locking, timeouts, and live hardware tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prompt Example (Generated by AIJudge)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This image is a photograph of an ePaper display.
Please read the content displayed on the screen and report in the following format:

1. [Extracted Text]: Transcribe all text, numbers, and symbols shown on the screen.
2. [Date/Time]: State any date and time displayed.
3. [Status]: State the status shown at the bottom (SLEEP/KEEP, READY/START, etc.).
4. [Verdict]: Compare with the expected criteria below and judge if it matches:
   Expected: The ePaper displays the date (MM/DD), punch record (HHMM-HHMM), current time at the bottom, and button guide.

   Answer with "OK" or "NG" and provide a concise reason.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Actual Output from Gemini API
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. [Extracted Text]
  - Date Header: 08/22
  - Left Column (Punch History):
      - 0002-0003
      - 0944-0945
      - 2322-2323
      - 2359-2343
      - 1102-1104
  - Bottom Area:
      - Guide: A=START B=FINISH C=KEEP
      - Clock: 08/22 23:04
      - Status: SLEEP READY

2. [Date/Time]
  - Top Header: 08/22
  - Bottom Clock: 08/22 23:04

3. [Status]
  - "SLEEP READY" is displayed on the bottom right.

4. [Verdict]
  - Result: OK
  - Reason: The date (08/22) at the top, punch records (0002-0003, etc.) on the left, current time (08/22 23:04), and button guide (A=START B=FINISH C=KEEP) at the bottom are all clearly displayed and completely match the expected criteria.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Key Benefits
&lt;/h1&gt;

&lt;p&gt;Now I can define test cases on my PC, and the system runs them completely automatically.&lt;/p&gt;

&lt;p&gt;Whenever I add a feature or fix a bug, I just tell the tool: &lt;em&gt;"Run Test_0001"&lt;/em&gt;, and it tests the hardware and generates a report.&lt;/p&gt;

&lt;p&gt;No more pressing physical buttons dozens of times manually! No matter how many bugs I create, the automated setup tests tirelessly without complaining. 🎉&lt;/p&gt;




&lt;h1&gt;
  
  
  Next Steps
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Refine and expand the AI evaluation prompts for different test cases.&lt;/li&gt;
&lt;li&gt;Build the remaining firmware features for the Time Recorder now that the test loop is ready.&lt;/li&gt;
&lt;li&gt;Use the test jig's INA228 power monitoring module and EEPROM to evaluate sleep current and battery life.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>raspberrypi</category>
      <category>python</category>
      <category>embedded</category>
      <category>ai</category>
    </item>
    <item>
      <title>Vibe Coding: Building a Raspberry Pi Pico I2S Audio Player Without Writing Code</title>
      <dc:creator>AbeMarkn</dc:creator>
      <pubDate>Mon, 17 Aug 2026 05:27:58 +0000</pubDate>
      <link>https://dev.to/__a89d9b07f01c701f35c/vibe-coding-building-a-raspberry-pi-pico-i2s-audio-player-without-writing-code-1njk</link>
      <guid>https://dev.to/__a89d9b07f01c701f35c/vibe-coding-building-a-raspberry-pi-pico-i2s-audio-player-without-writing-code-1njk</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;As a holiday project in 2026, I decided to experiment with &lt;strong&gt;"Vibe Coding"&lt;/strong&gt;—letting AI lead the entire software development process.&lt;/p&gt;

&lt;p&gt;Without writing a single line of code myself, I delegated everything (requirements definition, architecture design, and coding) to AI agents (Gemini, Copilot, ChatGPT / Antigravity, Cursor). In the end, I successfully played audio using an I2S DAC connected to a Pimoroni Tiny2040 (&lt;strong&gt;8MB Flash&lt;/strong&gt;; standard Pico has 2MB)!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hardware Setup
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh5ntbzr51l49rs3rl9l2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh5ntbzr51l49rs3rl9l2.png" alt="Hardware overview 1" width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa6kxoe4zv11eesu3ioqi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa6kxoe4zv11eesu3ioqi.png" alt="Hardware overview 2" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  📋 Bill of Materials (BOM)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Model / Spec&lt;/th&gt;
&lt;th&gt;Role &amp;amp; Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MCU Board&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pimoroni Tiny2040 (RP2040)&lt;/td&gt;
&lt;td&gt;8MB Flash (Standard Pico has 2MB)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;I2S DAC Amp&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MAX98357A&lt;/td&gt;
&lt;td&gt;3W Class D Mono Amplifier (Easy wiring)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;I2S DAC (Alt)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;PCM5102 Module&lt;/td&gt;
&lt;td&gt;&lt;em&gt;Note: Silk-screen inverted on some batches&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Speaker&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;8Ω 1W Dynamic Speaker&lt;/td&gt;
&lt;td&gt;Audio output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RTC Module&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;DS3231&lt;/td&gt;
&lt;td&gt;I2C Real-Time Clock for time announcements&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Power Source&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;LIR2032 (3.7V / 45mAh)&lt;/td&gt;
&lt;td&gt;Rechargeable coin cell for bench testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Controls&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mini Breadboard &amp;amp; 2 Switches&lt;/td&gt;
&lt;td&gt;Playback / Volume trigger buttons&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6oyifw37jc9drqm9scgq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6oyifw37jc9drqm9scgq.png" alt="MAX98357A amp" width="690" height="757"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For bench testing, I powered the setup using an LIR2032 rechargeable coin battery (3.7V / 45mAh). It booted cleanly and played sound without issues!&lt;/p&gt;

&lt;h3&gt;
  
  
  🎬 Demo Video &amp;amp; Repository
&lt;/h3&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/IbbpYT2Zdx0"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/AbeMarkn" rel="noopener noreferrer"&gt;
        AbeMarkn
      &lt;/a&gt; / &lt;a href="https://github.com/AbeMarkn/I2S_MAX98357A_PCM5102" rel="noopener noreferrer"&gt;
        I2S_MAX98357A_PCM5102
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;I2S 音声フォーマット比較プレイヤー (Pimoroni Tiny2040 + MAX98357A + DS3231 RTC)&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;【前半】利用者向けマニュアル (User Manual)&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;1. プロジェクト概要&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;本システムは、Raspberry Pi Pico互換の &lt;strong&gt;Pimoroni Tiny2040 (Flash 8MB)&lt;/strong&gt; と &lt;strong&gt;MAX98357A (I2S D級アンプ)&lt;/strong&gt;、および &lt;strong&gt;高精度外付けRTC (DS3231)&lt;/strong&gt; を使用した音声プレイヤーです。&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ボタン操作により、3つの音声フォーマット（&lt;strong&gt;高品位 44.1kHz/16bit PCM&lt;/strong&gt;、&lt;strong&gt;標準 16.0kHz/16bit PCM&lt;/strong&gt;、&lt;strong&gt;高圧縮 16.0kHz/4bit IMA-ADPCM&lt;/strong&gt;）を切り替えてスピーカから直接試聴・比較できます。&lt;/li&gt;
&lt;li&gt;外付けRTC（バックアップ電池付）により、電源を切っても正確な時刻（JST）を保持し、起動時に自動同期します。&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;2. 必要環境・ハードウェア&lt;/h2&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;マイコン&lt;/strong&gt;: Pimoroni Tiny2040 (RP2040 / Flash 8MB)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DAC / アンプ&lt;/strong&gt;: MAX98357A I2S D級アンプモジュール&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;外付けRTC&lt;/strong&gt;: DS3231モジュール（CR2032電池付）&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;スピーカ&lt;/strong&gt;: 3W モノラルスピーカ (4Ω〜8Ω)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;スイッチ&lt;/strong&gt;: タクトスイッチ × 2個 (ボタンA: 青, ボタンB: 白)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;電源&lt;/strong&gt;: USB 5V 給電 (Type-C)&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;3. 配線一覧 (Pimoroni Tiny2040)&lt;/h2&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;3.1 オーディオアンプ &amp;amp; ボタン接続&lt;/h3&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GP0 (0)&lt;/strong&gt;: MAX98357A &lt;code&gt;BCLK&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GP1 (1)&lt;/strong&gt;: MAX98357A &lt;code&gt;LRC&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GP2 (2)&lt;/strong&gt;: MAX98357A &lt;code&gt;DIN&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3V&lt;/strong&gt;: MAX98357A &lt;code&gt;VIN&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GND&lt;/strong&gt;: 各モジュール &lt;code&gt;GND&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GP6 (6)&lt;/strong&gt;: ボタンA (青)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GP7 (7)&lt;/strong&gt;: ボタンB (白)&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;3.2 外付けRTC (DS3231) 接続（左側 Pin 5〜8 ストレート配線）&lt;/h3&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pin 5 (GP28 / A2)&lt;/strong&gt;: DS3231 &lt;code&gt;VCC&lt;/code&gt;（GPIO 3.3V 給電）&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pin 6 (GP27 / A1)&lt;/strong&gt;: DS3231 &lt;code&gt;SCL&lt;/code&gt;…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/AbeMarkn/I2S_MAX98357A_PCM5102" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;em&gt;(Note: Even the README in this repository was 100% generated by AI!)&lt;/em&gt;


&lt;h2&gt;
  
  
  How Was the Vibe Coding Experience?
&lt;/h2&gt;

&lt;p&gt;My golden rule for this project was: &lt;strong&gt;"Humans do not edit the source code."&lt;/strong&gt;&lt;br&gt;
My only responsibilities were:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Providing requirements&lt;/li&gt;
&lt;li&gt;Crafting and refining prompts&lt;/li&gt;
&lt;li&gt;Reviewing AI outputs&lt;/li&gt;
&lt;li&gt;Verifying operations on physical hardware&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I iterated on the prompts by asking Gemini, Copilot, and ChatGPT to review and critique each draft. Once the prompt was refined, I had GitHub Copilot in VS Code summarize the specifications and design. Once I felt the design was solid, I asked it to implement the code.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Roadblock: Out-of-Memory Infinite Loop
&lt;/h2&gt;

&lt;p&gt;Then came the first major issue.&lt;/p&gt;

&lt;p&gt;The original voice samples were in MP3 format, which had to be converted to WAV and stored in the Tiny2040's on-board 8MB flash memory. However, Copilot attempted to write more than 8MB worth of WAV files at once, causing repeated out-of-memory errors.&lt;/p&gt;

&lt;p&gt;Instead of identifying that unused audio files could be dropped, Copilot fell into a repetitive loop—trying things like "writing smaller files first" or "changing the file transfer order." It was completely stuck in an infinite loop.&lt;/p&gt;

&lt;p&gt;While I paused Copilot and asked it to analyze the converted file sizes in a table, I hit the &lt;strong&gt;GitHub Copilot Pro+ monthly limit (7,000 AI credits, $39/mo)&lt;/strong&gt;!&lt;/p&gt;


&lt;h2&gt;
  
  
  Breakthrough by Switching to Antigravity
&lt;/h2&gt;

&lt;p&gt;Upgrading to a higher Copilot tier was costly, and it was still going in circles. So I switched development agents to &lt;strong&gt;Google Antigravity&lt;/strong&gt; (Google AI Pro 5TB plan / 2,900 JPY/mo).&lt;/p&gt;

&lt;p&gt;With Antigravity, I resumed work and had it analyze the storage footprint. It quickly determined that skipping unused MP3 conversions would keep the total size well within the 8MB limit. It updated the code, and everything started working as intended!&lt;br&gt;
You can view the AI-generated report &lt;a href="https://github.com/AbeMarkn/I2S_MAX98357A_PCM5102/blob/main/docs/Report_mp3-wav_e.md" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The entire GitHub repository documentation, including the README, was generated by AI. It was structured surprisingly well. Writing all of this by hand from scratch would have taken days and likely introduced bugs. While there are minor spots where human polishing could help, I kept them as-is to preserve the "100% AI-driven" spirit of this experiment.&lt;/p&gt;


&lt;h2&gt;
  
  
  Hardware &amp;amp; Sound Quality Evaluation 🎶
&lt;/h2&gt;

&lt;p&gt;I used to think driving a speaker with digital audio had a high barrier to entry. But after discovering I2S, I realized it is quite accessible on microcontrollers like the RP2040.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audio Quality&lt;/strong&gt;: For voice announcements, &lt;strong&gt;16kHz / 4-bit IMA ADPCM&lt;/strong&gt; provides clear and practical quality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage Efficiency&lt;/strong&gt;: IMA ADPCM drastically reduces file sizes. This allows plenty of voice clips to fit inside the Pico's built-in flash without requiring external SD cards or SPI Flash chips.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Gotcha: Inverted Silkscreen on the PCM5102 Board
&lt;/h2&gt;

&lt;p&gt;While getting sound took only a few hours, I ran into one hardware trap.&lt;/p&gt;

&lt;p&gt;I bought two types of I2S modules. One of them, a &lt;strong&gt;PCM5102 board, had defective PCB silkscreen printing&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv4verq0f8e37lwe73hij.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv4verq0f8e37lwe73hij.jpg" alt="PCM5102 back" width="799" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The labels for the configuration jumpers (H1L, H2L, H3L, H4L) on the back were &lt;strong&gt;printed upside down (rotated 180 degrees)&lt;/strong&gt;! I was suspicious at first, but checking online reviews confirmed other users had run into the exact same issue.&lt;br&gt;
Details and wiring workarounds are documented in &lt;a href="https://github.com/AbeMarkn/I2S_MAX98357A_PCM5102/blob/main/docs/CONNECTIONS_e.md" rel="noopener noreferrer"&gt;CONNECTIONS_e.md&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In contrast, the &lt;strong&gt;MAX98357A&lt;/strong&gt; (built-in amplifier) was extremely easy to wire and worked right away. Although mono, it is highly recommended.&lt;/p&gt;




&lt;h2&gt;
  
  
  AI Quirks &amp;amp; Realities
&lt;/h2&gt;

&lt;p&gt;During development, I added minor features such as adjustable playback speed and volume.&lt;/p&gt;

&lt;p&gt;During hardware testing, the playback speed was not changing. When I pointed this out to the AI, it replied confidently: &lt;em&gt;"All unit tests have passed."&lt;/em&gt;&lt;br&gt;
I responded: &lt;em&gt;"Can you set the playback speed to 2x yourself and measure the playback duration?"&lt;/em&gt;&lt;br&gt;
The AI admitted: &lt;em&gt;"Ah, there was a bug."&lt;/em&gt; AI can definitely produce subtle bugs despite green tests!&lt;/p&gt;

&lt;p&gt;Another funny incident: I manually adjusted the playback speed to 1.3x in a configuration file. Later, during an unrelated refactoring, the AI quietly reverted it back to 1.0x.&lt;br&gt;
I caught it during code review, but it was a good reminder: it is wise to add an instruction like &lt;em&gt;"Never modify user values in config files without explicit confirmation."&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prompting Best Practices&lt;/strong&gt;: Compiling guidelines and patterns for prompt-driven embedded development.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Interaction Strategy&lt;/strong&gt;: Answering every detailed clarification request from AI quickly leads to human fatigue. When human review gets lazy, AI changes can diverge rapidly, consuming large amounts of AI credits. Striking the right balance of autonomy is key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Physical Testing&lt;/strong&gt;: I am currently setting up automated button actuators with AI computer vision for hardware pass/fail verification.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh2x67kb4assofolo03su.png" alt="Automated test setup" width="800" height="488"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audio Streaming over Wi-Fi&lt;/strong&gt;: Now that 16kHz / 4-bit audio is verified, the next step is experimenting with audio streaming over Wi-Fi using the Raspberry Pi Pico W (2MB Flash).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>micropython</category>
      <category>raspberrypi</category>
      <category>ai</category>
      <category>embedded</category>
    </item>
  </channel>
</rss>
