r/arduino • • 5d ago

I made my ESP32 play any song on the ocarina in Zelda

286 Upvotes

I built a small project that plays songs on the ocarina in Ocarina of Time on the Switch 2. The songs in the video are Clock Town (Day 2) from Majora's Mask and Littleroot Town from Pokémon Emerald.

The hardware is just an ESP32-WROOM-32 dev board, with an optional SSD1306 OLED. No other parts. It also works with a Raspberry Pi Pico / RP2040 over USB.

The ESP32 (Arduino core + ESP-IDF, built with PlatformIO) pairs with the Switch over classic Bluetooth and shows up as a Pro Controller. A web page running locally in Chrome turns an MP3 or MIDI file into a melody. For audio it uses Spotify's Basic Pitch to detect the notes, and for MIDI it finds the melody track. Then it fits the melody into the ocarina's range (B3 to F5) and maps each note to its button combo.

The page sends the song to the ESP32 over Web Serial, and the ESP32 presses the buttons with the right timing.

The hardest part was getting a clean melody out of full songs: when the accompaniment is as loud as the melody, the detection picks wrong notes. So there's an assisted mode where you drag over the right notes to fix a passage.

I used Claude (AI) to help write a lot of the code. The idea, the testing on real hardware and the design choices are mine.

Code and firmware (GPL-3.0):

https://github.com/Frigime/AutoOcarina

Happy to answer questions!


r/arduino • • 4d ago

How much i should integrate Ai in my workflow?

0 Upvotes

Hello everyone i have just started arduino and i have been playing around with different parts and mixing things up, however, in this process i mostly used ai for coding, like 90% of code is done by it, and i keep trying to understand what it have done. I'm wondering if my dependence on Ai would make a problem for me on the future? Should i work on reducing it? Or just stay this way and try to learn from what it writes the maximum possible? Thank you in advance


r/arduino • • 5d ago

Look what I made! ESP8266 desk display that only decodes JPEGs: all rendering happens on a server

Thumbnail
gallery
39 Upvotes

I wrote my own firmware for the GeekMagic SmallTV Ultra (ESP-12F, 240x240 ST7789, cheap Wi-Fi display in a nice case). Instead of drawing anything on the ESP, a small Docker server renders HTML pages with headless Chromium into JPEGs, and the ESP8266 just fetches and shows them. So new screens are HTML/CSS instead of drawing code.

Some firmware details that might be interesting here:

  • Frames: baseline JPEG, max 24 KB (fixed buffer), decoded with TJpgDec and drawn with TFT_eSPI. The server lowers the JPEG quality until the frame fits.
  • Polling: the server tells the display when to ask again (2–30 s). The display sends the ETag of the last frame, so an unchanged frame is a 304 with no download and no redraw. A page switch takes about a second.
  • No flash wear from frames: frames never touch flash; only settings (LittleFS) and OTA write to it.
  • OTA: password-protected, with a mandatory MD5 check, so a broken upload is rejected.
  • Safe mode: a boot counter in RTC memory survives resets; after repeated failed boots the device starts a minimal safe mode with only the update page instead of boot-looping.
  • First flash: through the stock firmware's "Firmware update" page in the browser, no soldering.
  • Backlight: perceptual (quadratic) brightness curve, because a linear PWM duty made 20 % look almost as bright as 100 %.
  • Monitoring: /status JSON with uptime, heap, RSSI and frame counters. My unit just passed a 24 h soak test with flat free heap.
  • Libraries: ESP8266 Arduino core via PlatformIO (espressif8266@4.2.1), TFT_eSPI 2.5.43, WiFiManager 2.0.17 for the setup portal, and ChaN's TJpgDec R0.03 vendored directly. I first used the TJpg_Decoder wrapper, but its header pulled SPIFFS and SD code (~42 KB) into the image.

Most of the code was written with an AI coding assistant (Claude Code); I did the design, review and all testing on the real device.

Caveats: only the SmallTV Ultra (ESP8266), not the ESP32-based Pro. Without a serial backup there's no way back to the stock firmware.

