mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

8.1K
active users

#esp32c3

2 posts2 participants0 posts today
diyelectromusic<p>More multi-SPI display messing around. This time using Waveshare Zero format boards, finding a common way to drive them from a RP2040, ESP32S3 or ESP32C3.</p><p>I hadn't realised SPI on the ESP32S3 was so complex!</p><p>(or that finding some common physical pins across the range required so much software messing about too).</p><p><a href="https://diyelectromusic.com/2025/07/20/arduino-with-multiple-displays-part-2/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">diyelectromusic.com/2025/07/20</span><span class="invisible">/arduino-with-multiple-displays-part-2/</span></a></p><p><a href="https://mastodon.social/tags/WaveshareZero" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WaveshareZero</span></a> <a href="https://mastodon.social/tags/RP2040" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RP2040</span></a> <a href="https://mastodon.social/tags/ESP32C3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32C3</span></a> <a href="https://mastodon.social/tags/ESP32S3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32S3</span></a></p>
Simple DIY Electronic Music Projects<p><strong>Arduino with Multiple Displays – Part&nbsp;2</strong></p><p>As I mentioned in my last post on <a href="https://diyelectromusic.com/2025/07/19/arduino-with-multiple-displays/" rel="nofollow noopener" target="_blank">Arduino with Multiple&nbsp;Displays</a> I’m going to look at other microcontrollers too. This post takes a wander through my <a href="https://diyelectromusic.com/2025/02/17/waveshare-zero-pimoroni-tiny-and-neopixels/" rel="nofollow noopener" target="_blank">Waveshare Zero and similar</a> format boards that each support one of the RP2040, ESP32-C3 or ESP32-S3.</p><p><em><strong>Warning!</strong> I strongly recommend using old or second hand equipment for your experiments.&nbsp; I am not responsible for any damage to expensive instruments!</em></p><p>These are the key Arduino tutorials for the main concepts used in this project:</p><ul><li><a href="https://diyelectromusic.com/2025/07/19/arduino-with-multiple-displays/" rel="nofollow noopener" target="_blank">Arduino with Multiple&nbsp;Displays</a></li><li><a href="https://emalliab.wordpress.com/2025/07/19/small-microcontroller-displays/" rel="nofollow noopener" target="_blank">https://emalliab.wordpress.com/2025/07/19/small-microcontroller-displays/</a></li></ul><p>If you are new to microcontrollers, see the&nbsp;<a href="https://diyelectromusic.wordpress.com/getting-started/" rel="nofollow noopener" target="_blank">Getting Started</a> pages.</p><p><strong>Parts list</strong></p><ul><li>A Waveshare Zero format board or similar</li><li>2x 0.96″ ST7735 60×180 SPI TFT displays.</li><li>Breadboard and jumper wires.</li></ul><p>Once again I’m using displays that look like this – note the order of the pins.</p><p><strong>The Circuit</strong></p><p>All circuits are a variation on the above, requiring the following ideal connections:</p>DisplayFunctionRP2040ESP32-C3ESP32-S3BLKBacklight control<br>(not required)N/CN/CN/CCSChip select<br>One per display.5 or any SPI0 CS1010DCData/Command888RESReset1499SDAData (MOSI)3 or any SPI0 MOSI6 or 711SCLClock (SCLK)2 or any SPI0 SCLK4 or 612VCCPower3V33V33V3GNDGroundGNDGNDGND<p>For the explanations of the pin choices, and what it means for the code, see the following sections.</p><p><strong>ESP32-S3 Zero</strong></p><p>In the Arduino IDE, using board ESP32-&gt; Waveshare ESP32-S3-Zero.</p><p>There are several SPI buses on the ESP32-S3, but they have fixed uses as follows (see the ESP32-S3 Technical Reference Manual Chapter 30 “SPI Controller”):</p><ul><li>SPI 0: Reserved for internal use.</li><li>SPI 1: Reserved for internal use.</li><li>SPI 2: General purpose use – often called FSPI in the documentation.</li><li>SPI 3: General purpose use – often called SPI or SPI3.</li></ul><p>Sometimes the two SPI buses are called VSPI and HSPI but I think that is really terminology from the original ESP32 rather than the ESP32-S3.</p><p>The ESP32 Arduino core for the <a href="https://github.com/espressif/arduino-esp32/blob/master/variants/waveshare_esp32_s3_zero/pins_arduino.h" rel="nofollow noopener" target="_blank">Waveshare ESP32-S3 Zero variant</a> defines the following:</p><pre>// Mapping based on the ESP32S3 data sheet - alternate for SPI2<br>static const uint8_t SS = 34; // FSPICS0<br>static const uint8_t MOSI = 35; // FSPID<br>static const uint8_t MISO = 37; // FSPIQ<br>static const uint8_t SCK = 36; // FSPICLK</pre><p>By default the Adafruit libraries will use the boards default SPI interface, as defined in the variants.h file – i.e. the above.</p><p>When it comes to assigning SPI devices to GPIO there are a few considerations (see the “ESP32-S3 Technical Reference Manual, Chapter 6 “IO MUX and GPIO Matrix”):</p><ul><li>In general, any GPIO can be mapped onto any SPI function. However…</li><li>Some GPIO have special “strapping” functions so are best avoided.</li><li>Some GPIOs have a default SPI function that bypasses the GPIO MUX routing, so allows for better performance (see section 6.6 “Direct Input and Output via IO MUX”).</li></ul><p>From my reading of the reference manual I believe the following are default “non-MUX” SPI connections:</p><p>In the previous table, where SPI3 is mentioned, then the entry for “Direct IO via IO MUX” is set to “no”, so I’m guessing that isn’t available.</p><p>But now we can see why the Arduino core is using GPIO 34-37, but we can also see that GPIO 10-13 would be an alternative (fast) option too.</p><p>The problem is that not all of GPIO 34-37 are broken out on a Waveshare ESP32-S3 Zero, so I need to use the alternative pinouts. Aside: this makes no sense to me that these are the defaults in the Waveshare ESP32-S3 Zero’s “variant.h” file, but anyway…</p><p>To use a different SPI interface requires using a constructor that passes in an initialised SPI instance. There is an example in the ESP32 core for setting up multiple SPI buses here: <a href="https://github.com/espressif/arduino-esp32/blob/master/libraries/SPI/examples/SPI_Multiple_Buses/SPI_Multiple_Buses.ino" rel="nofollow noopener" target="_blank">https://github.com/espressif/arduino-esp32/blob/master/libraries/SPI/examples/SPI_Multiple_Buses/SPI_Multiple_Buses.ino</a></p><p>This leads to the pins as defined in the previous table, and the code below to setup one of the displays.</p><pre>#include &lt;Adafruit_GFX.h&gt; // Core graphics library<br>#include &lt;Adafruit_ST7735.h&gt; // Hardware-specific library for ST7735<br>#include &lt;SPI.h&gt;<br><br>#define SPI_SS 10<br>#define SPI_MOSI 11<br>#define SPI_SCLK 12<br>#define SPI_MISO 13<br>SPIClass MySPI(FSPI);<br><br>#define TFT_CS SPI_SS<br>#define TFT_RST 9<br>#define TFT_DC 8<br>Adafruit_ST7735 tft = Adafruit_ST7735(&amp;MySPI, TFT_CS, TFT_DC, TFT_RST);<br><br>void setup() {<br> MySPI.begin(SPI_SCLK, SPI_MISO, SPI_MOSI, SPI_SS);<br> pinMode(SPI_SS, OUTPUT);<br> tft.initR(INITR_MINI160x80_PLUGIN);<br>}</pre><p><strong>ESP32-C3 Zero</strong></p><p>In the Arduino IDE, using board ESP32-&gt; ESP32C3 Dev Module.</p><p>Again there are several SPI buses on the ESP32-C3, with the same fixed uses as follows (see the ESP32-C3 Technical Reference Manual Chapter 30 “SPI Controller”):</p><ul><li>SPI 0: Reserved for internal use.</li><li>SPI 1: Reserved for internal use.</li><li>SPI 2: General purpose use – sometimes called GP-SPI in the documentation.</li></ul><p>The ESP32-C3 also has a very similar SPI arrangement to the ESP32-S3, in that whilst any pin can be configured for SPI usage, there are certain hard-wired optional arrangements that bypass the GPIO routing matrix.</p><p>The faster (direct to IO MUX) pins are as follows (<a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/peripherals/spi_master.html#gpio-matrix-and-io-mux" rel="nofollow noopener" target="_blank">more here</a>):</p><ul><li>CS0 – 10</li><li>SCLK – 6</li><li>MISO – 2</li><li>MOSI – 7</li></ul><p>Curiously, the <a href="https://github.com/espressif/arduino-esp32/blob/master/variants/esp32c3/pins_arduino.h" rel="nofollow noopener" target="_blank">general ESP32-C3 Arduino variant</a> defines them as follows:</p><pre>static const uint8_t SS = 7;<br>static const uint8_t MOSI = 6;<br>static const uint8_t MISO = 5;<br>static const uint8_t SCK = 4;</pre><p>From the Technical Reference manual, we can see that the default Arduino definitions above, do not support the non-routed, direct-to-IO MUX pin mappings, which from the table below do indeed map onto GPIO 2, 6, 7, 10.</p><p>In terms of using a Waveshare ESP32-C3 Zero, both combinations would be supported on the broken out GPIO, so from a software point of view, the Adafruit libraries could be used “as is” with the default mapping, or with a custom SPI definition (as shown above) with the more bespoke, but faster, mapping.</p><p><strong>RP2040 Zero</strong></p><p>This is using the (unofficial) RP2040 core from here: <a href="https://github.com/earlephilhower/arduino-pico" rel="nofollow noopener" target="_blank">https://github.com/earlephilhower/arduino-pico</a>, where this is an entry: RP2040 -&gt; Waveshare RP2040 Zero.</p><p>The RP2040 has two SPI peripherals and the SPI functions are mapped onto specific sets of GPIO pins. This gives a range of flexibility, but not arbitrary flexibility. The board definition file for the Waveshare RP2040 Zero provides this as a default:</p><pre>// SPI<br>#define PIN_SPI0_MISO (4u)<br>#define PIN_SPI0_MOSI (3u)<br>#define PIN_SPI0_SCK (2u)<br>#define PIN_SPI0_SS (5u)<br><br>#define PIN_SPI1_MISO (12u)<br>#define PIN_SPI1_MOSI (15u)<br>#define PIN_SPI1_SCK (14u)<br>#define PIN_SPI1_SS (13u)</pre><p>Note that the SPI1 pins for the Waveshare RP2040 Zero are not all on the standard header connections, some are on the additional pin headers across the bottom.</p><p>Using a bespoke configuration is possible using a series of calls to set the SPI pins as shown below.</p><pre> SPI.setRX(SPI_MISO);<br> SPI.setCS(SPI_SS);<br> SPI.setSCK(SPI_SCLK);<br> SPI.setTX(SPI_MOSI);<br> SPI.begin(true);</pre><p>To use pins for SPI1, replace SPI above with SPI1. As long as this happens prior to the call to the Adafruit libraries, everything works fine.</p><p><strong>A Common Option</strong></p><p>It would be nice to find a set of physical pin connections that I know would always work regardless of the board in use: RP2040, ESP32-S3 or ESP32-C3.</p><p>With careful noting of the RP2040 limitations, I think that is largely possible with the following. Even though the GPIO numbers are different, the physical pins are common on all three boards.</p>DisplayFunctionWS PinRP2040ESP32-C3ESP32-S3BLKBacklight control<br>(not required)N/CN/CN/CCS1Chip select<br>Display 1H2 P6GP5GP9GP10DCData/CommandH2 P5GP4GP10GP11RESResetH2 P9GP8GP6GP7SDAData (MOSI)H2 P8GP7GP7GP8SCLClock (SCLK)H2 P7GP6GP8GP9VCCPowerH1 P33V33V33V3GNDGroundH1 P2GNDGNDGNDCS2CS Display 2H1 P9GP14GP5GP6CS3CS Display 3H1 P8GP15GP4GP5CS4CS Display 4H1 P7GP26GP3GP4<p>A couple of notes:</p><ul><li>I’ve avoided pins 1-4 on header 2, as the ESP32-C3 can’t use them for SPI and they support either the UART or USB.</li><li>I’ve had to include a MISO (SPI RX) pin in each configuration too, so I’ve just picked something that can be ignored. For RP2040 that has to be one of GP0, GP4 or GP16 however, which could clash with either the UART, the above configuration for DC pin, or the onboard WS2812 LED, but there isn’t much that can be done.</li><li>I’ve allowed three consecutive pins on the first header for optional additional CS pins for displays 2 to 4.</li></ul><p>Here is the full set of configurable code for the above:</p><pre>#include &lt;Adafruit_GFX.h&gt; // Core graphics library<br>#include &lt;Adafruit_ST7735.h&gt; // Hardware-specific library for ST7735<br>#include &lt;SPI.h&gt;<br><br>//#define WS_RP2040_ZERO<br>//#define WS_ESP32C3_ZERO<br>#define WS_ESP32S3_ZERO<br><br>#ifdef WS_RP2040_ZERO<br>#define SPI_SS 5<br>#define SPI_MOSI 7<br>#define SPI_SCLK 6<br>#define SPI_MISO 4 // Not used<br>#define SPI_BUS SPI<br>#define TFT_CS1 SPI_SS<br>#define TFT_CS2 14<br>#define TFT_CS3 15<br>#define TFT_CS4 26<br>#define TFT_RST 8<br>#define TFT_DC 4<br>#endif<br><br>#ifdef WS_ESP32C3_ZERO<br>#define SPI_SS 9<br>#define SPI_MOSI 7<br>#define SPI_SCLK 8<br>#define SPI_MISO 0 // Not used<br>SPIClass MySPI(FSPI);<br>#define TFT_CS1 SPI_SS<br>#define TFT_CS2 5<br>#define TFT_CS3 4<br>#define TFT_CS4 3<br>#define TFT_RST 6<br>#define TFT_DC 10<br>#endif<br><br>#ifdef WS_ESP32S3_ZERO<br>#define SPI_SS 10<br>#define SPI_MOSI 8<br>#define SPI_SCLK 9<br>#define SPI_MISO 1 // Not used<br>SPIClass MySPI(FSPI);<br>#define TFT_CS1 SPI_SS<br>#define TFT_CS2 6<br>#define TFT_CS3 5<br>#define TFT_CS4 4<br>#define TFT_RST 7<br>#define TFT_DC 11<br>#endif<br><br>#ifdef WS_RP2040_ZERO<br>Adafruit_ST7735 tft1 = Adafruit_ST7735(TFT_CS1, TFT_DC, TFT_RST);<br>Adafruit_ST7735 tft2 = Adafruit_ST7735(TFT_CS2, TFT_DC, -1);<br>#else<br>Adafruit_ST7735 tft1 = Adafruit_ST7735(&amp;MySPI, TFT_CS1, TFT_DC, TFT_RST);<br>Adafruit_ST7735 tft2 = Adafruit_ST7735(&amp;MySPI, TFT_CS2, TFT_DC, -1);<br>#endif<br><br>void setup() {<br>#ifdef WS_RP2040_ZERO<br> SPI_BUS.setRX(SPI_MISO);<br> SPI_BUS.setCS(SPI_SS);<br> SPI_BUS.setSCK(SPI_SCLK);<br> SPI_BUS.setTX(SPI_MOSI);<br> SPI_BUS.begin(true);<br>#else<br> MySPI.begin(SPI_SCLK, SPI_MISO, SPI_MOSI, SPI_SS);<br> pinMode(SPI_SS, OUTPUT);<br>#endif<br><br> tft1.initR(INITR_MINI160x80_PLUGIN);<br> tft2.initR(INITR_MINI160x80_PLUGIN);<br> tft1.setRotation(3);<br> tft1.fillScreen(ST77XX_BLACK);<br> tft2.setRotation(3);<br> tft2.fillScreen(ST77XX_BLACK);<br>}<br><br>void loop() {<br> unsigned long time = millis();<br> tft1.fillRect(10, 20, tft1.width(), 20, ST77XX_BLACK);<br> tft1.setTextColor(ST77XX_GREEN);<br> tft1.setCursor(10, 20);<br> tft1.print(time, DEC);<br> delay(100);<br><br> time = millis();<br> tft2.fillRect(10, 20, tft2.width(), 20, ST77XX_BLACK);<br> tft2.setTextColor(ST77XX_MAGENTA);<br> tft2.setCursor(10, 20);<br> tft2.print(time, DEC);<br> delay(400);<br>}</pre><p><strong>Closing Thoughts</strong></p><p>It is a little annoying that these great boards don’t share a re-usable, common pinout in terms of naming and positions, but I guess that isn’t the main focus for these systems.</p><p>Still, it seems that a common hardware pinout can be made that supports many displays, which is great, as I’d really like to get a number of them onto a PCB!</p><p>Kevin</p><p></p><p><a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/arduino-uno/" target="_blank">#arduinoUno</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/esp32c3/" target="_blank">#esp32c3</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/esp32s3/" target="_blank">#ESP32s3</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/rp2040/" target="_blank">#rp2040</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/st7735/" target="_blank">#st7735</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/tft-display/" target="_blank">#tftDisplay</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/waveshare-zero/" target="_blank">#WaveshareZero</a></p>
Habr<p>О контроллере батареи ИБП (часть 2)</p><p>О сколько нам открытий чудных ... Судя по результатам голосования и комментариям к предыдущей статье , к вопросу контроля АКБ у самых простых ИБП есть некоторый интерес. Данная статья - продолжение данной темы. Сейчас прототип собран на макетной плате (токовый шунт к которому подключено два АПЦ). Измеритель напряжения и тока INA3221, как рекомендовали в комментариях, я решил не использовать, так как дискретность его измерения 8мВ сравнима с дискретностью 12-ти битного АПЦ в обычном микроконтроллере (для ESP32 получается точность измерения около 6мВ).</p><p><a href="https://habr.com/ru/articles/924614/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">habr.com/ru/articles/924614/</span><span class="invisible"></span></a></p><p><a href="https://zhub.link/tags/%D0%B8%D0%B1%D0%BF_%D0%B4%D0%BB%D1%8F_%D0%B4%D0%BE%D0%BC%D0%B0" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ибп_для_дома</span></a> <a href="https://zhub.link/tags/%D0%B0%D0%BA%D0%B1" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>акб</span></a> <a href="https://zhub.link/tags/%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D1%8C_%D0%90%D0%9A%D0%91" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>контроль_АКБ</span></a> <a href="https://zhub.link/tags/%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82%D0%B2%D0%B5%D1%89%D0%B5%D0%B9" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>интернетвещей</span></a> <a href="https://zhub.link/tags/iot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>iot</span></a> <a href="https://zhub.link/tags/esp32" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32</span></a> <a href="https://zhub.link/tags/esp32c3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32c3</span></a></p>
diyelectromusic<p>Part 6 pairs the Synth module with a XIAO expander for some simple IO.</p><p><a href="https://diyelectromusic.com/2025/06/29/xiao-esp32-c3-midi-synthesizer-part-6/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">diyelectromusic.com/2025/06/29</span><span class="invisible">/xiao-esp32-c3-midi-synthesizer-part-6/</span></a></p><p><a href="https://mastodon.social/tags/XIAO" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>XIAO</span></a> <a href="https://mastodon.social/tags/MIDI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>MIDI</span></a> <a href="https://mastodon.social/tags/ESP32C3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32C3</span></a></p>
Simple DIY Electronic Music Projects<p><strong>XIAO ESP32-C3 MIDI Synthesizer – Part&nbsp;6</strong></p><p>Expanding on my previous posts, I thought it might be interesting to see how I might be able to add some additional IO to the MIDI Synth. This is an exploration of some options there.</p><ul><li><a href="https://diyelectromusic.com/2025/06/26/xiao-esp32-c3-midi-synthesizer/" rel="nofollow noopener" target="_blank">Part 1</a> – Getting started and getting code running.</li><li><a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-2/" rel="nofollow noopener" target="_blank">Part&nbsp;2</a> – Swapping the ESP32-C3 for a SAMD21 to get USB MIDI.</li><li><a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-3/" rel="nofollow noopener" target="_blank">Part&nbsp;3</a> – Taking a deeper look at the SAM2695 itself.</li><li><a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-4/" rel="nofollow noopener" target="_blank">Part&nbsp;4</a> – A USB MIDI Synth Module using the SAMD21 again as a USB MIDI Host.</li><li><a href="https://diyelectromusic.com/2025/06/28/xiao-esp32-c3-midi-synthesizer-part-5/" rel="nofollow noopener" target="_blank">Part&nbsp;5</a> – A Serial MIDI Synth Module using the original ESP32-C3.</li><li><a href="https://diyelectromusic.com/2025/06/29/xiao-esp32-c3-midi-synthesizer-part-6/" rel="nofollow noopener" target="_blank">Part&nbsp;6</a> – Pairs the Synth with a XIAO Expansion board to add display and potentiometers.</li></ul><p><em><strong>Warning!</strong> I strongly recommend using old or second hand equipment for your experiments.&nbsp; I am not responsible for any damage to expensive instruments!</em></p><p>These are the key tutorials for the main concepts used in this project:</p><ul><li><a href="https://wiki.seeedstudio.com/xiao_midi_synthesizer/" rel="nofollow noopener" target="_blank">Getting Started with the XIAO MIDI Synthesizer</a></li><li><a href="https://diyelectromusic.com/2023/03/12/xiao-samd21-arduino-and-midi/" rel="nofollow noopener" target="_blank">XIAO SAMD21, Arduino and&nbsp;MIDI</a></li><li><a href="https://diyelectromusic.com/2023/04/11/xiao-samd21-arduino-and-midi-part-6/" rel="nofollow noopener" target="_blank">XIAO SAMD21, Arduino and MIDI – Part&nbsp;6</a></li></ul><p>If you are new to microcontrollers, see the&nbsp;<a href="https://diyelectromusic.wordpress.com/getting-started/" rel="nofollow noopener" target="_blank">Getting Started</a> pages.</p><p><strong>The Synth Grove Connector</strong></p><p>One option to immediately explore for me was the Grove connector on the Synth – highlighted by the blue rectangle in the photo below. I’m thinking at this stage of the XIAO Expander Module (<a href="https://diyelectromusic.com/2023/04/11/xiao-samd21-arduino-and-midi-part-6/" rel="nofollow noopener" target="_blank">more here</a>) and how that might give some options for easily hooking up to the Synth.</p><p>There one obvious issue with this, and one not so obvious issue.</p><p>First, of course, there is no access to this connector through the case. My initial thought was to simply remove the PCB from the case and use it as a stand-alone board. On initial inspection it seemed that there were two screws holding it down. Not so, a more thorough inspection (after remove the two screws and still not being able to remove it), revealed a third screw underneath the “light pipe” for the LEDs.</p><p>Unfortunately that light pipe is pretty well wedged into the case making removal particularly tricky. But without removing the light pipe, it isn’t possible to get to the screw at all.</p><p>I did wonder about making a hole in the 3D printed case. A better option might be to get hold of the published 3D print files and add a hole and make my own (they are available via the product page).</p><p>But both options would probably end up changing the original case somehow – even if printing my own, I still need to get the original PCB out somehow and that brings me back to the light pipe issue.</p><p>The second issue isn’t quite so obvious. In that photo we can see that the pins for the Grove connector are labelled as follows (top to bottom):</p><ul><li>NC</li><li>TX</li><li>5V</li><li>GND</li></ul><p>The UART on the XIAO expander board, which I’d like to use, is labelled:</p><ul><li>RX7</li><li>TX6</li><li>3V3</li><li>GND</li></ul><p>Checking in with the Synth schematic, the connector is wired as follows:</p><p>SYS_MIDI connects to the MIDI_IN pin of the SAM2695, so actually connecting “TX to TX” in this instance should be ok.</p><p>5V might be an issue though, as it really does look like (to me) that it really means 5V – it is the input to the TPL740F33 that generates the 3V3 power signal, as well as feeding the amplifier directly. The datasheet of the TPL740F33 does seem to imply that if receiving 3V3 it can still generate 3V3 so it might be ok? The amplifier obviously won’t be as powerful though running off 3V3.</p><p>Anyway, for now, instead I’ve just opted to use the GPIO again, wired into the expansion sockets with the XIAO removed.</p><p>At the XIAO expander end, I’ve used the additional pins rather than the Grove connector, as they support a 5V output.</p><p>The downsides to this approach:</p><ul><li>I’m not using the Grove connectors, which would have been really neat.</li><li>I have no access to the four buttons on the XIAO MIDI Synth.</li></ul><p>But I do now have access to two I2C Grove connectors, a GPIO Grove, and the RX part of the UART Grove too as well as the on-board display.</p><p>If a XIAO SAMD21 is used, then the previous code for USB to the Synth can be used directly – see <a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-2/" rel="nofollow noopener" target="_blank">XIAO ESP32-C3 MIDI Synthesizer – Part&nbsp;2</a>.</p><p>If the XIAO ESP32-C3 is used, then an additional serial MIDI connection is required. This can be connected to the Grove UART connector (using the RX pin, and leaving TX unconnected) or the RX pin of the additional 8-way pin header on the expansion board. Then the code from this will work directly: <a href="https://diyelectromusic.com/2025/06/28/xiao-esp32-c3-midi-synthesizer-part-5/" rel="nofollow noopener" target="_blank">XIAO ESP32-C3 MIDI Synthesizer – Part&nbsp;5</a>.</p><p><strong>Adding a Display and Program Control</strong></p><p>I already have some code that has done this for a XIAO on an expansion board here <a href="https://diyelectromusic.com/2023/04/11/xiao-samd21-arduino-and-midi-part-6/" rel="nofollow noopener" target="_blank">XIAO SAMD21, Arduino and MIDI – Part&nbsp;6</a>.</p><p>But for this to work usefully with the Synth module, I need to adjust the routing so that MIDI goes from USB to serial, but the program change messages are also sent via serial to the synth module. That has already been address in previous parts, to I just need to merge the code with that from <a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-4/" rel="nofollow noopener" target="_blank">XIAO ESP32-C3 MIDI Synthesizer – Part&nbsp;4</a>.</p><p>This is the result.</p><p>There is a bit of jitter on the analog pot, but that is only because I’m using the original fairly simplified algorithm to detect changes. If I was fussed about it, I’d reuse the averaging class from <a href="https://diyelectromusic.com/2025/06/23/arduino-midi-atari-paddles/" rel="nofollow noopener" target="_blank">Arduino MIDI Atari&nbsp;Paddles</a>. And to be honest, a capacitor on the pot would probably go quite a long way too…</p><p>As a test, I also powered the device from the Grove UART port connecting it as follows:</p><ul><li>Expander GND – GND Synth</li><li>Expander 3V3 – 5V IN Synth</li><li>Expander TX – RX/D6 Synth</li><li>Expander RX – N/C</li></ul><p>And this all worked fine. So I think a Grove to Grove lead would work fine if I had access to the Synth’s Grove port.</p><p>This does mean that the exact same code can work with the M5 Synth module using a Grove to Grove lead. The downside of this, even though it is a lot simpler in connectivity terms, is that there is now external audio out like there is on the XIAO Synth.</p><p>For completeness the same code can be used with the XIAO ESP32-C3 and serial MIDI, see the photo at the start of this blog.</p><p>To turn off all USB handling in the code, the following must be commented out:</p><pre>//#define HAS_USB<br>//#define SER_TO_USB<br>//#define MIDI_USB_PCCC</pre><p>For other parts of the code, the Arduino abstraction for A0 maps over to the ESP32-C3 fine. The only thing to watch out for is the increased analog resolution from 10 to 12 bits, but a call to analogReadResolution(10) drops that back to the expected 10 bits.</p><p>Oh and the Serial port to use is different:</p><ul><li>XIAO SAMD21: Serial1</li><li>XIAO ESP32-C3: Serial0</li></ul><p><a href="https://github.com/diyelectromusic/sdemp/tree/main/src/SDEMP/XiaoSynthMIDIPCCC" rel="nofollow noopener" target="_blank">Find it on GitHub here</a>.</p><p><strong>Closing Thoughts</strong></p><p>If I can be bothered, it would be nice to actually display the General MIDI voice name on the display. The SAM2695 also has its MT-32 mode, so having some means of selecting that might be interesting too.</p><p>And so far I’ve largely only messed about with driving it on a single MIDI channel, so there is a lot more that could be done there.</p><p>Kevin</p><p></p><p><a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/control-change/" target="_blank">#controlChange</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/esp32c3/" target="_blank">#esp32c3</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/midi/" target="_blank">#midi</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/program-change/" target="_blank">#programChange</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/sam2695/" target="_blank">#SAM2695</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/samd21/" target="_blank">#samd21</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/usb-midi/" target="_blank">#usbMidi</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/xiao/" target="_blank">#xiao</a></p>
Simple DIY Electronic Music Projects<p><strong>XIAO ESP32-C3 MIDI Synthesizer – Part&nbsp;2</strong></p><p>After an initial play with the <a href="https://diyelectromusic.com/2025/06/26/xiao-esp32-c3-midi-synthesizer/" rel="nofollow noopener" target="_blank">XIAO ESP32-C3 MIDI&nbsp;Synthesizer</a> the first thing I wanted to try was to swap out the ESP32-C3 for something else, just to see what could be done.</p><ul><li><a href="https://diyelectromusic.com/2025/06/26/xiao-esp32-c3-midi-synthesizer/" rel="nofollow noopener" target="_blank">Part 1</a> – Getting started and getting code running.</li><li><a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-2/" rel="nofollow noopener" target="_blank">Part&nbsp;2</a> – Swapping the ESP32-C3 for a SAMD21 to get USB MIDI.</li><li><a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-3/" rel="nofollow noopener" target="_blank">Part&nbsp;3</a> – Taking a deeper look at the SAM2695 itself.</li><li><a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-4/" rel="nofollow noopener" target="_blank">Part&nbsp;4</a> – A USB MIDI Synth Module using the SAMD21 again as a USB MIDI Host.</li><li><a href="https://diyelectromusic.com/2025/06/28/xiao-esp32-c3-midi-synthesizer-part-5/" rel="nofollow noopener" target="_blank">Part&nbsp;5</a> – A Serial MIDI Synth Module using the original ESP32-C3.</li><li><a href="https://diyelectromusic.com/2025/06/29/xiao-esp32-c3-midi-synthesizer-part-6/" rel="nofollow noopener" target="_blank">Part&nbsp;6</a> – Pairs the Synth with a XIAO Expansion board to add display and potentiometers.</li></ul><p>The XIAO range of boards support a range of options and Adafruit’s QTPy boards are also pin-compatible. For me, I have the following as possibilities:</p><ul><li>XIAO SAMD21</li><li>XIAO RP2040</li><li>QTPy SAMD21</li><li>QTPy ESP32-C3</li></ul><p>I also already have a range of projects that have looked at some of the above: <a href="https://diyelectromusic.com/tag/xiao/" rel="nofollow noopener" target="_blank">https://diyelectromusic.com/tag/xiao/</a></p><p>So before I get too far into what the SAM2695 itself can do, I thought I’d try a few alternative options right from the start. This post looks at how to use the XIAO SAMD21 to support USB access to the Synth.</p><p><em><strong>Warning!</strong> I strongly recommend using old or second hand equipment for your experiments.&nbsp; I am not responsible for any damage to expensive instruments!</em></p><p>These are the key tutorials for the main concepts used in this project:</p><ul><li><a href="https://wiki.seeedstudio.com/xiao_midi_synthesizer/" rel="nofollow noopener" target="_blank">Getting Started with the XIAO MIDI Synthesizer</a></li><li><a href="https://diyelectromusic.com/2023/03/12/xiao-samd21-arduino-and-midi/" rel="nofollow noopener" target="_blank">XIAO SAMD21, Arduino and&nbsp;MIDI</a></li><li><a href="https://diyelectromusic.com/2022/04/21/circuitpython-usb-to-serial-midi-router/" rel="nofollow noopener" target="_blank">CircuitPython USB to Serial MIDI&nbsp;Router</a></li></ul><p>If you are new to microcontrollers, see the&nbsp;<a href="https://diyelectromusic.wordpress.com/getting-started/" rel="nofollow noopener" target="_blank">Getting Started</a> pages.</p><p><strong>XIAO SAMD21 as a USB Device</strong></p><p>My <a href="https://diyelectromusic.com/2022/04/21/circuitpython-usb-to-serial-midi-router/" rel="nofollow noopener" target="_blank">CircuitPython USB to Serial MIDI&nbsp;Router</a> uses a XIAO SAMD21 in USB Device mode, so replacing the ESP32C3 with a SAMD21, should allow it to be used as a USB MIDI device.</p><p>The principle is exactly the same as the previous project but instead of a serial MIDI interface connected to the XIAO UART, it is connected directly to the SAMD21.</p><p>This should work just as well with a QTPy SAMD21 too.</p><p>There are two options for USB MIDI device support:</p><ul><li>Using CircuitPython: e.g. <a href="https://diyelectromusic.com/2022/04/21/circuitpython-usb-to-serial-midi-router/" rel="nofollow noopener" target="_blank">CircuitPython USB to Serial MIDI&nbsp;Router</a> – Using CircuitPython.</li><li>Using Arduino: e.g.<ul><li><a href="https://diyelectromusic.com/2023/03/27/xiao-samd21-arduino-and-midi-part-4/" rel="nofollow noopener" target="_blank">XIAO SAMD21, Arduino and MIDI – Part&nbsp;4</a> – Using Arduino or TinyUSB.</li><li><a href="https://diyelectromusic.com/2025/06/28/xiao-usb-device-to-serial-midi-converter/" rel="nofollow noopener" target="_blank">XIAO USB Device to Serial MIDI&nbsp;Converter</a> – A simpler option for Arduino.</li></ul></li></ul><p><strong>Using CircuitPython</strong></p><p>The following steps are required for the CircuitPython version which, when it works, is the simplest:</p><ul><li>Set up the XIAO SAMD21 for CircuitPython as described here: <a href="https://wiki.seeedstudio.com/Seeeduino-XIAO-CircuitPython/" rel="nofollow noopener" target="_blank">https://wiki.seeedstudio.com/Seeeduino-XIAO-CircuitPython/</a></li><li>Install the adafruit_midi libraries into the lib folder</li><li>Use the code from here and save it as code.py: <a href="https://github.com/diyelectromusic/sdemp/blob/main/src/SDEMP/CircuitPython/USBUARTMidiRouter.py" rel="nofollow noopener" target="_blank">https://github.com/diyelectromusic/sdemp/blob/main/src/SDEMP/CircuitPython/USBUARTMidiRouter.py</a></li><li>Reboot</li></ul><p>When I first tried this, everything hung up. It turned out that the XIAO needs to use board.LED_INVERTED as the built-in LED label. Once that was updated all was good.</p><p>I also, as a precaution, added the following to boot.py:</p><pre>import usb_hid, usb_midi<br>usb_hid.disable()<br>usb_midi.enable()</pre><p>But this is probably unnecessary for the XIAO SAMD21.</p><p>The XIAO pops up as a USB MIDI device called “CircuitPython Audio” and any MIDI commands (such as note, Program Change, or control messages) sent to the device are forwarded directly onto the SAM2695 synth.</p><p>Whilst this is the simplest way to do this, it isn’t the most performant! Will a lot of notes (like my Rite of Spring example) some MIDI messages might not be accurately processed in time and others might get lost.</p><p><strong>Using Arduino</strong></p><p>It just so happens that the code I used for <a href="https://diyelectromusic.com/2023/03/27/xiao-samd21-arduino-and-midi-part-4/" rel="nofollow noopener" target="_blank">XIAO SAMD21, Arduino and MIDI – Part&nbsp;4</a> “just works”. It is a little over the top, in that it sets up three serial ports, so will almost certainly clash with something else on the synth, but it does work if no buttons are pressed!</p><p>Use the code from: <a href="https://github.com/diyelectromusic/sdemp/tree/main/src/SDEMP/XiaoSimpleUSBMIDIMerge" rel="nofollow noopener" target="_blank">https://github.com/diyelectromusic/sdemp/tree/main/src/SDEMP/XiaoSimpleUSBMIDIMerge</a></p><p>Download this using the “Seeeduino XIAO” board setting in the Arduino IDE and it should appear as a USB MIDI device called “Seeed XIAO M0” or something like that.</p><p>Performance wise, this passes the Rite of Spring test very well.</p><p>Alternatively, the code from <a href="https://diyelectromusic.com/2025/06/28/xiao-usb-device-to-serial-midi-converter/" rel="nofollow noopener" target="_blank">XIAO USB Device to Serial MIDI&nbsp;Converter</a> focusses more directly on the USB to serial conversion and includes an option for serial to serial routing too, which is more useful in this particular case.</p><p><strong>XIAO SAMD21 as USB Host</strong></p><p>In the post <a href="https://diyelectromusic.com/2023/04/02/xiao-samd21-arduino-and-midi-part-5/" rel="nofollow noopener" target="_blank">XIAO SAMD21, Arduino and MIDI – Part&nbsp;5</a> I used the SAMD21 as a USB host. By providing an external power supply this allow the use of a USB MIDI controller with the SAM2695.</p><p>To plug anything in however will require an adaptor or two. This needs to go from an original “USB A” plug to a USB-C socket. For me, this involved using a “USB-C to USB-micro” adaptor and then a “USB OTG adaptor” as shown below.</p><p>Then I needed a 5V power source, so I cheated and use the 5V and GND from the original XIAO ESP32-C3 that I’d replaced with the XIAO SAMD21 and just jumpered them across to 5V and GND from the breakout headers on the synth.</p><p>I stayed away from the code I used as part of <a href="https://diyelectromusic.com/2023/03/27/xiao-samd21-arduino-and-midi-part-4/" rel="nofollow noopener" target="_blank">XIAO SAMD21, Arduino and MIDI – Part&nbsp;4</a> directly, but instead used one of the sample applications from the <a href="https://github.com/gdsports/USB_Host_Library_SAMD" rel="nofollow noopener" target="_blank">SAMD21 USB Host Library</a>.</p><p>I turns out the “USB_MIDI_Converter” sketch works really well. This can be found here: <a href="https://github.com/gdsports/USB_Host_Library_SAMD/blob/master/examples/USBH_MIDI/USB_MIDI_converter/USB_MIDI_converter.ino" rel="nofollow noopener" target="_blank">https://github.com/gdsports/USB_Host_Library_SAMD/blob/master/examples/USBH_MIDI/USB_MIDI_converter/USB_MIDI_converter.ino</a></p><p><strong>Closing Thoughts</strong></p><p>Similar tricks should also be possible using the RP2040 based boards, and as already mentioned it is also possible to use the Grove connector. One of the options for Grove is as a UART, and this is supported, for example, on the original XIAO breakout board: <a href="https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/" rel="nofollow noopener" target="_blank">https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/</a></p><p>I believe the UART Grove socket would connect directly to the Synth Grove connector allowing use of the synth from the expansion board too.</p><p>Kevin</p><p></p><p><a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/esp32c3/" target="_blank">#esp32c3</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/midi/" target="_blank">#midi</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/sam2695/" target="_blank">#SAM2695</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/usb-device/" target="_blank">#usbDevice</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/usb-host/" target="_blank">#usbHost</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/xiao/" target="_blank">#xiao</a></p>
diyelectromusic<p>First steps with the XIAO ESP32-C3 and SAM2965 based Synth module.</p><p><a href="https://diyelectromusic.com/2025/06/26/xiao-esp32-c3-midi-synthesizer/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">diyelectromusic.com/2025/06/26</span><span class="invisible">/xiao-esp32-c3-midi-synthesizer/</span></a></p><p><a href="https://mastodon.social/tags/MIDI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>MIDI</span></a> <a href="https://mastodon.social/tags/XIAO" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>XIAO</span></a> <a href="https://mastodon.social/tags/ESP32C3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32C3</span></a> <a href="https://mastodon.social/tags/SAM2695" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SAM2695</span></a></p>
Simple DIY Electronic Music Projects<p><strong>XIAO ESP32-C3 MIDI&nbsp;Synthesizer</strong></p><p>I quite like many of the XIAO boards, so when I got an email announcing the <a href="https://www.seeedstudio.com/XIAO-MIDI-Synthesizer-p-6462.html" rel="nofollow noopener" target="_blank">XIAO MIDI Synthesizer</a> I went off to buy one and take a look.</p><p>This uses the Dream SAM2695 MIDI device, which is a General MIDI instrument in a chip. I have a couple of devices that use this chip, so at some point I’ll talk about some of them too.</p><ul><li><a href="https://diyelectromusic.com/2025/06/26/xiao-esp32-c3-midi-synthesizer/" rel="nofollow noopener" target="_blank">Part 1</a> – Getting started and getting code running.</li><li><a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-2/" rel="nofollow noopener" target="_blank">Part&nbsp;2</a> – Swapping the ESP32-C3 for a SAMD21 to get USB MIDI.</li><li><a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-3/" rel="nofollow noopener" target="_blank">Part&nbsp;3</a> – Taking a deeper look at the SAM2695 itself.</li><li><a href="https://diyelectromusic.com/2025/06/27/xiao-esp32-c3-midi-synthesizer-part-4/" rel="nofollow noopener" target="_blank">Part&nbsp;4</a> – A USB MIDI Synth Module using the SAMD21 again as a USB MIDI Host.</li><li><a href="https://diyelectromusic.com/2025/06/28/xiao-esp32-c3-midi-synthesizer-part-5/" rel="nofollow noopener" target="_blank">Part&nbsp;5</a> – A Serial MIDI Synth Module using the original ESP32-C3.</li><li><a href="https://diyelectromusic.com/2025/06/29/xiao-esp32-c3-midi-synthesizer-part-6/" rel="nofollow noopener" target="_blank">Part&nbsp;6</a> – Pairs the Synth with a XIAO Expansion board to add display and potentiometers.</li></ul><p><a href="https://makertube.net/w/baw8eErb6DnK72U2xPuH6n" rel="nofollow noopener" target="_blank">https://makertube.net/w/baw8eErb6DnK72U2xPuH6n</a></p><p><em><strong>Warning!</strong> I strongly recommend using old or second hand equipment for your experiments.&nbsp; I am not responsible for any damage to expensive instruments!</em></p><p>These are the key Arduino tutorials for the main concepts used in this project:</p><ul><li><a href="https://wiki.seeedstudio.com/xiao_midi_synthesizer/" rel="nofollow noopener" target="_blank">Getting Started with the XIAO MIDI Synthesizer</a></li></ul><p>If you are new to microcontrollers, see the&nbsp;<a href="https://diyelectromusic.wordpress.com/getting-started/" rel="nofollow noopener" target="_blank">Getting Started</a> pages.</p><p><strong>Parts list and Circuit</strong></p><ul><li>XIAO MIDI Synthesizer</li><li>USB-C for power and programming</li></ul><p>Er, and that’s essentially it – it has a built-in speaker. But you can use a 3.5mm stereo TRS to connect to an external amplifier or headphones if you wish too.</p><p><strong>XIAO MIDI Synthesizer</strong></p><p>This device pulls together the following into a single package:</p><ul><li>XIAO ESP32-C3</li><li>Dream SAM2695</li><li>Audio amplifier and speaker</li><li>Buttons</li><li>Grove interface</li></ul><p>The XIAO GPIO headers are accessible through the 3D printed case, but the Grove connector is not.</p><p>As soon as power is supplied via the USB-C connection, with the default firmware it is possible to do the following:</p><ul><li>Start or stop a rhythm.</li><li>Select through each of the 128 voices, playing a single note to hear each of them.</li><li>Adjust the tempo for the rhythm.</li><li>Adjust the note to test the voices.</li><li>Enter a “four track” mode that plays a fixed, four track pattern.</li></ul><p>The hardware architecture is described in the published schematics here: <a href="https://wiki.seeedstudio.com/xiao_midi_synthesizer/" rel="nofollow noopener" target="_blank">https://wiki.seeedstudio.com/xiao_midi_synthesizer/</a></p><p>The XIAO is connected to the SAM2695 using the UART and drives it over MIDI. It also supports 4 buttons on GPIO pins and the aforementioned Grove connector, which also appears to be connected to the same MIDI link.</p><p>Here is a simplified schematic of the main XIAO connections I’m interested in.</p><p>One thing I hadn’t realised was that the GPIO pins connected to the buttons is different depending on which board I’m using, although some of the Arduino cores used by the XIAO might have D0, D1, D2, D3 defined to be used.</p><p>Here are the relevant GPIO Pins for the buttons:</p>XIAO ESP32-C3XIAO SAMD21D020D131D242D353<p>Presumably the idea is that if the XIAO isn’t being used, then the Grove connector will allow something else to drive the synth over MIDI instead and also power the unit via 5V.</p><p><strong>Running Bespoke Code</strong></p><p>Unfortunately, at one point (after pressing the “preset” button too quickly I think) I managed to get the whole thing locked up and even a power cycle didn’t seem to wake it up again.</p><p>Although eventually it did seem to wake up again (I wonder if I’d managed to get the XIAO loose in its socket inside the enclosure), I never-the-less decided it would be interesting to get some code loaded onto the thing.</p><p>The default firmware appears to be this sample application: <a href="https://github.com/Seeed-Studio/Seeed_Arduino_MIDIMaster/blob/main/examples/StateMachine/StateMachine.ino" rel="nofollow noopener" target="_blank">https://github.com/Seeed-Studio/Seeed_Arduino_MIDIMaster/blob/main/examples/StateMachine/StateMachine.ino</a></p><p>So as I already had the ESP32 Arduino core installed, I just re-downloaded that sketch and got it going again by doing the following:</p><ul><li>Downloading the ZIP of the above GitHub project, extracting it and copying it to the Arduino libraries folder.</li><li>Set up the Arduino environment for the XIAO ESP32-C3 as described here: <a href="https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/" rel="nofollow noopener" target="_blank">https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/</a></li><li>Select the board: Tools -&gt; Board -&gt; esp32 -&gt; XIAO_ESP32C3</li><li>Select File -&gt; Examples -&gt; Seeed_Arduino_MIDIMaster -&gt; StateMachine</li></ul><p>I also tried the most basic example: Seeed_Arduino_MIDIMaster -&gt; basic which just sets the synth to Voice 1 (Piano) and plays a note every second.</p><p><strong>The Code</strong></p><p>One thing I thought it would do “out of the box” is act as a MIDI device over USB, but that doesn’t seem to be the case. From what I can make out, MIDI USB for ESP32 devices has to use the <a href="https://github.com/adafruit/Adafruit_TinyUSB_Arduino" rel="nofollow noopener" target="_blank">Adafruit TinyUSB Library</a>, which apparently isn’t available for the ESP32-C3 as it doesn’t have a native USB device controller (I think I knew that from previous experiments?).</p><p>So I have a few options:</p><ul><li>Use something like Hairless MIDI on a PC to direct MIDI to a USB serial port, which is how the XIAO presents itself, and then get the XIAO to relay everything over to the Dream synth.</li><li>Use the XIAO RX pin to connect to a 3V3 serial MIDI interface and relay MIDI that way.</li><li>Replace the XIAO C3 with something else that supports USB MIDI, like the XIAOs based on the RP2040, SAMD21, or the ESP32-S3.</li></ul><p>By far the simplest for me at this point is to use an external 3V3 compatible MIDI module on the RX pin.</p><p>The connections for that right hand set of header pins are as follows:</p><ul><li>5V – not used</li><li>GND – MIDI module GND</li><li>3V3 – MIDI module VCC</li><li>D10 – not used</li><li>D9 – not used</li><li>D8 – not used</li><li>D7/RX – MIDI module MIDI IN/RX</li></ul><p>None of the pins on the left hand set of headers are required.</p><p>The code for relaying MIDI from the RX pin to the TX pin is pretty trivial, as the Arduino MIDI Library has a built-in THRU function for serial MIDI.</p><pre>#include &lt;MIDI.h&gt;<br><br>MIDI_CREATE_INSTANCE(HardwareSerial, Serial0, MIDI);<br><br>void setup() {<br> MIDI.begin(MIDI_CHANNEL_OMNI);<br>}<br><br>void loop() {<br> MIDI.read();<br>}</pre><p>But really, at this point the ESP32-C3 is essentially superfluous as I could almost certainly wire up the MIDI interface to the Grove socket and drive the Dream synth directly.</p><p>But it shows that the following can be done:</p><ul><li>Hook up external Serial MIDI.</li><li>Load custom code onto the device.</li><li>Use the SAM2695 as a programmable General MIDI sound device.</li></ul><p><strong>Closing Thoughts</strong></p><p>This seems like it will be quite a fun module to have a proper play with. The demo application is ok, but it doesn’t really show-off the potential of the device in my view.</p><p>It’s a shame that the chosen microcontroller can’t act as a USB MIDI device. That would really allow the device to shine. Given that, I’m not sure that this can really be described as <em>“plug-and-play functionality, you can dive straight into music creation—no complex setup required”</em> as per the product page. You can’t really unless you know how to get bespoke code running, unless I’m missing something.</p><p>But as has already been seen, there is an awful lot of potential here. The buttons and built-in amp and speaker could make for a really nicely contained Synth unit. My only slight concern is how much the 3D printed case will cope with me keeping taking the back on and off to get at the boot/reset buttons inside.</p><p>The video is my usual “go to” for trying out a synth module – a MIDI file from the Internet of an extract of Stravinsky’s Rite of Spring. This is using the external audio connector to go out into a small speaker.</p><p>It doesn’t sound bad at all for such a neat little unit!</p><p>Kevin</p><p></p><p><a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/esp32c3/" target="_blank">#esp32c3</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/include/" target="_blank">#include</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/midi/" target="_blank">#midi</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/sam2695/" target="_blank">#SAM2695</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/xiao/" target="_blank">#xiao</a></p>
ANAVI Technology<p>🎉 Crowdfunding Success!<br>📦 ANAVI Miracle Emitter kits are now shipping to backers!<br>✨ This board is for controlling addressable 5V NeoPixel LED strips<br>🔌 Supports power input via USB-C or an external power source<br>🙏 Thank you for your support!<br><a href="https://mastodon.social/tags/Maker" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Maker</span></a> <a href="https://mastodon.social/tags/LED" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LED</span></a> <a href="https://mastodon.social/tags/NeoPixel" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NeoPixel</span></a> <a href="https://mastodon.social/tags/Crowdfunding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Crowdfunding</span></a> <a href="https://mastodon.social/tags/ESP32C3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32C3</span></a> <a href="https://mastodon.social/tags/WLED" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WLED</span></a> </p><p><a href="https://blog.anavi.technology/crowdfunding-success-anavi-miracle-emitter-kits-now-shipping-to-backers/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.anavi.technology/crowdfun</span><span class="invisible">ding-success-anavi-miracle-emitter-kits-now-shipping-to-backers/</span></a></p>
Habr<p>Делаем автомобильный компьютер с нескучным функционалом</p><p>Привет, я собрал небольшой бортовой компьютер для авто, который умеет показывать температуру, время с момента включения и раздавать «Free Wi-Fi». В этой статье приведён код, список компонентов и всё остальное, чтобы собрать такой же. Назвал я его Kruk — от беларуского слова «Крук» (рус. «Крюк»). Вот видео его работы на YouTube . Здесь его страница на GitHub. Если вы уже посмотрели видео, то понимаете суть функции «Free Wi-Fi». Как только к Wi-Fi подключаются, система сразу переводит пользователя на captive portal , а сам компьютер начинает показывать, помимо температуры и времени, ещё два дополнительных окна с информацией о количестве пользователей, подключившихся к Wi-Fi, и о количестве пользователей, которые до сих пор к нему подключены (online).</p><p><a href="https://habr.com/ru/articles/920714/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">habr.com/ru/articles/920714/</span><span class="invisible"></span></a></p><p><a href="https://zhub.link/tags/esp32" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32</span></a> <a href="https://zhub.link/tags/ESP32C3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32C3</span></a> <a href="https://zhub.link/tags/ssd1306" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ssd1306</span></a> <a href="https://zhub.link/tags/ds18b20" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ds18b20</span></a> <a href="https://zhub.link/tags/arduino_ide" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>arduino_ide</span></a> <a href="https://zhub.link/tags/bmw_e36" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bmw_e36</span></a> <a href="https://zhub.link/tags/WeActStudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WeActStudio</span></a> <a href="https://zhub.link/tags/Kruk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Kruk</span></a> <a href="https://zhub.link/tags/Sabas_Solutions" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Sabas_Solutions</span></a> <a href="https://zhub.link/tags/%D0%BC%D0%B8%D0%BA%D1%80%D0%BE%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D0%BB%D0%B5%D1%80%D1%8B" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>микроконтроллеры</span></a></p>
Michael Engel<p>Success on real hardware! </p><p>This is the f9 microkernel ported to RISC-V, specifically ESP32C3, by Ruben Sevaldson, a former student of mine at NTNU in 2022 – plus a small Lisp machine running on top. </p><p>Now let's see why this doesn't work in qemu for esp32c3...</p><p><a href="https://github.com/rubensseva/f9-riscv" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/rubensseva/f9-riscv</span><span class="invisible"></span></a><br><a href="https://github.com/f9micro/f9-kernel" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/f9micro/f9-kernel</span><span class="invisible"></span></a></p><p><a href="https://sueden.social/tags/f9" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>f9</span></a> <a href="https://sueden.social/tags/riscv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>riscv</span></a> <a href="https://sueden.social/tags/microkernel" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>microkernel</span></a> <a href="https://sueden.social/tags/esp32c3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32c3</span></a></p>
LLMsxiaozhi-esp32 is an MCP-based chatbot xiaozhi-esp32 is an open-source ESP32-based MCP-based chatb...<br><br><br><a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/Artificial" target="_blank">#Artificial</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/intelligence" target="_blank">#intelligence</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/ESP32" target="_blank">#ESP32</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/ESP32-C3" target="_blank">#ESP32-C3</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/ESP32-S3" target="_blank">#ESP32-S3</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/chatbot" target="_blank">#chatbot</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/MCP" target="_blank">#MCP</a><br><a href="https://blog.adafruit.com/2025/06/09/xiaozhi-esp32-is-an-mcp-based-chatbot/" rel="nofollow noopener" target="_blank">Origin</a> | <a href="https://awakari.com/sub-details.html?id=LLMs" rel="nofollow noopener" target="_blank">Interest</a> | <a href="https://awakari.com/pub-msg.html?id=LUBj16xmDZWsxcUccYxAv9TbjdI&amp;interestId=LLMs" rel="nofollow noopener" target="_blank">Match</a>
ANAVI Technology<p>🌟 Automate your home with Home Assistant + ANAVI Miracle Emitter!<br>💡 Control addressable LEDs via MQTT or WLED - fully open source.<br>📱 Stunning effects, full control from any device, seamless integration.<br>🚀 Final hours of our crowdfunding campaign at <span class="h-card" translate="no"><a href="https://hachyderm.io/@crowdsupply" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>crowdsupply</span></a></span> back now for free US shipping &amp; current prices!<br><a href="https://www.crowdsupply.com/anavi-technology/anavi-miracle-emitter/updates/home-automation-with-the-anavi-miracle-emitter" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">crowdsupply.com/anavi-technolo</span><span class="invisible">gy/anavi-miracle-emitter/updates/home-automation-with-the-anavi-miracle-emitter</span></a><br><a href="https://mastodon.social/tags/homeassistant" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>homeassistant</span></a> <a href="https://mastodon.social/tags/neopixel" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>neopixel</span></a> <a href="https://mastodon.social/tags/esp32c3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32c3</span></a> <a href="https://mastodon.social/tags/esp32" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32</span></a> <a href="https://mastodon.social/tags/wled" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>wled</span></a> <a href="https://mastodon.social/tags/opensource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>opensource</span></a> <a href="https://mastodon.social/tags/crowdfunding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>crowdfunding</span></a></p>
Habr<p>Проект «Мультиключ». Эмулятор ключей от домофона на ESP8266</p><p>Никак не доходили руки до написания этой статьи, точнее я её планировал написать после полноценного перевода устройства на esp32 c3, который никак не состоится. Вкратце напомню о чем этот проект, и чем он закончился в прошлой статье. Мы разрабатываем компактное устройство для чтения, хранения, записи и эмуляции электронных ключей (которые чаще всего встречаются у нас в подъездах и на проходных). Изначально это был проект одного из моих учеников. Но в этом году, для участия во ВСОШ по робототехнике ему пришлось поменять тему работы, которая тоже довольно интересная, как-нибудь по неё тоже напишу). А я по наличию времени и энтузиазма продолжил добивать программную часть. В прошлой статье мы перевели устройство на esp8266, что сделало его более производительным и решило проблему с памятью. У нас получилось прочитать и эмулировать контактные ключи dallas и русские Сyfral и Metacom. После этого мы решили перейти к бесконтактным ключам стандарта EmMarine. Без контактные ключи уже так просто, при помощи одного резистора, не прочитаешь, нужен детектор-генератор на 125 кГц. На этом этапе опять очень помог проект от Alex Malov EasyKeyDublicator . У него я взял схему детектора без изменений. И первые тесты производил на Arduino Nano.</p><p><a href="https://habr.com/ru/companies/timeweb/articles/906902/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">habr.com/ru/companies/timeweb/</span><span class="invisible">articles/906902/</span></a></p><p><a href="https://zhub.link/tags/c" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>c</span></a>++ <a href="https://zhub.link/tags/arduino" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>arduino</span></a> <a href="https://zhub.link/tags/esp8266" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp8266</span></a> <a href="https://zhub.link/tags/esp32c3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32c3</span></a> <a href="https://zhub.link/tags/emmarine" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>emmarine</span></a> <a href="https://zhub.link/tags/rfid" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rfid</span></a> <a href="https://zhub.link/tags/timeweb_%D1%81%D1%82%D0%B0%D1%82%D1%8C%D0%B8" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>timeweb_статьи</span></a></p>
Habr<p>Обработка аудио на ESP32</p><p>В этой статье я хочу поделиться своим опытом портирования проекта распознавания музыкальных жанров аудиозаписей на ESP32-C3. Исходный проект взят из репозитория книги TinyML-Cookbook_2E . При анализе речи или других звуков важно выделить такие характеристики, которые отражают строение сигнала, но при этом не зависят от конкретных слов, громкости и других мешающих факторов. Для этого используют cepstrum , mel-cepstrum и MFCC - это шаги преобразования, которые переводят звук в удобную для анализа форму.</p><p><a href="https://habr.com/ru/articles/906658/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">habr.com/ru/articles/906658/</span><span class="invisible"></span></a></p><p><a href="https://zhub.link/tags/esp32c3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32c3</span></a> <a href="https://zhub.link/tags/tensorflowlite" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tensorflowlite</span></a> <a href="https://zhub.link/tags/u8g2" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>u8g2</span></a> <a href="https://zhub.link/tags/mfcc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mfcc</span></a> <a href="https://zhub.link/tags/MAX9814" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>MAX9814</span></a> <a href="https://zhub.link/tags/%D0%BC%D0%B0%D1%88%D0%B8%D0%BD%D0%BD%D0%BE%D0%B5_%D0%BE%D0%B1%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>машинное_обучение</span></a> <a href="https://zhub.link/tags/%D0%B0%D1%83%D0%B4%D0%B8%D0%BE" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>аудио</span></a> <a href="https://zhub.link/tags/dsp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dsp</span></a> <a href="https://zhub.link/tags/mcsis" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mcsis</span></a></p>
MCQN Ltd<p>Thanks to <span class="h-card" translate="no"><a href="https://does.social/@huffeec" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>huffeec</span></a></span> our website now has a write-up of the Bluetooth LED bike game we built with <a href="https://social.mcqn.com/tags/PelotonLiv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PelotonLiv</span></a> </p><p><a href="https://mcqn.com/ibal251/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">mcqn.com/ibal251/</span><span class="invisible"></span></a></p><p><a href="https://social.mcqn.com/tags/ibal251" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ibal251</span></a> <a href="https://social.mcqn.com/tags/weeknotes" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>weeknotes</span></a> <a href="https://social.mcqn.com/tags/esp32c3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32c3</span></a> <a href="https://social.mcqn.com/tags/BBCmicrobit" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>BBCmicrobit</span></a> <a href="https://social.mcqn.com/tags/BikeTooter" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>BikeTooter</span></a> <a href="https://social.mcqn.com/tags/LED" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LED</span></a> <a href="https://social.mcqn.com/tags/Bluetooth" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Bluetooth</span></a></p>
Simple DIY Electronic Music Projects<p><strong>Duppa I2C MIDI Controller – Part&nbsp;4</strong></p><p>This is revisiting my <a href="https://diyelectromusic.com/2025/03/18/duppa-i2c-midi-controller-part-3/" rel="nofollow noopener" target="_blank">Duppa I2C MIDI Controller</a> this time using a Waveshare Zero format device.</p><ul><li><a href="https://diyelectromusic.com/2025/03/09/duppa-i2c-midi-controller-part-1/" rel="nofollow noopener" target="_blank">Part&nbsp;1</a> – getting to know the devices and testing them out.</li><li><a href="https://diyelectromusic.com/2025/03/17/duppa-i2c-midi-controller-part-2/" rel="nofollow noopener" target="_blank">Part&nbsp;2</a> – adding MIDI to the LED ring and I2C encoder.</li><li><a href="https://diyelectromusic.com/2025/03/18/duppa-i2c-midi-controller-part-3/" rel="nofollow noopener" target="_blank">Part&nbsp;3</a> – adding normal encoder, plain potentiometer, and endless potentiometer control.</li><li><a href="https://diyelectromusic.com/2025/04/06/duppa-i2c-midi-controller-part-4/" rel="nofollow noopener" target="_blank">Part&nbsp;4</a> – revisits the idea with Waveshare Zero format devices and adds USB MIDI.</li></ul><p><em><strong>Warning!</strong> I strongly recommend using old or second hand equipment for your experiments.&nbsp; I am not responsible for any damage to expensive instruments!</em></p><p>If you are new to Arduino, see the&nbsp;<a href="https://diyelectromusic.wordpress.com/getting-started/" rel="nofollow noopener" target="_blank">Getting Started</a> pages.</p><p><strong>Parts list</strong></p><ul><li>Waveshare Zero ESP32-S3 or RP2040.</li><li>DuPPa small RGB LED Ring.</li><li>10K potentiometer.</li><li>Bespoke hook-up wires (available from duppa.net).</li><li>Optional: 3V3 MIDI Interface.</li><li>Breadboard and jumper wires.</li></ul><p><strong>Waveshare Zero, Duppa LED Ring, Potentiometers</strong></p><p>I’m planning on being able to use any Waveshare Zero format board that I have (so that includes ESP32-S3, ESP32-C3 and RP2040) with the Duppa Ring so that means finding common pins to support I2C.</p><p>From the various pinouts (see <a href="https://diyelectromusic.com/2025/02/17/waveshare-zero-pimoroni-tiny-and-neopixels/" rel="nofollow noopener" target="_blank">Waveshare Zero, Pimoroni Tiny, and&nbsp;Neopixels</a>) I can see I can use two pins in the bottom right-hand (with the USB connector at the top) corner of the board.</p><p>I’ll also need an analog connection and potentially connecting RX/TX to MIDI.</p><p>The various pins I’ll be using are as follows:</p>PinFunctionESP32-S3ESP32-C3RP204015V2GND33V34ADCGP1GP0GP29/A313SCLGP10GP9GP514SDAGP11GP10GP417RXGP44GP20GP118TXGP43GP21GP0<p>Note, I’m not using physical pins 11 and 12, even though they also support I2C, as for the RP2040, these are on I2C bus 1, not 0 (see note later).</p><p>As the Pimoroni Tiny2040 is largely compatible too, that could also be used, but it will be physical pins 11 and 12, corresponding to GP5 and GP4, and 15 and 16 for GP1, GP0 (RX,TX).</p><p>The LEDs on the LED ring are powered from 5V, which comes directly off the Waveshare Zero USB port. The logic “VIO” is powered from 3V3.</p><p><strong>The Code</strong></p><p><strong>I2C LED Ring</strong></p><p>As the I2C pins to be used are configurable, this means changing the Duppa example code (and any other Arduino code) to initialise the I2C bus on specific pins as follows:</p><pre>Wire.begin(11,10); // SDA, SCL for ESP32-S3<br>Wire.begin(10,9); // SDA, SCL for ESP32-C3</pre><p>Using the ESP32 Arduino Core, there is a specific board entry for the Waveshare Zero ESP32-S3. There isn’t one for the ESP32-C3 so I just used “ESP32C3 Dev Module”.</p><p>I used the Arduino core for RP2040 from here rather than the official core: <a href="https://github.com/earlephilhower/arduino-pico" rel="nofollow noopener" target="_blank">https://github.com/earlephilhower/arduino-pico</a></p><p>But the I2C initialisation is a little different.</p><pre> Wire.setSDA(4);<br> Wire.setSCL(5);<br> Wire.begin();</pre><p>If I’d have been using GP6 and GP7, then these would have required the initialisation of Wire1 rather than Wire with the RP2040 core.</p><p>Note: to use the serial port once a sketch has been loaded onto the board, requires the following to be set (via the Arduino Tools menu):</p><pre>USB CDC On Boot -&gt; Enabled</pre><p>Once again, I’ve soldered the jumpers on the LED ring to enable pull-ups and set the address for S1 and S5, so that has to be changed in the demo code too.</p><p><strong>Analog Potentiometer</strong></p><p>In terms of analog read, the ESP32 has a resolution of 0..4095 compared to the Arduino’s 0..1023, so that has to be taken into account when calculating the MIDI CC values.</p><p>To do this, the reading has to be divided by the ratio of Pot Range / 128.</p><pre>int newpot = algpot.avgeAnalogRead(PIN_ALG) / ((MAX_POT_VALUE+1)/128);</pre><p><strong>Serial MIDI</strong></p><p>For these boards, the serial port has to be specified. There are different options depending on the board being used (<a href="https://diyelectromusic.com/2025/03/14/waveshare-zero-midi-proto-pcb-build-guide/" rel="nofollow noopener" target="_blank">more here</a>).</p><p>To use the pins nominally designated as RX/TX on all of these boards, use:</p><pre>// ESP32-S3 GP43,GP44 or ESP32-C3 GP20,GP21<br>MIDI_CREATE_INSTANCE(HardwareSerial, Serial0, MIDI);<br>// RP2040 GP1,GP0<br>MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);</pre><p>It is a quirk of the RP2040 Arduino core that UART0 appears on Serial1 and UART1 on Serial2. Serial0 does not exist but USB is Serial (<a href="https://github.com/earlephilhower/arduino-pico/blob/master/docs/serial.rst" rel="nofollow noopener" target="_blank">more here</a>).</p><p>Also, for the RP2040 the pins can be changed prior to calling MIDI.begin() if required as follows:</p><pre>Serial1.setRX(rxpin);<br>Serial1.setTX(txpin);<br>MIDI.begin();</pre><p><strong>MIDI USB</strong></p><p>I want to make this a fairly stand-alone MIDI USB device, so for the ESP32 and RP2040 this means using the TinyUSB stack. There is an Adafruit library for Arduino that supports both and also works with the Arduino MIDI Library. References:</p><ul><li>Adafruit_TinyUSB – <a href="https://github.com/adafruit/Adafruit_TinyUSB_Arduino/tree/master" rel="nofollow noopener" target="_blank">https://github.com/adafruit/Adafruit_TinyUSB_Arduino/tree/master</a></li><li>USB MIDI Transport – <a href="https://github.com/lathoub/Arduino-USBMIDI" rel="nofollow noopener" target="_blank">https://github.com/lathoub/Arduino-USBMIDI</a> (for AVR)</li><li>Arduino MIDI Library – <a href="https://github.com/FortySevenEffects/arduino_midi_library" rel="nofollow noopener" target="_blank">https://github.com/FortySevenEffects/arduino_midi_library</a></li></ul><p>I’ve cribbed most of the code from: <a href="https://github.com/adafruit/Adafruit_TinyUSB_Arduino/blob/master/examples/MIDI/midi_test/midi_test.ino" rel="nofollow noopener" target="_blank">https://github.com/adafruit/Adafruit_TinyUSB_Arduino/blob/master/examples/MIDI/midi_test/midi_test.ino</a></p><p>And added the appropriate parts to my own midiSetup() and midiLoop() functions.</p><p><strong>MIDI USB – ESP32-S3</strong></p><p>For this to work on the ESP32-S3, the board settings (via the Arduino Tools menu) need to be changed as follows:</p><pre>USB CDC On Boot -&gt; Enabled<br>USB Mode -&gt; USB-OTG (TinyUSB)<br>USB Firmware MSC On Boot=Disabled<br>USB DFU On Boot=Disabled</pre><p>Naturally this means USB can’t be used for serial output anymore.</p><p>It also means that automatic sketch reset and download often didn’t work for me. It was quite normal to now have to use the BOOT and RESET buttons to get the ESP32 back into listening for a new sketch – not always, but also not uncommon. But this might be some serial port remapping weirdness that often occurs when the USB stack is running on the same microprocessor as the main code…</p><p><strong>MIDI USB – RP2040</strong></p><p>For the RP2040, the USB stack needs to be changed from the Pico SDK to TinyUSB, so in the Tools menu:</p><pre>USB Stack -&gt; Adafruit TinyUSB</pre><p>There are some other <a href="https://arduino-pico.readthedocs.io/en/latest/usb.html#adafruit-tinyusb-arduino-support" rel="nofollow noopener" target="_blank">RP2040 specific notes here</a>, but I don’t believe they apply unless one is interested in rebuilding the core, default TinyUSB support directly.</p><p><strong>USB MIDI – ESP32-C3</strong></p><p><strong><em>I don’t believe USB MIDI works on the ESP32-C3</em></strong></p><p>Adafruit TinyUSB doesn’t seem to anyway and I haven’t looked into what the options might be yet.</p><p><strong>Other Notes</strong></p><p>I’ve left in all the conditional compilation from <a href="https://diyelectromusic.com/2025/03/18/duppa-i2c-midi-controller-part-3/" rel="nofollow noopener" target="_blank">Duppa I2C MIDI Controller – Part&nbsp;3</a> but for now am just working with potentiometer control.</p><p>Pretty much everything is configurable, but the most important config option is to specify the board at the top:</p><pre>//#define WAVESHARE_ESP32S3<br>//#define WAVESHARE_ESP32C3<br>#define WAVESHARE_RP2040</pre><p>I could probably auto detect from the build settings but for now, this will do.</p><p>Other options include GPIO pins, whether to include serial or USB MIDI (or both), and whether to enable MIDI THRU or not.</p><p><a href="https://github.com/diyelectromusic/sdemp/tree/main/src/SDEMP/ArduinoMIDICCLedController3" rel="nofollow noopener" target="_blank">Find it on GitHub here</a>.</p><p><strong>Closing Thoughts</strong></p><p>This is the first go at getting my Duppa controller working on 3V3 Waveshare Zero format boards, and so far it looks pretty good.</p><p>For the ESP32-S3 and RP2040 being able to enable MIDI USB is particularly useful. I might see if I can support MIDI THRU across the interfaces, which might be handy for a built-in USB to serial MIDI converter, but for now MIDI THRU is on the same port only.</p><p>I’ve not tested this with encoders or the endless potentiometer, but in theory it ought to work. I’d have to add some conditional compilation for GPIO numbers if I want to keep the same physical pins again.</p><p>Kevin</p><p></p><p><a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/control-change/" target="_blank">#controlChange</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/duppa/" target="_blank">#duppa</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/endless-potentiometer/" target="_blank">#endlessPotentiometer</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/esp32c3/" target="_blank">#esp32c3</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/esp32s3/" target="_blank">#ESP32s3</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/i2c/" target="_blank">#i2c</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/midi/" target="_blank">#midi</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/potentiometer/" target="_blank">#potentiometer</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/rgb-led/" target="_blank">#rgbLed</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/rotary-encoder/" target="_blank">#rotaryEncoder</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/rp2040/" target="_blank">#rp2040</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://diyelectromusic.com/tag/waveshare-zero/" target="_blank">#WaveshareZero</a></p>
ANAVI Technology<p>🎆 How to control NeoPixel WS2812B LED 2D panels with the popular open source firmware WLED and our open source hardware ANAVI Miracle Emitter with ESP32C3?<br>🚀 Check out our step-by-step guide and get glowing! 👉<br><a href="https://blog.anavi.technology/wled-2d-panels-neopixel-ws2812b-esp32/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.anavi.technology/wled-2d-</span><span class="invisible">panels-neopixel-ws2812b-esp32/</span></a><br><a href="https://mastodon.social/tags/WLED" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WLED</span></a> <a href="https://mastodon.social/tags/ESP32" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32</span></a> <a href="https://mastodon.social/tags/ESP32C3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32C3</span></a> <a href="https://mastodon.social/tags/opensource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>opensource</span></a></p>
DeltaLima 🐧<p><a href="https://social.la10cy.net/tags/CanGrow" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CanGrow</span></a> v0.2 kann für den <a href="https://social.la10cy.net/tags/ESP8266" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP8266</span></a>, den <a href="https://social.la10cy.net/tags/ESP32" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32</span></a>, <a href="https://social.la10cy.net/tags/ESP32C3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32C3</span></a> und <a href="https://social.la10cy.net/tags/ESP32S2" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESP32S2</span></a> gebaut werden. Auf dem ESP32-S2 gibt es noch ein paar Bugs, wie z.B. das bei verbundenem WLAN keine Netzwerke gescannt werden können. </p><p>Falls ihr die Entwicklungsversion der neuen Version ausprobieren wollt, so findet ihr sie im Branch "firmware-v0.2-dev" <a href="https://git.la10cy.net/DeltaLima/CanGrow/src/branch/firmware_v0.2-dev" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">git.la10cy.net/DeltaLima/CanGr</span><span class="invisible">ow/src/branch/firmware_v0.2-dev</span></a></p><p>Mit dem Script "cangrow.sh" kann unter Debian 12 schnell eine Build Umgebung erstellt und die Firmware übersetzt und auf den ESP hochgeladen werden.</p>
Habr<p>Джойстики из джойстиков своими руками</p><p>Одна из самых частых забав ретрогеймера-электроника — сделать что-нибудь со старыми джойстиками. Вот и сделаем! Это простейший материал для начинающих самоделкиных, на грани треш-контента и на радость одному Доктору, но с познавательными элементами, которые могут или не могут пригодиться на практике. Будем курочить джойстики от старых игровых консолей, не приходя в сознание. Из двух проводных джойстиков сделаем один, другой джойстик лишим провода, а ещё пару просто подключим проводами. По сути это сразу три разных микро-проекта, связанные общей тематикой. Нет времени объяснять, приступаем!</p><p><a href="https://habr.com/ru/companies/ruvds/articles/888626/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">habr.com/ru/companies/ruvds/ar</span><span class="invisible">ticles/888626/</span></a></p><p><a href="https://zhub.link/tags/%D0%B4%D0%B6%D0%BE%D0%B9%D1%81%D1%82%D0%B8%D0%BA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>джойстик</span></a> <a href="https://zhub.link/tags/%D0%B4%D0%B6%D0%BE%D0%B9%D1%81%D1%82%D0%B8%D0%BA%D0%B8" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>джойстики</span></a> <a href="https://zhub.link/tags/%D0%B4%D0%B6%D0%BE%D0%B9%D1%81%D1%82%D0%B8%D0%BA_%D0%B4%D0%BB%D1%8F_%D0%BE%D0%B4%D0%BD%D0%BE%D0%B9_%D1%80%D1%83%D0%BA%D0%B8" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>джойстик_для_одной_руки</span></a> <a href="https://zhub.link/tags/%D0%B8%D0%B3%D1%80%D0%BE%D0%B2%D0%BE%D0%B9_%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D0%BB%D0%B5%D1%80" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>игровой_контроллер</span></a> <a href="https://zhub.link/tags/%D0%B8%D0%B3%D1%80%D0%BE%D0%B2%D0%BE%D0%B9_%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D0%BB%D0%B5%D1%80_%D0%B4%D0%BB%D1%8F_%D0%BE%D0%B4%D0%BD%D0%BE%D0%B9_%D1%80%D1%83%D0%BA%D0%B8" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>игровой_контроллер_для_одной_руки</span></a> <a href="https://zhub.link/tags/%D0%B3%D0%B5%D0%B9%D0%BC%D0%BF%D0%B0%D0%B4" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>геймпад</span></a> <a href="https://zhub.link/tags/%D0%B3%D0%B5%D0%B9%D0%BC%D0%BF%D0%B0%D0%B4%D1%8B" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>геймпады</span></a> <a href="https://zhub.link/tags/gamepad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>gamepad</span></a> <a href="https://zhub.link/tags/joystick" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>joystick</span></a> <a href="https://zhub.link/tags/dendy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dendy</span></a> <a href="https://zhub.link/tags/%D0%B4%D0%B5%D0%BD%D0%B4%D0%B8" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>денди</span></a> <a href="https://zhub.link/tags/playstation" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>playstation</span></a> <a href="https://zhub.link/tags/ps1" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ps1</span></a> <a href="https://zhub.link/tags/bluetooth" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bluetooth</span></a> <a href="https://zhub.link/tags/arduino" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>arduino</span></a> <a href="https://zhub.link/tags/esp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp</span></a> <a href="https://zhub.link/tags/esp32" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32</span></a> <a href="https://zhub.link/tags/esp32s2" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32s2</span></a> <a href="https://zhub.link/tags/esp32c3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esp32c3</span></a> <a href="https://zhub.link/tags/ruvds_%D1%81%D1%82%D0%B0%D1%82%D1%8C%D0%B8" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ruvds_статьи</span></a></p>