<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>
<olclass="toc"><liclass="toc-item toc-level-2"><aclass="toc-link"href="#libakgl-updates"><spanclass="toc-text">libakgl updates</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#libakerror-new-error-type"><spanclass="toc-text">libakerror new error type</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#ESP32-Projects"><spanclass="toc-text">ESP32 Projects</span></a><olclass="toc-child"><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Using-Analog-to-Digital-Converters-Potentiometers-and-Capacitive-Touch-Sensors"><spanclass="toc-text">Using Analog to Digital Converters, Potentiometers and Capacitive Touch Sensors</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Photoresistors-and-Voltage-Dividers"><spanclass="toc-text">Photoresistors and Voltage Dividers</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Joystick-and-WS2812-LED-demo"><spanclass="toc-text">Joystick and WS2812 LED demo</span></a></li></ol></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Closing-Thoughts"><spanclass="toc-text">Closing Thoughts</span></a></li></ol>
<li><atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew/libakgl/commit/652ee4cdf3a636c749db0a06ea30e7422840f9de">Tilemaps can now contain their own physics properties</a>. This allows you to specify different gravity, drag, and even entirely different physics simulators in the map properties. Something about reading the physics simulation values from the map rather than the overall game properties makes the gravity behave differently, so the values need to be tweaked a little bit, but it still works fine.</li>
<h2id="libakerror-new-error-type"><ahref="#libakerror-new-error-type"class="headerlink"title="libakerror new error type"></a>libakerror new error type</h2><p>libakerror now includes a new error type, <atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew/libakerror/commit/93f5e934804d1b62d5c4751562056d8185c7c707"><code>AKERR_CIRCULAR_REFERENCE</code></a> for things like linked lists or trees that are self-referential.</p>
<hr/>
<h2id="ESP32-Projects"><ahref="#ESP32-Projects"class="headerlink"title="ESP32 Projects"></a>ESP32 Projects</h2><p>This week was basically one long episode of “Wait I thought I knew how that worked … Oh I didn’t understand … but now I do!”. Overall it was a good week.</p>
<h3id="Using-Analog-to-Digital-Converters-Potentiometers-and-Capacitive-Touch-Sensors"><ahref="#Using-Analog-to-Digital-Converters-Potentiometers-and-Capacitive-Touch-Sensors"class="headerlink"title="Using Analog to Digital Converters, Potentiometers and Capacitive Touch Sensors"></a>Using Analog to Digital Converters, Potentiometers and Capacitive Touch Sensors</h3><blockquoteclass="twitter-tweet"><plang="en"dir="ltr">Fun with potentiometers and the esp32 analog to digital converter. It was fluttering around at zero until the camera came on <atarget="_blank"rel="noopener"href="https://t.co/U6Xi5qF4Pz">pic.twitter.com/U6Xi5qF4Pz</a></p>— Andrew Kesterson (@AKLabsDotNet) <atarget="_blank"rel="noopener"href="https://x.com/AKLabsDotNet/status/2061259063120261133?ref_src=twsrc%5Etfw">June 1, 2026</a></blockquote><scriptasyncsrc="https://platform.x.com/widgets.js"charset="utf-8"></script>
<p><atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew/esp32-learning/src/branch/main/04-adc">This project</a> lets you control a couple of LEDs with a potentiometer and a capacitive touch sensor, using the potentiometer through the analog to digital converter as a dimmer for the green LED vi PWM, and using the capacitive touch sensor as an on/off switch for the red LED.</p>
<p>Lessons learned from this project:</p>
<ul>
<li>How potentiometers actually work (surprise: it’s more complicated than I thought, as usual)</li>
<li>How an ADC works</li>
<li>How the ESP32-S3 ADC in particular works</li>
<li>How to build a Flash ADC on a breadboard (<em>note: I didn’t get around to actually BUILDING the flash ADC I mention in the article. I need to go back and do that.</em>)</li>
<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/04-adc">in my source repository</a></p>
<hr/>
<h3id="Photoresistors-and-Voltage-Dividers"><ahref="#Photoresistors-and-Voltage-Dividers"class="headerlink"title="Photoresistors and Voltage Dividers"></a>Photoresistors and Voltage Dividers</h3><p><atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew/esp32-learning/src/branch/main/05-photoresistors/README.md">This project</a> uses a photoresistor feeding into the ADC and an LED fed with PWM to create a nightlight that gets brighter as the ambient light gets darker.</p>
<p>The code in this lesson is unremarkable; the lessons here were primarily in correcting some fundamental misunderstandings in my basic electronics knowledge.</p>
<ul>
<li>Resistors in a circuit don’t work the way I thought they did</li>
<li>How a voltage divider actually works and why we might use one</li>
<li>How a photoresistor actually works under the hood</li>
</ul>
<p>There is a LOT tied up in what I learned about voltage dividers and photoresistors. I had some pretty fundamental misunderstandings about how circuits worked, and if you went through the same kinds of tutorials I did, you may too. There is a more detailed writeup about this project <atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew/esp32-learning/src/branch/main/05-photoresistors/README.md">in my source repository</a></p>
<hr/>
<h3id="Joystick-and-WS2812-LED-demo"><ahref="#Joystick-and-WS2812-LED-demo"class="headerlink"title="Joystick and WS2812 LED demo"></a>Joystick and WS2812 LED demo</h3><blockquoteclass="twitter-tweet"><plang="en"dir="ltr">Putting together almost everything I’ve learned about arduino and esp32 over the past few weeks to make a joystick blinks lights demo with calibration. Challenging but very fun. <atarget="_blank"rel="noopener"href="https://t.co/7blqqQOlYg">pic.twitter.com/7blqqQOlYg</a></p>— Andrew Kesterson (@AKLabsDotNet) <atarget="_blank"rel="noopener"href="https://x.com/AKLabsDotNet/status/2063056777768239514?ref_src=twsrc%5Etfw">June 6, 2026</a></blockquote><scriptasyncsrc="https://platform.x.com/widgets.js"charset="utf-8"></script>
<p><atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew/esp32-learning/src/branch/main/06-joystick/README.md">This demo project</a> shows using a joystick peripheral to control the position of an LED light on a WS2812 light strip, as well as how to calibrate a joystick, while using PWM driven LEDs to show the relative position of a joystick on its axis and the status of the momentary joystick pushbutton. The breadboard picture above shows a WS2812 horizontal strip, but that’s not what I used; mine was a circular LED arrangement, I just couldn’t find the right part in Fritzing.</p>
<p>Lessons learned from this project:</p>
<ul>
<li><atarget="_blank"rel="noopener"href="https://fritzing.org/">Fritzing</a> is time consuming but neat</li>
<li>I still don’t trust C++</li>
<li>How the RMT peripheral on the ESP32-S3 works and why it is involved when driving WS2812 LED strips</li>
<li>How to select pin assignments on the ESP32 without relying on the tutorial</li>
<li>How to calibrate joysticks</li>
</ul>
<p>There’s quite a bit of info packed in to the writeup on this one - at least I feel like there is. There’s some discussion of the code too so that may make it look bigger than it actually is. The writeup on the WS2812 protocol, in all its beautiful wierdness, may be enough to justify the read. There is a more detailed writeup about this project <atarget="_blank"rel="noopener"href="https://source.starfort.tech/andrew/esp32-learning/src/branch/main/06-joystick/README.md">in my source repository</a>.</p>
<h2id="Closing-Thoughts"><ahref="#Closing-Thoughts"class="headerlink"title="Closing Thoughts"></a>Closing Thoughts</h2><p>I am very very ready to leave Arduino behind and move on to the projects in <atarget="_blank"rel="noopener"href="https://www.amazon.com/Bare-Metal-Embedded-Programming-high-performance-microcontrollers/dp/183546081X">Bare-Metal Embedded C Programming</a> on STM32, but I think I should do some more projects with Arduino first. Every time I do, I find some new electronics fundamental I didn’t understand as well as I thought, or find some habit that will probably bite me when I get into the really low level stuff. So I think we have to stay with Arduino for a while longer.</p>
<divclass="nav-title">Devlog Entry - 30 May 2026 </div>
</div>
<iclass="iconfont icon-right nav-next-icon"></i>
</a>
</div>
</div>
<div
class="card card-content toc-card"
id="mobiletoc">
<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="#libakgl-updates"><spanclass="toc-text">libakgl updates</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#libakerror-new-error-type"><spanclass="toc-text">libakerror new error type</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#ESP32-Projects"><spanclass="toc-text">ESP32 Projects</span></a><olclass="toc-child"><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Using-Analog-to-Digital-Converters-Potentiometers-and-Capacitive-Touch-Sensors"><spanclass="toc-text">Using Analog to Digital Converters, Potentiometers and Capacitive Touch Sensors</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Photoresistors-and-Voltage-Dividers"><spanclass="toc-text">Photoresistors and Voltage Dividers</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Joystick-and-WS2812-LED-demo"><spanclass="toc-text">Joystick and WS2812 LED demo</span></a></li></ol></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="#libakgl-updates"><spanclass="toc-text">libakgl updates</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#libakerror-new-error-type"><spanclass="toc-text">libakerror new error type</span></a></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#ESP32-Projects"><spanclass="toc-text">ESP32 Projects</span></a><olclass="toc-child"><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Using-Analog-to-Digital-Converters-Potentiometers-and-Capacitive-Touch-Sensors"><spanclass="toc-text">Using Analog to Digital Converters, Potentiometers and Capacitive Touch Sensors</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Photoresistors-and-Voltage-Dividers"><spanclass="toc-text">Photoresistors and Voltage Dividers</span></a></li><liclass="toc-item toc-level-3"><aclass="toc-link"href="#Joystick-and-WS2812-LED-demo"><spanclass="toc-text">Joystick and WS2812 LED demo</span></a></li></ol></li><liclass="toc-item toc-level-2"><aclass="toc-link"href="#Closing-Thoughts"><spanclass="toc-text">Closing Thoughts</span></a></li></ol>