Project page: https://robinlanger.github.io/glancebox/ · Code (MIT): https://github.com/robinlanger/glancebox


r/arduino • • 5d ago

Getting Started Genuine question about the friendliness of electronics subreddits

41 Upvotes

Hey everyone. I am a beginner in electronics and I have a genuine question. Why is the level of friendliness so different from sub to sub?

I’ve been taking arduino courses, so I’ve posted onto this subreddit once or twice asking questions and everyone is so helpful and civil.

I really don’t mean to be rude, but on other subreddits, ones that are legit made for asking questions, people are SO different.

I posted a question about a variable power supply I’m building (my first official project) and I got my head bitten off my people saying that I talked too much and such. But like, their rules say to be as clear and descriptive as possible?

I’ve much preferred the sense of community in this sub, but unfortunately this is limited to arduino, not general electronics (I’m not gonna post a general electronics question unrelated to arduino on an arduino sub; that would just be rude), even tho the people are so much friendlier.

I understand the frustration with beginners and low effort posts, and I’ve been there with topics I’m more educated about, but there’s a difference between that and someone asking a genuine question.

Now, if I have to ask a question that’s related to electronics but not specifically arduino, I have to go get my head bitten off again or wait until I’m an expert😭 like why?


r/arduino • • 5d ago

Hardware Help DFPlayer Mini MP3 module not fitting in breadboard

Post image
13 Upvotes

r/arduino • • 6d ago

Look what I made! First arduino project, Morse code translator, what do you think?

170 Upvotes

This is my first project, i am excited to see what i can make in the future.


r/arduino • • 5d ago

Hardware Help Ways to power my device

6 Upvotes

I'm building a simple temp/humidity/PM2.5 sensor that reports these stats periodically to my home server with maybe a small screen to display those numbers. I'm using a wemos D1 mini.

My question is how do you guys normally power small projects like these. I'm thinking of using a simple usb phone charger to power the device. Are there any pros and cons? is there a right way of doing this that I'm missing?


r/arduino • • 5d ago

cool idea: Playing DOOM on 256 tiny heating wires or resistors using thermal goggles?

25 Upvotes

Okay hear me out, I had this weird hardware idea stuck in my head. Honestly, my electronics skills pretty much stop at making an LED blink, so I definitely can't build this myself. I'm throwing it out here to see if anyone is crazy enough to try—or tell me if this could actually work.

What if instead of a normal screen, you built a 16x16 grid (256 "pixels") out of super thin nichrome wires standing up like a tiny forest (or tiny SMD resistors on a board), painted them matte black so they don't reflect heat like a mirror, and played DOOM by looking at them through thermal goggles?

Here's how I imagine it working (in my non-engineer brain):

Since nichrome wire actually has resistance—unlike copper which would just short-circuit and melt everything—and thin wires or tiny resistors barely hold any heat, pulsing power through them with an ESP32 and some driver chips should heat them up almost instantly.

And for cooling—since thermal cameras are crazy sensitive anyway, you wouldn't need to get the pixels super hot. Just bumping a pixel 3–5°C above room temp is enough for it to glow bright white on a thermal sensor. Put a decent fan underneath blowing air straight through the grid, and a 4°C drop should happen fast enough to avoid awful ghosting at a low frame rate.

Even at 16x16, a basic DOOM-style raycaster could use heat as depth. Far walls = barely warm (dark purple), close enemies or shotgun blasts = hotter (bright yellow/white). Plus, you'd literally feel the heat radiating off the board when an imp gets right in your face.

I know wiring up 256 heaters in a grid without turning the whole thing into a toaster is a headache, and it's way above my "blinking an LED" pay grade. Has anyone ever seen a "thermal display" like this, or does anyone want to take a stab at it?


r/arduino • • 5d ago

Storage/organizer

8 Upvotes

I work at a college store, and we offer a custom kit/bundle of parts made up of about 24 different things (including an Arduino Uno R3) that are used in an Arduino course for students to purchase. I am struggling to find a good storage solution to assemble the bundle in (such as a tackle box or divided organizer box for other crafts) that is compact, low-cost, fits everything within, and is nice to decent looking.

