r/arduino • • 3d ago

Hardware Help Question

25 Upvotes

With an Arduino, Can I write a block of code to it and “mount it in an enclosure” and have it run the same code over and over again with no interaction to the board other than applying power until eternity?

I’m looking to develop a small toy and essentially looking for a “controller” to run some motors/servos.

If so, What is the cheapest/smallest Arduino to achieve this goal with?

Thank you.


r/arduino • • 3d ago

Software Help Stuck with ESP32-audioI2S crashing my program

5 Upvotes

Hello guys, I've been struggling with this problem for a few days already, and i just can't find the solution. I am using an ESP32-S3-WROOM-1 with platformIO and have written a simple program that uses the ESP32-audioI2S library to attempt to play a file from an SD card.

#include <Arduino.h>
#include <SD_MMC.h>
#include <Audio.h>
#include "pins.h"
#include <Wire.h>
#include "scan.h"
#include "amp.h"
#include "esp_heap_caps.h"

Audio audio;

void my_audio_info(Audio::msg_t m) {
  Serial.printf("%s: %s\n", m.s, m.msg);
}

void setup() {
  Serial.begin(9600);
  delay(1500);

  SD_MMC.setPins(PIN_SDIO_CLK, PIN_SDIO_CMD, PIN_SDIO_D0, PIN_SDIO_D1, PIN_SDIO_D2, PIN_SDIO_D3);

  if (!SD_MMC.begin("/sdcard", false, false, 5000)) {
    Serial.println("SD card init failed");
  } else {
    Serial.println("SD card init success");
  }

  Serial.printf("Total PSRAM: %d bytes\n", ESP.getPsramSize());
  Serial.printf("Free PSRAM:  %d bytes\n", ESP.getFreePsram());
  Serial.printf("Largest free block in PSRAM: %d bytes\n", heap_caps_get_largest_free_block(MALLOC_CAP_SPIRAM));

  Audio::audio_info_callback = my_audio_info;

  audio.setPinout(PIN_I2S_BCK, PIN_I2S_LRCK, PIN_I2S_DOUT);
  audio.setVolume(21);
  if (!audio.connecttoFS(SD_MMC, "/sample-3s.mp3")) {
    Serial.println("failed to connect to mp3");
  }

  delay(100);
}

void loop() {
  audio.loop();
  vTaskDelay(1);
}

When running the code, I get the following in the serial monitor:

SD card init success
Total PSRAM: 2097152 bytes
Free PSRAM:  2065324 bytes
Largest free block in PSRAM: 2064372 bytes
info: inputBufferSize: 655349 bytes
info: Reading file: "/sample-3s.mp3"
Disconnected (read failed: [Errno 6] Device not configured)
Reconnecting to /dev/cu.usbmodem7C0C5F964D501 .  Connected!

After the "info: Reading file:" line, the firmware crashes and reboots. At first I thought there was not enough memory, but i printed the available PSRAM and its way more than the buffer size. Maybe the library was not told to use PSRAM? But I couldn't find a way to do that. What in the world is this issue?


r/arduino • • 3d ago

Hardware Help what is the maximum amount of parts i could plug in my arduino board?

6 Upvotes

hello I'm a beginner in Arduino, and recently i started getting more intrigued by it. However, as I started testing various parts such as ultra sonic sensor, lcd screen, servo motor... I started having questions regarding mixing all these parts in one project and the limitations i would face. for instance, should i avoid connecting everything to one arduino board and use external power source? what if i ran out of digital pins, how to add more pins etc? should i start using my breadboard as i usually neglect it? I would really appreaciate insights on these questions.


r/arduino • • 3d ago

I wrote a free 8-lesson Arduino course for ages 11-14 that runs in Tinkercad, so kids don't need kits

17 Upvotes

When my local library's Arduino program shut down for lack of instructors and materials, a few teammates from my robotics team and I rebuilt it from scratch. It's now taught at five libraries and has reached 1,000+ kids, and a Canadian nonprofit, Digital Moment, adopted the French edition.

What's in it:

- 8 lessons, about 90 minutes each: blinking LED, series vs. parallel, buttons and pull-down resistors, potentiometers and analogRead, servos and map(), switch statements and loops (a 4-mode windshield wiper), and two open-ended capstones

- Every lesson works with real parts OR entirely in the Tinkercad simulator

- Code examples, wiring diagrams, teacher notes, timing, common wiring mistakes, and exit tickets

- Free and MIT-licensed

I'm a high school senior, so I'd really appreciate feedback from people who know this better than I do, especially on the explanations in Lesson 3 (pull-down resistors) and Lesson 7 (millis() vs. delay()). If you teach or mentor and end up using any of it, I'd love to hear how it went.

Link: https://github.com/RohanM1212/teaching-arduino


r/arduino • • 2d ago

I built my own Arduino-based 180° radar system – Ali's Radar (custom code + active cooling)

0 Upvotes

Hey, I'm Mad Mohammad Ali! Custom ui and code

I wanted to share a project I've been building called Ali's Radar — an Arduino-based ultrasonic radar system with a 180° scanning mechanism and a live radar interface on PC.

This project is built around my own ideas, experiments and custom-written code.

⚙️ Main Features

- 180° servo-controlled radar scanning

- HC-SR04 ultrasonic object detection

- Real-time radar visualisation on PC using Processing

- Live object distance measurement

