<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>soch.cc</title>
		<link>http://192.168.178.37:1313/posts/</link>
		<description>Recent content on soch.cc</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
			<copyright>© 2021-2026 Somē Cho</copyright>
		
		
			<lastBuildDate>Thu, 16 Apr 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="http://192.168.178.37:1313/posts/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>One of my favorite texts</title>
				<link>http://192.168.178.37:1313/posts/one-of-my-favorite-texts/</link>
				<pubDate>Thu, 16 Apr 2026 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/one-of-my-favorite-texts/</guid>
				<description>&lt;p&gt;&lt;em&gt;The Trees&lt;/em&gt; by Philip Larkin&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; was one of my favorite texts when I was doing&#xA;A-Levels literature and it remains one of my favorite poems.&lt;/p&gt;&#xA;&lt;p&gt;It has straight forward structure: three four-lined stanzas, each with&#xA;eight syllables, with one exception. Reading it over and over again, the&#xA;repetitive syllabic structure, the &lt;em&gt;verby&lt;/em&gt; lines and sparse use of adjectives&#xA;make it memorable.&lt;/p&gt;&#xA;&lt;p&gt;In particular, the image of trees as &lt;em&gt;&amp;ldquo;unresting castles&amp;rdquo;&lt;/em&gt; is deeply ingrained&#xA;in my mind.  When I am in Brunei, Malaysia or China, the thick lush forests&#xA;leave a deep impression on me. I look upon the masses of green and feel drawn to&#xA;their opaqueness.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Emulating I2S on STM32F103</title>
				<link>http://192.168.178.37:1313/posts/emulate-i2s-stm32/</link>
				<pubDate>Sat, 08 Nov 2025 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/emulate-i2s-stm32/</guid>
				<description>&lt;p&gt;I like building audio and music related things.  Recently, I&amp;rsquo;ve acquired an&#xA;&lt;a href=&#34;https://invensense.tdk.com/wp-content/uploads/2015/02/INMP441.pdf&#34;&gt;INMP441&lt;/a&gt; as an addition to my slowly growing rack of&#xA;electrical and digital components. The INMP441 is cheap digital microphone that&#xA;uses transmits data via &lt;a href=&#34;https://www.nxp.com/docs/en/user-manual/UM11732.pdf&#34;&gt;I&lt;!-- raw HTML omitted --&gt;2&lt;!-- raw HTML omitted --&gt;S&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;With this and an &lt;a href=&#34;https://www.st.com/en/microcontrollers-microprocessors/stm32f103c8.html&#34;&gt;STM32F103C8&lt;/a&gt;, I set out to make an LED react&#xA;to audio as a &lt;em&gt;&amp;ldquo;Hello, World!&amp;rdquo;&lt;/em&gt; of sorts.&lt;/p&gt;&#xA;&lt;h2 id=&#34;method&#34;&gt;Method&lt;/h2&gt;&#xA;&lt;p&gt;I&lt;!-- raw HTML omitted --&gt;2&lt;!-- raw HTML omitted --&gt;S is not available on low and medium density STM32 devices&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;, but&#xA;is easily emulated, as &lt;a href=&#34;https://www.st.com/resource/en/application_note/an5086-i2s-protocol-emulation-on-stm32l0-series-microcontrollers-using-a-standard-spi-peripheral-stmicroelectronics.pdf&#34;&gt;AN5086&lt;/a&gt; demonstrates. With the INMP411, which&#xA;transmits a 32-bit dataframe comprising 24-bits of audio data, the challenge is&#xA;aligning the data as it comes.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Fastest GPIO Read Speed on STM32F103 (Tight Loops vs DMA)</title>
				<link>http://192.168.178.37:1313/posts/fastest-gpio-read-speed-stm32f103/</link>
				<pubDate>Thu, 06 Nov 2025 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/fastest-gpio-read-speed-stm32f103/</guid>
				<description>&lt;p&gt;When I was building &lt;a href=&#34;https://codeberg.org/some/lookshi&#34;&gt;Lookshi&lt;/a&gt;—a portable&#xA;mini logic analyzer—I asked myself: &lt;em&gt;How fast can you read GPIO on the&#xA;STM32F1?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;I needed to figure out the maximum GPIO read speed on the STM32F103.  I ran four&#xA;benchmarks and measured the number of CPU cycles needed to perform 128&#xA;consecutive GPIO reads.  This small experiment taught me quite a bit about the&#xA;limitations of the STM32F103 but also the ins-and-outs of DMA.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Accidentally bricking an STM8S</title>
				<link>http://192.168.178.37:1313/posts/bricking-stm8/</link>
				<pubDate>Mon, 03 Nov 2025 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/bricking-stm8/</guid>
				<description>&lt;p&gt;The STM8S001J3 is an 8-bit microcontroller that&amp;rsquo;s dirt cheap. I recently bought&#xA;some at 60 cents a piece. Alright, I admit, it&amp;rsquo;s not quite as cheap as dirt. I&#xA;was looking for a cheaper alternative to the rather popular ATTINY85.&lt;/p&gt;&#xA;&lt;p&gt;The STM8 chip has a few quirks. For one, it has 5 usable pins instead of 6, with&#xA;the usual VDD and GND now accompanied by VCAP. It doesn&amp;rsquo;t have GCC support. It&#xA;has no external reset pin (relevant for this story). It uses the SWIM protocol.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Programming AVR chips with an Arduino</title>
				<link>http://192.168.178.37:1313/posts/programming-avr-chips-with-arduino/</link>
				<pubDate>Tue, 07 Oct 2025 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/programming-avr-chips-with-arduino/</guid>
				<description>&lt;p&gt;This is a quick reference on programming any AVR microcontroller using any&#xA;Arduino as an ISP.&lt;/p&gt;&#xA;&lt;h2 id=&#34;required-materials&#34;&gt;Required Materials&lt;/h2&gt;&#xA;&lt;h3 id=&#34;hardware&#34;&gt;Hardware&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An Arduino&lt;/li&gt;&#xA;&lt;li&gt;An AVR microcontroller&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;software&#34;&gt;Software&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Arduino IDE&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;avr-gcc&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;avr-objcopy&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;avrdude&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;step-1---flashing-the-arduino&#34;&gt;Step 1 - Flashing the Arduino&lt;/h2&gt;&#xA;&lt;p&gt;This step sets up the Arduino as an ISP. The easiest way to do so is with the&#xA;Arduino IDE. Simply load the &amp;ldquo;ArduinoISP&amp;rdquo; sketch and upload it to the board.&#xA;This can be found in the examples. Otherwise you can simply copy and paste it&#xA;from this &lt;a href=&#34;https://gist.github.com/srmq/0217a2844a9d82a6913ff989472a98dd&#34;&gt;gist&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Remapping a third-party Switch Controller</title>
				<link>http://192.168.178.37:1313/posts/remapping-switch-controller/</link>
				<pubDate>Sat, 20 Sep 2025 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/remapping-switch-controller/</guid>
				<description>&lt;p&gt;I love rhythm games. I grew up on Guitar Hero. A while back, I bought a&#xA;third-party taiko controller for my partner so that we could play &lt;a href=&#34;https://en.wikipedia.org/wiki/Taiko_no_Tatsujin&#34;&gt;Taiko no&#xA;Tatsujin&lt;/a&gt; together on the Nintendo Switch.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;    &#xA;    &#xA;        &#xA;        &lt;img src=&#34;http://192.168.178.37:1313/images/taiko_hu_d44934d0b3c9a8f0.webp&#34;&#xA;             width=&#34;680&#34;&#xA;             height=&#34;604&#34;&#xA;             alt=&#34;IINE Taiko Switch Controller&#34;&#xA;             loading=&#34;lazy&#34;&#xA;             decoding=&#34;async&#34;&gt;&#xA;    &#xA;&lt;/p&gt;&#xA;&lt;p&gt;In the product listing photos, the controller looked like it was wireless.&#xA;Spoiler: it wasn&amp;rsquo;t.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;    &#xA;    &#xA;        &#xA;        &lt;img src=&#34;http://192.168.178.37:1313/images/taiko-pic_hu_b091982e1ba187d6.webp&#34;&#xA;             width=&#34;680&#34;&#xA;             height=&#34;510&#34;&#xA;             alt=&#34;my Taiko controller&#34;&#xA;             loading=&#34;lazy&#34;&#xA;             decoding=&#34;async&#34;&gt;&#xA;    &#xA;&lt;/p&gt;&#xA;&lt;p&gt;You had to connect the controller via the USB cable to the Switch &lt;em&gt;and&lt;/em&gt; via a&#xA;wifi connection. This inevitably led to a poor Taiko experience and the novelty&#xA;quickly wore off. Despite this, my partner was still able to adjust her timing&#xA;to the latency and beat me many, many times.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Free Continuous Deployment for Reagent Apps with Glitch</title>
				<link>http://192.168.178.37:1313/posts/deploy-reagent-app/</link>
				<pubDate>Sun, 18 Jun 2023 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/deploy-reagent-app/</guid>
				<description>&lt;p&gt;&lt;em&gt;Edit (18.09.2025): There are now many ways to setup continuous deployment for&#xA;some of the more niche stacks out there with the most widely used platforms like&#xA;Netlify or Vercel. The information in this article is outdated.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;So you have a &lt;a href=&#34;https://github.com/reagent-project/reagent&#34;&gt;Reagent&lt;/a&gt; application&#xA;you want to deploy somewhere. Probably, you have experience deploying frontend&#xA;applications on platforms like &lt;a href=&#34;https://vercel.com/&#34;&gt;Vercel&lt;/a&gt;,&#xA;&lt;a href=&#34;https://www.netlify.com/&#34;&gt;Netlify&lt;/a&gt; or &lt;a href=&#34;https://render.com/&#34;&gt;Render&lt;/a&gt;. You try&#xA;this with your ClojureScript application and quickly find out that none of&#xA;these platforms support building ClojureScript applications, &lt;em&gt;because the build&#xA;environment lacks Java&lt;/em&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Testing the p5.cljs editor</title>
				<link>http://192.168.178.37:1313/posts/testing-p5-cljs-editor/</link>
				<pubDate>Thu, 25 May 2023 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/testing-p5-cljs-editor/</guid>
				<description>&lt;p&gt;There was never a time where I the JavaScript ecosystem more than when I tried&#xA;to write tests for the &lt;a href=&#34;https://github.com/somecho/p5-cljs-web-editor&#34;&gt;p5.cljs web&#xA;editor&lt;/a&gt;. Things broken left and&#xA;right, missing plugins, babel, transpiling, modules, &lt;em&gt;npm&lt;/em&gt;. &lt;strong&gt;Disclaimer&lt;/strong&gt;: I&#xA;don&amp;rsquo;t hate the JS ecosystem in earnest. Just &amp;hellip; &lt;em&gt;sometimes&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This article is about why I chose Jest as the test runner for the p5.cljs&#xA;editor and the steps necessary to get it working with third-party components I&#xA;was using.&lt;/p&gt;</description>
			</item>
			<item>
				<title>The Best String Compression in JavaScript</title>
				<link>http://192.168.178.37:1313/posts/best-string-compression-in-javascript/</link>
				<pubDate>Mon, 22 May 2023 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/best-string-compression-in-javascript/</guid>
				<description>&lt;p&gt;&lt;em&gt;edit: 23.05.22 - add benchmarks of gzip, zlib and deflate via wasm-flate&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Lately, I needed to find a decent algorithm to compress strings in JavaScript&#xA;so that I could encode it as a URL param. Since the strings to be encoded where&#xA;&lt;a href=&#34;https://p5js.org/&#34;&gt;p5&lt;/a&gt; sketches that ran in the &lt;a href=&#34;https://p5cljs-editor.onrender.com/&#34;&gt;p5.cljs web editor&lt;/a&gt;, it was important that the&#xA;compressed string was short enough to enable longer sketches to be written.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-algorithms&#34;&gt;The algorithms&lt;/h2&gt;&#xA;&lt;p&gt;After some searching on the web, I found some algorithms that I could use for this purpose. These are:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Learning ClojureScript with P5.js</title>
				<link>http://192.168.178.37:1313/posts/learning-clojurescript-with-p5js/</link>
				<pubDate>Sun, 25 Dec 2022 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/learning-clojurescript-with-p5js/</guid>
				<description>&lt;p&gt;It&amp;rsquo;s December and you know what this means. T&amp;rsquo;is the season to learn new&#xA;languages! Lately, I have been learning ClojureScript and have been having a&#xA;blast creative coding with it. I think you should give it a try.&lt;/p&gt;&#xA;&lt;h2 id=&#34;who-this-tutorial-is-for&#34;&gt;Who this tutorial is for&lt;/h2&gt;&#xA;&lt;p&gt;In order to follow this tutorial, you should be familiar with coding in P5&#xA;already. If you are, great! It will be a breeze to follow along. Let&amp;rsquo;s get&#xA;started setting up.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Creative Coding with Generative Colors in 3 Levels</title>
				<link>http://192.168.178.37:1313/posts/creative-coding-with-generative-colors/</link>
				<pubDate>Fri, 07 Oct 2022 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/creative-coding-with-generative-colors/</guid>
				<description>&lt;p&gt;&lt;em&gt;This article was first published in &lt;a href=&#34;https://sam-tsao.medium.com/3-levels-of-generative-colors-b43bd0d6d609&#34;&gt;a medium article&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;prelude&#34;&gt;Prelude&lt;/h2&gt;&#xA;&lt;p&gt;Alright, I’ll be honest, I’m not an expert. But I’m no spring chicken either. Still,&#xA;having started creative coding in 2019, my understanding of color hasn’t grown&#xA;much.&lt;/p&gt;&#xA;&lt;p&gt;With so many generative techniques out there like&#xA;&lt;a href=&#34;https://www.instagram.com/p/CLhO6M2gZ83/&#34;&gt;jumpflooding&lt;/a&gt;, &lt;a href=&#34;https://www.instagram.com/p/CMPRF8agueR/&#34;&gt;cellular&#xA;automata&lt;/a&gt;, &lt;a href=&#34;https://www.instagram.com/p/CMl_T-tgHlI/&#34;&gt;river&#xA;erosion&lt;/a&gt;, &lt;a href=&#34;https://www.instagram.com/p/CM4IrUFgBny/&#34;&gt;mold slime&#xA;simulation&lt;/a&gt; and so on, it’s easy&#xA;getting caught up in the challenges of implementing them, getting blown away by&#xA;the super ultra mega cool visuals that they create and forgetting about color,&#xA;if not outright avoiding it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Creative Coding with Circles</title>
				<link>http://192.168.178.37:1313/posts/creative-coding-with-circles/</link>
				<pubDate>Fri, 30 Sep 2022 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/creative-coding-with-circles/</guid>
				<description>&lt;p&gt;&lt;em&gt;This article was originally published&#xA;&lt;a href=&#34;https://uxdesign.cc/creative-coding-with-circles-fb4356b7f12c&#34;&gt;here.&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&#xA;&#xA;&#xA;&#xA;    &#xA;    &#xA;        &lt;video autoplay loop muted playsinline&gt;&#xA;            &lt;source src=&#34;http://192.168.178.37:1313/images/circles/1.webm&#34; type=&#34;video/webm&#34;&gt;&#xA;        &lt;/video&gt;&#xA;    &#xA;&lt;/p&gt;&#xA;&lt;p&gt;Right around the beginning of May, in the last few days of April, I began&#xA;learning &lt;a href=&#34;https://openrndr.org/&#34;&gt;OpenRNDR&lt;/a&gt;. As a way to learn the framework,&#xA;the first things I tried to code were circles. And lots of them! I coded&#xA;circles in such profundity as I’ve never had in my life.&lt;/p&gt;&#xA;&lt;p&gt;With that impulse, I found myself coding every single day and most of the work&#xA;I produced involved circles. I would like to share what I found with you!&lt;/p&gt;</description>
			</item>
			<item>
				<title>Atomic Counters in OpenFrameworks</title>
				<link>http://192.168.178.37:1313/posts/atomic-counters-in-openframeworks/</link>
				<pubDate>Sat, 27 Mar 2021 00:00:00 +0000</pubDate>
				<guid>http://192.168.178.37:1313/posts/atomic-counters-in-openframeworks/</guid>
				<description>&lt;p&gt;Since OpenGL 4.2, &lt;a href=&#34;https://www.khronos.org/opengl/wiki/Atomic_Counter&#34;&gt;atomic&#xA;counters&lt;/a&gt; have been a core&#xA;feature. They help solve a variety of problems, like counting the number of red&#xA;pixels in a fragment shader or acting as a form of shared memory that can be&#xA;altered by shaders.&lt;/p&gt;&#xA;&lt;p&gt;The use case I’m interested in is to create a particle system using compute&#xA;shaders. This means that I need to keep track of the number of particles that&#xA;are alive or dead at any given time. To do that in the GPU, I can use atomic&#xA;counters.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
