<pclass="author-description"><center><i>"Love God. Live Righteously. Die Well."</i><br/><br/><atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew">Source Code</a> || <atarget="_blank"rel="noopener"href="https://www.linkedin.com/in/andrewkesterson/">LinkedIn</a><br/></center></p>
<divclass="author-message">
<a
class="author-posts-count"
href="/archives">
<span>33</span>
<span>Posts</span>
</a>
<a
class="author-categories-count"
href="/categories">
<span>9</span>
<span>Categories</span>
</a>
<a
class="author-tags-count"
href="/tags">
<span>0</span>
<span>Tags</span>
</a>
</div>
</div>
<divclass="sticky-tablet">
<articleclass="display-when-two-columns spacer">
<divclass="card card-content toc-card">
<divclass="toc-header">
<i
class="iconfont icon-menu"
style="padding-right: 2px;">
</i>TOC
</div>
<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#3-bit-Flash-ADC-using-LM339N-comparators"><spanclass="toc-text">3-bit Flash ADC using LM339N comparators</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Snake-Game-on-an-8x8-LED-Matrix"><spanclass="toc-text">Snake Game on an 8x8 LED Matrix</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Closing-Thoughts"><spanclass="toc-text">Closing Thoughts</span></a></li></ol>
<p>I’ve spent all my spare (technology) time learning more about the ESP32, the Arduino HAL, and using some additional integrated circuits.</p>
<h2id="3-bit-Flash-ADC-using-LM339N-comparators"><ahref="#3-bit-Flash-ADC-using-LM339N-comparators"class="headerlink"title="3-bit Flash ADC using LM339N comparators"></a>3-bit Flash ADC using LM339N comparators</h2><blockquoteclass="twitter-tweet"data-media-max-width="560"><plang="en"dir="ltr">Put together a 3 bit flash ADC while waiting on some other tasks to finish. I had meant to do this last week but I didn’t have time. I did learn some new things here, as usual. <atarget="_blank"rel="noopener"href="https://t.co/AAU8mq8pWy">pic.twitter.com/AAU8mq8pWy</a></p>— Andrew Kesterson (@AKLabsDotNet) <atarget="_blank"rel="noopener"href="https://x.com/AKLabsDotNet/status/2064431239013048425?ref_src=twsrc%5Etfw">June 9, 2026</a></blockquote><scriptasyncsrc="https://platform.x.com/widgets.js"charset="utf-8"></script>
<p>This project uses an LM339N comparator chip, a voltage ladder, a potentiometer and 4 LEDs to create a Flash Analog to Digital Converter.</p>
<p>It’s worth pointing out that this ADC outputs thermometer code (unary code), not binary. I would have needed to use an additional priority encoder to get it converted down to binary. I didn’t have a priority encoder on hand (though I could’ve built one with quite a few other chips I did have on hand), so I just left it at unary output.</p>
<p>Lessons learned from this project:</p>
<ul>
<li>What is a voltage ladder</li>
<li>How pull up and pull down resistors work</li>
<li>Breadboards are small finnicky things</li>
<li>How USB power delivery dummies work</li>
</ul>
<p>There is a more detailed writeup about this project <atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew/esp32-learning/src/branch/main/07-LM339N-ADC/README.md">in my source repository</a>.</p>
<h2id="Snake-Game-on-an-8x8-LED-Matrix"><ahref="#Snake-Game-on-an-8x8-LED-Matrix"class="headerlink"title="Snake Game on an 8x8 LED Matrix"></a>Snake Game on an 8x8 LED Matrix</h2><blockquoteclass="twitter-tweet"data-media-max-width="560"><plang="en"dir="ltr">It works! Snake on an ESP32 with a 7 segment scoreboard and adjustable difficulty using an 8x8 LED matrix as a display <atarget="_blank"rel="noopener"href="https://t.co/RZPqkQRxEZ">pic.twitter.com/RZPqkQRxEZ</a></p>— Andrew Kesterson (@AKLabsDotNet) <atarget="_blank"rel="noopener"href="https://x.com/AKLabsDotNet/status/2067645849258103188?ref_src=twsrc%5Etfw">June 18, 2026</a></blockquote><scriptasyncsrc="https://platform.x.com/widgets.js"charset="utf-8"></script>
<p>This project uses 3 74HC595 serial to parallel shift registers, a 7-segment display multi unit, an 8x8 LED matrix, an active buzzer, an NPN transistor, a joystick (later replaced with 4 buttons), a handful of resistors and a potentiometer to make a playable Snake game.</p>
<p>This was easily the most challenging project so far, taking me almost two weeks to get it working right. I wound up having to break the project out across 4 separate breadboards. The breadboards look as gross in real life as it does in Fritzing.</p>
<p>Lessons Learned</p>
<ul>
<li>C has admitted design flaws</li>
<li>Hardware debouncing is definitely the way to go</li>
<li>The Arduino IDE debugger really sucks</li>
<li>It’s been a long time since I had to think this hard about what my code was doing to the hardware</li>
<li>Compiling, uploading, and debugging Arduino code from the CLI</li>
<li>Breadboards probably introduce just as many bugs as I do</li>
<li>How to drive a 7-segment display and an 8x8 LED matrix using shift registers</li>
<li>Embedded platforms have undocumented limits that may surprise you</li>
<li>You don’t need lots of pixels, or even colors, to make it fun</li>
</ul>
<p>There is a more detailed writeup about this project <atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew/esp32-learning/src/branch/main/08-74HC595-Snake/README.md">in my source repository</a>.</p>
<h2id="Closing-Thoughts"><ahref="#Closing-Thoughts"class="headerlink"title="Closing Thoughts"></a>Closing Thoughts</h2><p>That 8x8 LED Matrix Snake game left me taxed. I’m probably going to lay off the embedded stuff for a week or so while I work out some stuff in libakgl related to partitioning the game world for actor collisions and some physics engine bits. Then I’m on vacation until July 6, so I may or may not have a devlog in the first week of July at all.</p>
<p>Also, getting into embedded development is like getting into Warhammer. When a new chip costs pennies, a new MCU costs a dollar, an entire dev board costs 5 or 10 bucks, and a new Pi is less than $50…</p>
<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#3-bit-Flash-ADC-using-LM339N-comparators"><spanclass="toc-text">3-bit Flash ADC using LM339N comparators</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Snake-Game-on-an-8x8-LED-Matrix"><spanclass="toc-text">Snake Game on an 8x8 LED Matrix</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Closing-Thoughts"><spanclass="toc-text">Closing Thoughts</span></a></li></ol>
</div>
</main>
<asideclass="right-column">
<divclass="sticky-widescreen">
<articleclass="card card-content toc-card">
<divclass="toc-header">
<i
class="iconfont icon-menu"
style="padding-right: 2px;">
</i>TOC
</div>
<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#3-bit-Flash-ADC-using-LM339N-comparators"><spanclass="toc-text">3-bit Flash ADC using LM339N comparators</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Snake-Game-on-an-8x8-LED-Matrix"><spanclass="toc-text">Snake Game on an 8x8 LED Matrix</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Closing-Thoughts"><spanclass="toc-text">Closing Thoughts</span></a></li></ol>