Lost/
what is wrong with my ESP32
The ESP32 is a valuable choice for projects involving sound or Wi-Fi connectivity. For example, you can use it to make a sound device or to send sensor data to an HTML page via Wi-Fi for interactive web applications.
If you're using the ESP32 for audio output, you’ll connect speakers to pin 25 or pin 26, which are the built-in DAC (Digital-to-Analog Converter) output pins. Other pins like G36, G39, 34, 35, 32, 33, 27, 14, 13, 4, 0, 2, and 15 are general purpose ADC pins, suitable for analog or digital reads and writes.
When using the Mozzi library on ESP32, you might encounter an issue where pins 25 and 26 remain silent. I tried multiple troubleshooting steps like checking pin assignments, tweaking configurations, even switching board manager versions but nothing worked. Eventually, I found a Reddit thread where user Potato Skater described the same issue. A helpful comment there suggested downgrading the ESP32 board package to version 2.0.14, and that actually solved the problem.
Thanks you, "JawLG".
what is wrong with my Pro Micro
When you're building a project especially something like a MIDI controller and space is tight, Pro Micro is a great choice. It's extremely small and space efficient, making it ideal for tight enclosures. It’s powered by the ATmega32U4 chip, which supports USB communication directly and works well with the <MIDIUSB.h> library, allowing you to build native USB MIDI devices easily.
The original Pro Micro was the red SparkFun version, but most affordable alternatives you’ll find online are blue clones made by other manufacturers. These clones often come in two voltage versions: 3.3V (8 MHz) and 5V (16 MHz), with either Micro-USB or USB-C connectors.
When you plug it into your computer, it might show up as an Arduino Leonardo, that’s normal since both use the same ATmega32U4 chip. However, for better compatibility and fewer upload issues, it's better to select "SparkFun Pro Micro" as the board in the Arduino IDE. You could find it at the SparkFun AVR Boards package.
There are 2 settings extremely important:
Processor: Make sure to choose the correct one, either ATmega32U4 (3.3V, 8 MHz) or ATmega32U4 (5V, 16 MHz) depending on your board.
Programmer: Set this to "Arduino as ISP (ATmega32U4)".
Once you upload with a wrong setting, for example you you upload code with the wrong voltage setting (uploading a 5V sketch to a 3.3V board), your Pro Micro might disappear from the USB port. This means it's enter a mode called: Bricked, and you have to trigger the bootloader mode to wash these wrong memories.
How to Fix a "Bricked" Pro Micro:
I've been searching a lot tutorials but this official guide is the most correct version.
https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq
To enter bootloader mode, you'll need to short the RST (reset) and GND pins using a jumper wire. Since there's no reset button (to save space), you’ll have to do this manually.
Connect RST and GND for a short moment and do it twice quickly, this triggers the bootloader mode and you could see the board appear again in the Tools > Port menu again, but the ironic thing is you only have about 8 seconds to upload a new sketch or it will disappears again!
My solution is upload the "Blink" example sketch (found under File > Examples > 01.Basics > Blink), since it's small and fast to upload.
Once you finished this challenge your pro micro will be alive again. This also works for other Arduino boards such as the Leonardo, once I uploaded code using the Pro Micro setting to the Leonardo and bricked it.
what is wrong with my ESP32 S2 Lily Go
I bought this ESP32-S2 version because it has an SD card slot and looked super productive. Turns out, this is probably the worst chip in the world. If I had a second chance, I’d use that money to buy everyone an ice cream🍦 at McDonald’s instead.
or
DAC ADC PWM
I want to build a digital synth using the Mozzi library on this ESP S2. However, every time I tried to compile the code, it threw the error: 'I2S_MODE_DAC_BUILT_IN' was not declared in this scope. I found that the ESP32-S2 lacks a built-in DAC, which is essential for Mozzi's functionality. I tried to modify the Mozzi library to work with the ESP32-S2, but all attempts were unsuccessful.
DAC (Digital-to-Analog Converter), converts digital values (numbers) into a continuous analog voltage.
ADC (Analog-to-Digital Converter), converts analog voltages (e.g., sensor outputs) into digital values.
PWM (Pulse Width Modulation), outputs a digital signal that simulates an analog value by varying the duty cycle of a square wave.
| Feature | ESP32 | ESP32-S2 | Arduino Leonardo/Uno |
|---|---|---|---|
| WIFI | Yes | Yes | No |
| Bluetooth | Yes | No | No |
| DAC | 2 pins | None | None |
| ADC | Yes | Yes | Yes |
| PWM | Yes | Yes | Yes |
USB or OTG
To make the design even worse, it has both USB and OTG modes, and you have to switch between them manually using a tiny stick to toggle four microscopic switches, you can find the switch diagram at the bottom of the image.
I originally wanted to use it for MIDI functionality. But it can only upload sketches or be detected by the computer in USB mode and only works for MIDI in OTG mode. There’s barely any decent MIDI library support since it’s an ESP32-based chip. I found this GitHub repo that uses TinyUSB for MIDI, it worked once, and then never again.
what is wrong with my Arduino UNO
As a standard Arduino board, the UNO isn’t ideal if you want to use it as a MIDI controller, mainly because it doesn’t support MIDIUSB.h.
Even using something like Hairless MIDI, the signal is often hard to detect or unreliable. Some people say you can get around this by modifying the Standard Firmata, but that’s a rabbit hole of complexity I wouldn't recommend unless you enjoy pain.
In Max for Live, there's a package called Connection Kit that includes an “Arduino” module. Using the map object, you can link values from the Arduino UNO directly into Ableton Live, but it’s not exactly the most stable or reliable workflow.
I also used the UNO for "Rain Receiver". My solution was to build a separate Max/MSP patch that receives serial data from the UNO and translates it into MIDI signals or mapped control parameters. For experimental use, the UNO is fine. But if you’re looking for a more stable and reliable MIDI setup, I’d definitely recommend going with something based on the ATmega32U4, it handles MIDI much better and more consistently.
what is wrong with my Multiplexer
If your microcontroller doesn’t have enough pins for all your components, a multiplexer like the CD74HC4067 (which gives you 16 extra channels) can be a great way to expand your connections.
Connections
On a multiplexer like the CD74HC4067, you'll typically see pins labeled C0–C15 (for input/output connections), SIG, S0–S3 (the select lines), VCC, GND, and EN (enable).
I used to connect each select pin (S0, S1, S2, S3) to a separate digital pin on the Arduino. However, it turns out that you can actually connect the S0, S1, S2, S3 from multiplexer to the same Arduino pins, and control them in parallel, which could saves a lot of pins.
What really determines which signal you read or write is the SIG pin, this is what you connect to a different Arduino pin for each multiplexer to distinguish their outputs or inputs.
Multiplexer cannot digital read and digital write at same time
For example, if you're using a multiplexer to read digital inputs like buttons or potentiometers, and you also try to write digital outputs (like turning LEDs on/off) through it at the same time, it will causes all kinds of weird bugs.
The solution is to use separate multiplexers for reading and writing tasks, or to use LED drivers such as the "TLC59711" or "TLC5947" for controlling LEDs.
Two Multiplexers
When you have two multiplexers in your setup, it can sometimes be tricky to initialize or define both at the same time. After several days (and lots of eye drops), I finally found a reliable way to define them simultaneously without running into bugs.
// Multiplexer setup
CD74HC4067 mux1(2, 3, 4, 5);
CD74HC4067 mux2(12, 9, 13, 11);
const int mux1_signal_pin = A0, mux2_signal_pin = A1;
void setup() {
pinMode(mux1_signal_pin, INPUT_PULLUP);
pinMode(mux2_signal_pin, INPUT_PULLUP);
}
what is wrong with my TLC59711
If you have a lot of LEDs, it’s often easier to control them using an LED driver like the TLC59711 (12 channels) or TLC5947 (24 channels). Both are available from Adafruit, and their libraries can be easily found in the Arduino IDE.
However, when using the TLC59711, you might encounter an issue where it seems like you can only control one group of LEDs at a time, instead of controlling each LED individually.
tlc59711.setLED(0, 3000, 0, 0);
In this example, the parameters (0, 3000, 0, 0) do not represent RGB colors.
Instead, they correspond to:
0 – the LED group or output number (e.g., port 0),
3000 – brightness level for channel 1,
0 – brightness level for channel 2,
0 – brightness level for channel 3.
This way, you can control each channel's brightness individually within a group.
what is wrong with my TM1637
The TM1637 is a 4-character display module that can show numbers or characters. It has four pins: CLK, IO, VCC, and GND. You can also connect it through a multiplexer if needed.
When I first bought it, everything was wired correctly but it just flashed once and stopped working. I tried a bunch of tutorials, but only this one actually helped: https://www.youtube.com/watch?v=F5rhnFX3_w8
If you found the resistor in the same place as the video showed, you need to removed it and the display should start working properly once you removed that resistor.
what is wrong with my QMC5883L
The QMC5883L is a 3-axis digital magnetometer used to measure magnetic fields and detect orientation or heading.
Sometimes on the chips it showed as HW-246, you need to make sure it is either QMC5883L or HMC5833L, cause it is actually different types with different library. You could also use RPI-1031 which has the similar function as these two.
When I was building a handheld MIDI controller, I added a QMC5883L to track X, Y, and Z values, mapping movement to control effects. I connected it to a Pro Micro, and everything worked perfectly at first. But once I started adding more buttons, the system began to freeze. I checked the code over and over and couldn’t find anything wrong.
After debugging with a different microcontroller, I discovered the issue: even though the QMC5883L datasheet says it supports 3V–5V, it only runs reliably in a stable 5V environment. I was using a 3.3V Pro Micro, which worked fine initially, since I hadn’t added the buttons yet. The extra components pushed the power demand just enough to make things unstable.
So it's important to check your power supply and it's better to get the 5v pro micro, It’ll save you hours of meaningless troubleshooting.
what is wrong with my LDR sensor
LDR sensor is a very usual sensor when you start to explore everything.
And the stupid mistake I made it I thought it's same as a button and just connect 2 sides to digital pin and ground.
Actually LDR is an resistor, and you need a voltage divider for connection, the resistor values depending on your LDR, the LDR value is usually from 0 - 3000, you could add different resistor to get the most stable LDR values, in my case I used a 21k resistor for 5528 LDR.
The LDR (Light Dependent Resistor) is one of the most common sensors people use when first exploring electronics.
The stupid mistake I made is I treated it like a button and just connected both sides to a digital pin and ground.
But actually, an LDR is a variable resistor, and it needs to be part of a voltage divider to work properly. The resistor value you pair with it depends on your specific LDR. Most LDRs output values in the range of 0–3000, choosing the right fixed resistor helps stabilize those readings.
In my case, I used a 5528 LDR, and a 21kΩ resistor gave me the most stable results.
what is wrong with my Motor
I tried to generate electricity using a motor.
I installed a fan on the motor and added a small LED to test if any electricity was being produced. Despite trying various ways to rotate the fan, including manually spinning the motor, the output was consistently too low to light the LED. Switching to a larger DC motor provided some success, but the LED only lit briefly before the output dropped again.
Through further research, I made a test to confirme that the motor could generate electricity but required higher rotational speed. To achieve this, I connected two motors face-to-face: one powered by a battery to drive the other, which was connected to the LED. This setup produced sufficient speed to light the LED.
https://www.youtube.com/watch?v=qf_m7DP34Fg
I found that each motor has a specific RPM (rotations per minute) that determines its speed and efficiency as a generator. To continue experimenting in this direction, I would need a lower-RPM motor or use a gear system to increase the motor's rotational speed.
To upgrade the motor and generate electricity, I started looking for inspiration in simple mechanisms, such as those used in bicycles. One example is the bicycle dynamo, which is commonly found in traditional bike lighting systems.
An interesting example of creative use of bicycle-generated electricity is the singing bicycles, designed by Godfried-Willem Raes for his second symphony in 1976. These bicycles not only generate electricity but also produce sounds as part of a musical performance.
To make the electricity from the dynamo more stable and usable, a voltage regulator would be needed. This helps ensure that the power output remains steady and prevents any damage to connected devices.