Does anyone have an idea for what I could explore using?

For clarity, the kit contains the following items.

• Arduino UNO R3

• Red LEDs

• 7-Segment LEDs, com cathode

• 560Ω resistor

• 1k Ω resistor

• 10kΩ resistor

• 4.7kΩ resistor

• 100 nF ceramic capacitor

• 1N4004 diode

• BC548 transistor

• TIP120 Darlington transistor

• 4 Pin DIP Tactile Switch 6x6mm Momentary Push Button Switch

• 4 X 4 hex (numeric) keypad with ribbon cable

• SG90 servo motor

• 3V DC motor

• 28BYJ-48 stepper motor + controller board

• TDK P120 piezo buzzer

• TMP36 temperature sensor

• 74HC595 shift register (16-pin DIP)

• 24LC512 EEPROM (8-pin DIP)

• MCP4152 digital rheostat (potentiometer) - Microchip Technology (8-pin DIP)

• 74LS73 Dual JK Flip-Flop with asynchronous clear (14-pin DIP)

• 10 kΩ Potentiometer (trimpot)

• 1568-1511-ND Male-to-Female ribbon cable


r/arduino • • 4d ago

Arduino ide error

Post image
0 Upvotes

I'm trying to upload my project to my ESP32-C3 SuperMini, but I keep getting this error. My Windows account was originally created with the name "Dari M", but Arduino no longer recognizes it correctly and only detects "Dari", without the "M". How can I fix this problem without changing my Windows account?

Can someoane help me pls?


r/arduino • • 5d ago

Software Help What are some good Arduino/ESP-32 graphics libraries and what are their trade-offs?

3 Upvotes

I'm working on a project built around the Elecrow 5.79 in CrowPanel e-paper display, and I'm looking into ways to create graphics. I've seen a variety of graphics libraries online, but I'm unfamiliar with their ease-of-us and what the community has had good experiences with. Many of the libraries have basic draw functions for simple shapes and text, but I'd like to work my way up to more professional looking UI. I've been experimenting with LVGL which seems to have way more functionality than I need, and its documentation leaves a lot to be desired. Are there good middle grounds between the most basic libraries and LVGL? Is LVGL worth using?

One key point that I'm considering is that my hardware uses two SSD1683 driver chips that each control half of the display. Whatever solution I end up using needs to support the SSD1683 and ideally provide convenient ways to split the draw buffer up between them. Elecrow does provide driver code in their examples, so I can also hook up their driver with a graphics library, but their driver documentation is virtually non-existent, so an out-the-box solution would be super helpful.

Also, I don't want to use AI at all for this project, so please don't recommend that approach.

Thanks!


r/arduino • • 6d ago

ESP8266 Smart kitchen Timer

Thumbnail
gallery
17 Upvotes

I've Built a WiFi-enabled countdown timer using ESP8266 or Esp12F module, SH1106 OLED display, EEPROM, NTP time sync, and a custom web-based WiFi setup portal.

Features include automatic countdown recovery after power loss, real-time clock display.

Configurable timer with button controls

Alarm notification

Smartphone-based WiFi configuration.

I've been working with Arduino and electronics since 2019, and this is one of my embedded systems projects combining IoT, UI design, and reliable state recovery. 🚀🔧📟


r/arduino • • 5d ago

Hardware Help First Elegoo starter kit: Uno R3 or Mega 2560 R3 for growing projects?

2 Upvotes

Hi everyone,

I've already had the chance to program an Arduino Uno R3 board, and I'd now like to buy a complete starter kit to tinker at home and practice for a graded lab exam at the end of the year.

I found two very comprehensive kits from ELEGOO (which I know is a reliable Arduino-compatible brand) that come with the exact same components (4-digit display, RFID reader, LCD screen, matrix keypad, motors, sensors, etc.), but with two different boards: the Elegoo Uno R3 and the Elegoo Mega 2560 R3.

