From 3d62dc796e9ec109d7cd480e3fac6c2531928601 Mon Sep 17 00:00:00 2001 From: kim Date: Thu, 11 Jun 2026 16:58:08 +0900 Subject: [PATCH] =?UTF-8?q?Arduino=20=EC=97=90=EB=AE=AC=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=ED=84=B0:=20SSD1306=20OLED(128=C3=9764)=20I2C=20=EC=97=90?= =?UTF-8?q?=EB=AE=AC=EB=A0=88=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AVRTWI connectToSlave에서 LCD(0x27/0x3F)와 OLED(0x3C/0x3D) 동시 지원 - SSD1306 프로토콜 파서: - control byte (0x00=cmd stream, 0x40=data stream) - 주요 명령: addressing mode, set col/page addr, display on/off, inverse, page/col low/high nibble, 2바이트 명령 처리 - horizontal/vertical/page 어드레싱 모드 모두 지원 - GDDRAM(128×8 pages) 유지 → canvas 128×64 px 렌더링 (픽셀 2× 스케일, 청백색 톤) - displayOn 명령 수신 시 OLED 패널 자동 표시 - runFrame마다 dirty 플래그로 효율적 canvas flush Co-Authored-By: Claude Fable 5 --- web-ui/arduino-emulator.html | 174 ++++++++++++++++++++++++++++++++++- 1 file changed, 172 insertions(+), 2 deletions(-) diff --git a/web-ui/arduino-emulator.html b/web-ui/arduino-emulator.html index 1063abb..c91fb10 100644 --- a/web-ui/arduino-emulator.html +++ b/web-ui/arduino-emulator.html @@ -52,6 +52,12 @@ .lcd-off .lcd-cell { color:#0d1a05; background:#0d1a05; } .lcd-off .lcd-wrap { filter:brightness(.4); } + /* SSD1306 OLED */ + .oled-section { padding:10px 14px; flex-shrink:0; border-bottom:1px solid #1e1e36; } + .oled-section-title { font-size:10px; color:var(--muted); margin-bottom:8px; font-weight:600; letter-spacing:.08em; } + .oled-wrap { background:#000; border:1px solid #333; border-radius:4px; padding:4px; display:inline-block; } + #oled-canvas { display:block; image-rendering:pixelated; width:256px; height:128px; } + /* Pin grid */ .pins-section { padding:10px 14px; flex:1; overflow-y:auto; } .pins-header { font-size:10px; color:var(--muted); margin-bottom:8px; font-weight:600; letter-spacing:.08em; } @@ -161,6 +167,12 @@ + + +