- Servo-based scanning mechanism

- Joystick controls for manual radar operation

- OLED display integration (planned)

- Active cooling system And On off switch and range selector with 100 cm to 400 cm range

- Custom Arduino and Processing code written by me

🎮 Controls

The system includes a joystick-based control setup:

- VRx: horizontal control

- VRy: vertical control

- SW: joystick button input

The radar also has an ON/OFF control and adjustable scanning behaviour.

❄️ Active Cooling System

I also worked on an active cooling system as part of the project. I wanted to make the setup more than just a basic radar demonstration.

💻 Programming

The Arduino handles the sensor, servo and control inputs, while Processing handles the radar-style PC visualisation.

The code is custom-written by me. I developed and modified the Arduino and Processing sides while testing the system.

🔧 Current Status

The project has had its share of failures and problems during development. Some parts work, while others still need troubleshooting and improvement.

I'm sharing it because I want to document the journey, learn from other makers, and keep improving Ali's Radar.

This is a personal DIY engineering project, and I'm still working on it.

Thanks for checking it out! 📡


r/arduino • • 3d ago

Beginner project idea

2 Upvotes

Hello,

I have bought the starter kit with the uno r3, and I got an idea I would think would be really fun personally. I want to make a hub kinda like a hygrometer but also add a UV sensor for my lizard. Would that be a complex first project to start with?


r/arduino • • 3d ago

Look what I made! Arduino MEGA as a JTAG probe??

3 Upvotes

I'm not sure how many details to include, tried all possible googling for how to debug a MEGA and all I found was I had to buy an AVR ICE ?

took me a few weeks to figure this out, all vibe coded so YMMV, you can turn your spare MEGA in a JTAG probe to help debugging another MEGA .

pretty much all that you need is in the repo README

stars, sponsors, forks, comments, issues, feedbacks appreciated

https://github.com/lsdlsd88/mega-jtag-killer


r/arduino • • 3d ago

Uno Q Help with serial Arduino Uno Q

2 Upvotes

Hi. I got the Uno Q last spring but haven't gotten the serial to work which has led to me not using it.

I have found tips on the internett to use the monitor command instead and have coppied code from there. The Uno Q hasn't responded at all.

I know that there is a connection as I can upload all other code as normal. It is however difficult to start to use it without the serial.

I don't have a lot of experience having only used Arduino for one school year building one salinity sensor and a very simple car. Some please ask questions if you need more context and there is relevant information that I haven't given😊

It may be relevant to say that I code on a school Laptop which has applab blocked (as well as almost everything else🫠) so I use the Arduino IDE both the IDE and Uno Q module in the IDE is up to date.

Thanks in advance😊


r/arduino • • 3d ago

Hardware Help How should I connect an MG996R servo, MQ-2 sensor, and flame sensor to an Arduino Mega using an external power supply? (Preferably without soldering)

2 Upvotes

Currently working on a school prototype and I'm trying to figure out the best way to connect my components with proper wiring and tools to use.

I currently have:

  • Arduino Mega 2560
  • 2 flame sensors, MQ-2 gas/smoke sensor
  • MG996R servo motor, XL4016 DC-DC buck converter
  • 12V DC power adapter, 9V battery
  • M/F terminal blocks, Jumper wires, and a Breadboard.

What I'm trying to achieve:

I want to use one MG996R servo with two different operating modes:

  • If either flame sensor detects a fire in its direction, the servo rotates toward that specific area and holds its position.
  • If the MQ-2 detects smoke or gas but neither flame sensor provides a reliable direction, the servo continuously rotates back and forth within its 180° range until the detection clears.

The MQ-2 is intended as a backup trigger since it cannot identify the direction of a fire..

not tested with the sensors yet. It's just my intended arrangement, but you get the idea.

I've already tested the servo using a breadboard, and it works. However, it doesn't seem to reach its full movement potential. I suspect this is because the breadboard and USB power source aren't providing enough current for the MG996R, which can demand around 2A under heavy load. I also tested it using my computer's USB connection, but I only ran it briefly because I didn't want to overload the USB power source.

My questions:

  1. What's the best way to distribute power to these components in parallel? Can I use my 12V adapter with the XL4016 to provide the servo with its required voltage and current while powering the Arduino and sensors separately through properly regulated outputs?
  2. Should the Arduino and sensors have a separate power supply from the servo, or can they share the same 12V source through properly regulated outputs?
  3. How should I connect the grounds and signal wires between the Arduino, sensors, buck converter, and servo? Would terminal blocks or other connectors be suitable instead for making these wiring connections without soldering?
  4. Would you recommend keeping the breadboard for sensor connections only and using separate terminal blocks or another method for the servo's power connections?

I'd appreciate any wiring diagrams, suggestions/comments, or some advice from people who have worked with similar components. Thanks!


r/arduino • • 4d ago

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

281 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 • • 3d 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 • • 4d 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 • • 4d ago

Getting Started Genuine question about the friendliness of electronics subreddits

40 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 • • 4d ago

Hardware Help DFPlayer Mini MP3 module not fitting in breadboard

Post image
11 Upvotes

r/arduino • • 5d ago

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

168 Upvotes

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


r/arduino • • 4d 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 • • 4d 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 • • 3d 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 • • 4d 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 • • 5d 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 • • 4d 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 • • 4d 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 • • 4d 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.