Price and board size don't really matter to me, and I don't have any extra components on the side yet. I'm mainly looking to choose the best board for my learning style and future projects:

  • My goal: I plan to learn on my own (by looking up forums, documentation, and YouTube), starting with simple builds and quickly moving on to more complex projects combining multiple components. As one example among many ideas I want to try: building a timer on the 4-digit display that triggers a buzzer when time runs out, unlocked by scanning a tag on the RFID reader — and then creating even bigger systems with the other parts in the kit.
  • My question: For this kind of multi-component setup and as I progress, does the Uno R3 hit its limits quickly (in terms of available pins or memory), or should I go straight for the Mega 2560 R3? If I get the Mega, is it easy to adapt wiring diagrams found online (which are mostly made for the Uno)?

Here are the two kits I'm looking at so you can see the exact components included:

Thanks in advance for your advice!


r/arduino • • 5d ago

Cant find a vid so I need y'all's help

0 Upvotes

so we made a flood-watch device using and esp8266 and an aj-sr04m sensor.
Our issue is since the casing of the device is water tight (screwed in) I'm thinking of soldering the waterproof header to the board only issue is I haven't done this before and I'm only doing it cuz the jst connector (like the white part) is becoming loose.

so if anyone has an idea how or if this even possible (i think it is cuz there's like a box and a circle that looks like its for soldering on the board) pretty pls comment or reach out


r/arduino • • 5d ago

Look what I made! I put my to-do list on an ESP32 desk display, and the BOOT button marks missions passed or failed

1 Upvotes

Look-what-I-made post. The video is the real board on my desk, about 12 seconds: add a mission from my phone, see it land on the screen, then press BOOT to pass or hold BOOT to fail. How it works:- The ESP32 starts its own Wi-Fi network and serves a simple mission form to whatever phone joins it. I fill in a name, an objective, and a reward, then add it to the queue. Nothing is installed on the phone, and nothing is talking to a server on the internet.

  • A TFT on the desk shows the queue (for example “up next, number 3”) and the live mission, including a timer.
  • The board's BOOT button is the only controller. Short press = passed. Hold = failed. A pass increments a cash total and fills a star.

I built it because I wanted chores staring at me from the desk, with a physical “done” button, instead of another checklist in my pocket. Happy to answer questions about the AP/web-app side, the display, or the button handling. If you want a pin list or a sketch outline, ask and I’ll write it up in the thread.


r/arduino • • 6d ago

Hardware Help Pocket “thinking of you” button for two (LoRa, India): is 3-5 km realistic across Mumbai, including indoors at work?

Post image
55 Upvotes

The idea: Two identical pocket-sized devices, each with one big, whimsical red button. When I press mine, the other one vibrates, and vice versa. It’s like the old Facebook “poke,” but physical. No text, call, audio or video, just a little haptic “I’m thinking of you” that you can feel in your pocket without taking your phone out.

Why not just buy one? Couples’ bracelets cost around $140, need Bluetooth pairing with a phone app, and we’re not bracelet people anyway.

My requirements:

One small, non-bulky device per person (no router, no hotspot add-ons)

No phone, no Bluetooth, no Wi-Fi

No recurring cost: no SIM or data pack, since we both already pay for phone data

Works wherever we usually are. We live within about 3-5 km of each other (both in Mumbai), but we work at different places, so it has to work at home, at work and on the move

What I’ve ruled out and why:

Wi-Fi + MQTT: only works near Wi-Fi

Bluetooth bracelets: need a phone

4G Cat-1 module (A7670/SIM7600) with a SIM: works anywhere, but needs a data plan per device and drains the battery fast

JioFi with a button: sealed firmware, no GPIO, and bulky

That leaves LoRa (865-867 MHz in India) as the best fit: no subscription, tiny, low power.

My plan:

Two ESP32 + SX1262 868 MHz boards (e.g. XIAO ESP32-S3 + Wio-SX1262, Heltec, or LilyGO)

Vibration motor (transistor driver or DRV2605L), a big arcade-style button, and a 500-800 mAh LiPo

Receiver sleeps and wakes about every second to check for a packet; sender uses a long preamble so it’s caught

Long-range settings (SF10-12) since the packet is tiny

Test with Meshtastic first to measure real range before writing code (RadioLib after that)

My questions:

Range: Is 3-7 km realistic in dense Mumbai with pocket-level, body-adjacent antennas? Or will I realistically get only 1-2 km?

Indoors and fixed nodes: A home node only helps at home, and we’re at different workplaces during the day. Can a pocket LoRa device reach 3-7 km indoors in concrete offices, or would I need a small fixed node at each workplace (which defeats the “one small device” goal)?

Existing mesh: Is there a Meshtastic community in Mumbai whose rooftop nodes could relay packets and make this more reliable? Is there a coverage map?

Missed nudges: Is store-and-forward (a nudge missed out of range gets delivered when we’re back in range) easy to do with Meshtastic or custom RadioLib code?

Battery: Does the wake-every-second approach realistically give several days on 500-800 mAh? Any better trick (e.g. channel activity detection)?

Antenna: What antenna works best in a tiny enclosure for the 865-867 MHz band? Any pitfalls with body detuning?

Legal: Any India-specific rules I should know (power limits, duty cycle) for license-free 865-867 MHz?

Prior art: Has anyone built a similar “poke” device with LoRa or Meshtastic? Links, schematics and lessons learned would be hugely appreciated.

Budget is around ₹5,000 for a two-board test setup. If the range works, I’ll design a small custom PCB and enclosure (I’m a UI/UX designer, so the whimsical shape and case are the fun part for me).

Thanks in advance for any advice!


r/arduino • • 6d ago

First project 🥹

186 Upvotes

Just 8 bucks and tons of parts left over. I have no clue what else to get into any reccomendations?


r/arduino • • 7d ago

Look what I made! GTA 6 is finally here, and I actually made a GTA for the ESP32

229 Upvotes

Remember that GTA-style game I posted here a while ago? (Original post: https://www.reddit.com/r/arduino/s/Pa2YOUqijv) I've kept working on it since then, and it's finally getting close to done.

If you missed the first post: I'm making it with PixelRoot32, my own C++17 game engine for the ESP32.

It's grown a lot since that first version. You can drive around a city with 5 districts, steal cars, buy stuff, get chased by the police and take on missions. There's a day/night cycle, pedestrians, traffic lights, weapons and 4 radio stations, plus a bunch of smaller things.

There are 3 main missions so far, along with courier jobs and a small in-game economy. There's also a 5-star wanted system, so things get messy fast if you cause too much trouble.

Two new things since last time:

Sound: The engine now has a Famicom-style sound profile, and the game uses it. The radio and sound effects sound closer to an old NES cartridge, with fuller bass and punchier drums.

Saving: The game now remembers your progress between sessions. If you finish a mission and turn the ESP32 off, it picks up at the next one when you turn it back on. It also keeps your best delivery streak, the most cash you've ever had and your volume setting. Your cash and gear still reset each run, so you can't just farm money.

The display changed too. I started on a 240×240 screen, and the game now also runs on 320×240. That's the version in the video.

It still runs on a plain ESP32, now with 8 buttons. The two new ones work as Start and Select: Start changes the volume and Select shows your records.

The timing is kind of funny with GTA 6 finally coming out. Everyone's getting ready for the next GTA, and I've been trying to get my own little one running on a microcontroller.

If you want to look at the code: https://github.com/PixelRoot32-Game-Engine/PixelRoot32-Demo-Projects/tree/main/games/top_down_city

The README and ROADMAP cover the features and what's still planned.

More ESP32 demos made with PixelRoot32: https://github.com/PixelRoot32-Game-Engine/PixelRoot32-Demo-Projects


r/arduino • • 6d ago

Need help understanding wires and breadboards and stuff

6 Upvotes

Im new to arduino, microcontroller in general, and ive made proects like led and led with a button.
But all the time when I watch those videos, I wonder, why does that wire go there? Im so confused, no tutorial has really helped me understand why the wire goes there. I find it so stupid just following the person in the video say, "That wire goes in this pin", and no explanation why. A.I hasnt helped.

So I was wondering if anyone could explain how to figure out wire placement. Thanks!


r/arduino • • 6d ago

Software Help I forgot my password for the UNO Q

0 Upvotes

I forgot my password. Is there a way to reset the password without reinstalling the OS?


r/arduino • • 6d ago

Hardware Help Request for ideas - Simple math games

2 Upvotes

Hello sub,

I'm looking for ideas to create a game to teach kids how to count to 10 by making simple additions: 3 + ? = 10.

I have a bunch of hardware, from push buttons to switch, screens, arduino (nano, uno, mini pro), screens, leds of all kinds and so on. The idea is to have something:

  • Portable
  • On battery (I already experienced 9v battery successfully with nano and luminous keyboard)

I want it to be visual, and will try to avoid using screen (mainly to save energy). I also already have some ideas in mind but I'm willing to see if anyone has a good project to propose.

Thank you!


r/arduino • • 6d ago

Fit encrypted multi-KB ESP-NOW + LZ4 + 35% packet-loss recovery into 4,760 bytes of ESP8266 static RAM (NLTP, MIT)

3 Upvotes

If you use an ESP8266 (NodeMCU / D1 Mini / ESP-07S) for remote sensors in a yard, garage, or basement, two limits hit pretty quickly:

  1. ESP-NOW v1 on the ESP8266 caps frames at 250 bytes (192 bytes usable after headers) and drops an entire multi-KB log or CSV batch if even one packet gets lost through a wall.
  2. With only 80 KB of total SRAM (~22-40 KB free heap once the SDK boots), full TLS / BearSSL or big retransmission buffers eat almost all available memory.

I built an open-source MIT library in zero-malloc, zero-float ANSI C99 called NLTP (now in the Arduino IDE Library Manager as NLTP and PlatformIO as indian-aman/NLTP) with an ultra-light sensor flag (-DNLTP_TX_ONLY=1) that shrinks sizeof(nltp_endpoint_t) to 4,760 bytes of static RAM while keeping:

  • Cross-chip ESP8266 <-> ESP32 ESP-NOW & Wi-Fi UDP: Automatically uses 192-byte shards (242-byte encrypted frames) on ESP8266 ESP-NOW v1 and interoperates seamlessly with ESP32 gateways and Python (pip install pynltp) receivers.
  • In-flight packet-loss recovery (GF(2^8) Cauchy FEC): Reconstructs 10-35% dropped RF frames mathematically on the receiver (3/3 SHA-256 verified on an 8 KB NodeMCU -> ESP32 bench sweep at 10%, 25%, and 35% packet loss, where raw ESP-NOW delivered 0/3).
  • Built-in zero-heap LZ4 compression: Compresses CSV/JSON telemetry 4x-7x before transmission (ESP8266_UltraLight_LZ4_Sensor.ino included in examples/).
  • Software X25519 + ChaCha20-Poly1305 + 512-packet anti-replay: No BearSSL heap allocation and no hardware peer-slot limit, plus bidirectional confirmed popReflex() / sendReflex() control messages.

On a clean 0%-loss desk link, unencrypted raw ESP-NOW is faster (2.55 Mbps raw vs 1.29 Mbps encrypted NLTP on 8 KB NodeMCU -> ESP32), so raw ESP-NOW is still great for tiny single-frame readings at short range. NLTP is specifically for multi-KB batches, encrypted links, and weak-signal spots where packets drop.


r/arduino • • 7d ago

GitHub - ESPARGOS/esp-sdr: ESP-SDR uses the undocumented raw I/Q capture functionality of ESP32 family chips to turn them into (low-duty-cycle) Software Defined Radios

Thumbnail
github.com
29 Upvotes

.

This is fascinating, especially from a security perspective. Has anyone played with esp-sdr much ? I just learned about it


r/arduino • • 6d ago

Hardware Help Does anyone know of any Arduino compatible methane sensors that can detect a lower ppm range?

1 Upvotes

I am aware of the MQ-series gas sensors (this video summarizes several), but I haven't been able to find any that achieve the range / sensitivity i am looking for. Specifically for my application i am looking to get a sensor that can detect methane levels in the range of about 0 - 100 ppm with a sensitivity of at least 1 or 2 ppm per division. Does anyone know if something like this exists or can be built easily?