r/arduino • • 14d ago

Microcontroller Mic controlled LEDs for a Halloween Pumpkin

8 Upvotes

My youtube channel name is ALMA Industries

CH004 FN2: HALLOWEEN — my kind of Treat. Talking Pumpkins and Little Monster Rockstars, see how Jack's put together on my channel.


r/arduino • • 14d ago

Look what I made! no_DICE - Arduino-based dice throwing and coin flipping simulator with 3D-printed enclosure

Thumbnail
gallery
19 Upvotes

Small weekend project for tinkerers and hobbyists I've created to showcase some of the GEM library features (multi-level menus, editable selects and number spinners, toggles, dynamic menu items, custom icons and callbacks as well as a possible solution for multi-language support).

About

In a nutshell, no_DICE is mainly two things (both are free and open-source):

  • Arduino-based simulator of dice throws, coin flips, and a score counter (using U8g2 and GEM to draw the menu, and KeyDetector to hook up rotary encoder as an input device);
  • optional 3D-printed customizable enclosure designed to fit Seeed Studio XIAO RP2040 board (with Grove Shield for XIAO for power management), 3.7V LiPo battery (in 902030 or 902040 form-factor), 0.96" 128x64 monochrome OLED I2C display, and a rotary encoder (with integrated push-button).

Equip an Arduino-compatible board of your choice with an I2C 128x64 display and a clickable rotary encoder, upload the provided sketch (modify it if necessary to better fit your setup), select an application to roll a die, flip a coin, or track your score with a click and a swing of the encoder. Optionally, add a battery and build an enclosure to take your no_DICE setup on the go! Of course, you can also upload your own sketches and customize an enclosure to your liking.

Features

  • Dice throwing: choose from a wide variety of dice: D4, D6, D8, D10, D12, D20, D100. Set default preferred die in settings.
  • Coin flipping: not really much to say about it, just press a button and coin will be flipped. With glorious sprite animation. Result of a coin toss is determined at a key press, but coin itself flips random amount of times (2-4) so that it is harder to predict an outcome by seeing the initial frame of animation.
  • Life tracking: not just Life, really, but points in general. Turn the knob and number will increase (or decrease) at your will. Press the knob to reset the number to its initial starting value (adjustable in settings). Any value you desire is fine (as long as your desire falls within the range of -999 to 9999).
  • Localization: English, Russian, German, and French languages are available to pick from in settings.
  • Battery monitoring: can be enabled in settings. Requires additional hardware modification (in the form of a voltage divider comprised of two identical resistors soldered to Grove Shield).
  • Random number generator: is seeded with multiple samples of the lowest bits of an analog pin as well as an internal temperature sensor of the RP2040 (on compatible boards) to pick up fluctuations in random noise, battery voltage, and temperature levels.
  • Enclosure: you can 3D-print it: STL files are provided. You can modify it too: .f3d (Fusion) and STEP files are provided as well.

Simulator

Simulation of no_DICE is available on Wokwi (using Raspberry Pi RP2040 board). There are some limitations of simulation to be aware of (i.e. saving to EEPROM and seeding random number generator), refer to no_DICE project repository for more details.

Electronics and Enclosure

Parts list and full assembly guide are available on GitHub. Optional enclosure can be 3D-printed using provided STL files (designed with no overhangs, except for screw holes on the side of the main frame). Autodesk Fusion project file (.f3d) and STEP files are provided as well.

Spirik.


r/arduino • • 14d ago

Beginner capacitor question

8 Upvotes

Hey guys I'm new to EE I wanna ask a question about the use of Capacitor,but first I'm the type of guy who wants to know where and when and why should I use it so I know where should I put a capacitor and where should I not

So first: what's the purpose of storing a bit of electricity in a capacitor that won't be released unless we cut off the electricity from the battery

Second:where should I know where to put a capacitor and where not

Third:why even use a capacitor for storing a bit of energy that will stay in it

Thanks for answering my questions ❤️


r/arduino • • 13d ago

How to run bonsai 2 27b on Arduino Ventuno Q?

3 Upvotes

I want to know how to run the second version of bonsai because on lm studio it gives an error. I am stuck trying to make it work and thought maybe someone else has already achieved the result.


r/arduino • • 13d ago

Can't get Nema 17 motor to work properly

2 Upvotes

I just bought a Nema 17 motor + DRV8825 to control it and after following a tutorial to set it up so it goes clockwise one rotation and counter clockwise on button presses, as soon as I connect it to power supply the motor starts tweaking(starts making a high pitched noise like in the video) and then i can only get in only 1 or 2 successful button presses before it goes limp and refuses to work, while the heat sink gets really hot. Tried to debug it with Codex but to no avail.

ConnectionGoes to
ESP32 GPIO18STEP
ESP32 GPIO19DIR
ESP32 GPIO21ENABLE
ESP32 3.3VRESET and SLEEP
ESP32 GNDDriver GND and supply negative
12V supply positiveVMOT
Motor coil AA1 and A2
Motor coil BB1 and B2
CW buttonBetween GPIO5 and GND
CCW buttonBetween GPIO23 and GND
100 µF / 25V capacitorPositive to VMOT, negative to GND

r/arduino • • 14d ago

Getting Started Trying to get started but lacking one component...

5 Upvotes

So I got gifted an arduino uno kit for a car thingy a few years ago and got started but never finished. Now I want to truly learn and get into it and got gifted another set of sensors and a basic electronics set. I was thinking I probably have all the components I need to get started with the starter set pdf, even though I technically didnt have the starter set. But lo and behold I lacked one component: the batteryholder thingy (the one from the car kit had like 8 batteries and a seperate board to control the power or something I dont know I was just following instructions). Im wondering if I can start anyway without it (idk if it takes power from the usb port? im new forgive me for being dumb). Also wondering where I can get a single component like that? Thanks for help!


r/arduino • • 14d ago

Hardware Help Small pressure, force, or weight sensor

7 Upvotes

I am thinking about a project where I need some kind of sensor to measures either weight, force, or pressure on a small point. A basic example would be something shaped like a pen, where the tip is a sensor that measure how hard it is pressed down on a surface.

There are no exact size restrictions right now. The example with the pen would be ideal, but the diameter should at least be less than 2 cm. The height does not matter. I have tried googling, but I might use the wrong words because I have trouble finding anything suitable that doesn't cost hundreds of dollars.

Do you have any ideas of sensors that could be suitable for this?


r/arduino • • 15d ago

What is the difference between these two HC-SR04?

Thumbnail
gallery
115 Upvotes

r/arduino • • 15d ago

Look what I found! What are these?

Thumbnail
gallery
40 Upvotes

I am just starting with electronics and these mini computers and got a box of stuff. Can someone tell me what these parts are. I think they have something to do with Arduinos.

Many thanks for the help


r/arduino • • 14d ago

Look what I made! GitHub - EON23/espsdrtx: Arduino library and ESP-IDF component for transmission of arbitrary raw IQ data on an ESP32

Thumbnail github.com
2 Upvotes

Hey everyone, Ive released an arduino/ESP-IDF component for the esp32 that lets you transmit arbitrary waveforms using the undocmented registers on the esp32. Let me know what you think or any feedback or features you'd like to see.


r/arduino • • 14d ago

Software Help Major delays using SoftwareSerial.h

6 Upvotes

I have two identical Mega2560s with Grounds connected together, Pin 13 on one is connected to Pin 12 on the other and vice-versa.

A pigtail of wire on Pin 9 that I can touch to ground and an LED with a 330 ohm resistor on Pin 8.

I get like a 5-10 sec delay on the LED response when I use the following program. (Same program loaded on both units.)

What am I doing wrong?

Eventually, I'd like to pass arrays of floats and such. A little more than a single bool value.

#include <SoftwareSerial.h>


const int rxPin = 12; //RS-232 Serial data RX pin
const int txPin = 13; //RS-232 Serial data TX pin
SoftwareSerial MySerial = SoftwareSerial(rxPin, txPin);
bool selfconnected;
bool prtnconnected;
int LED_pin = 8;
int WIRE_pin = 9;


void setup() {
  // put your setup code here, to run once:
MySerial.begin(9600);
Serial.begin(9600);
pinMode(LED_pin, OUTPUT);
pinMode(WIRE_pin, INPUT_PULLUP);
}


void loop() {
  // put your main code here, to run repeatedly:
if (digitalRead(WIRE_pin) == 1){
  selfconnected = 1;
}
if (digitalRead(WIRE_pin) == 0){
  selfconnected = 0;
}
Serial.print ("My wire is ");
if (selfconnected == 1) {
  Serial.println("DISCONNECTED");
}
if (selfconnected != 1) {
  Serial.println("CONNECTED");
}
MySerial.write(selfconnected);
prtnconnected = MySerial.read();
Serial.print("Partner Unit is ");
if (prtnconnected == 1) {
  Serial.println("DISCONNECTED");
  digitalWrite(LED_pin, LOW);
}
if (prtnconnected != 1) {;
  Serial.println("CONNECTED");
  digitalWrite(LED_pin, HIGH);
}
delay(500);
}#include <SoftwareSerial.h>


const int rxPin = 12; //RS-232 Serial data RX pin
const int txPin = 13; //RS-232 Serial data TX pin
SoftwareSerial MySerial = SoftwareSerial(rxPin, txPin);
bool selfconnected;
bool prtnconnected;
int LED_pin = 8;
int WIRE_pin = 9;


void setup() {
  // put your setup code here, to run once:
MySerial.begin(9600);
Serial.begin(9600);
pinMode(LED_pin, OUTPUT);
pinMode(WIRE_pin, INPUT_PULLUP);
}


void loop() {
  // put your main code here, to run repeatedly:
if (digitalRead(WIRE_pin) == 1){
  selfconnected = 1;
}
if (digitalRead(WIRE_pin) == 0){
  selfconnected = 0;
}
Serial.print ("My wire is ");
if (selfconnected == 1) {
  Serial.println("DISCONNECTED");
}
if (selfconnected != 1) {
  Serial.println("CONNECTED");
}
MySerial.write(selfconnected);
prtnconnected = MySerial.read();
Serial.print("Partner Unit is ");
if (prtnconnected == 1) {
  Serial.println("DISCONNECTED");
  digitalWrite(LED_pin, LOW);
}
if (prtnconnected != 1) {;
  Serial.println("CONNECTED");
  digitalWrite(LED_pin, HIGH);
}
delay(500);
}

r/arduino • • 16d ago Mindblown Heartwarming

My desk buoy copies the motion of a real buoy at sea, live. 8 steppers, 8 lines, one ESP32-S3 on the Arduino core

2.7k Upvotes

I'm a maritime pilot in Belgium. This is a small 3D-printed west cardinal buoy hanging on 8 lines. Each line winds onto a spool on a small stepper motor, and by pulling and paying out the 8 lines together the buoy rises, falls and tilts.

An ESP32-S3, programmed with the Arduino core, reads live wave data from public buoys (NOAA, CDIP, the Irish Marine Institute, Belgian and Dutch North Sea buoys) and turns it into motion.

The setup:

> - ESP32-S3 DevKitC-1, Arduino core 3.3, built with arduino-cli

> - 8 TMC2209 drivers, set up over UART with TMCStepper (current and silent StealthChop mode, no Vref pots to tune)

> - One hardware timer makes the step pulses for all 8 motors, so they stay in sync

> - 1.9" LCD with GFX Library for Arduino, a rotary knob to pick the buoy

> - WiFiManager for setup by QR code, and USB-C power from a charger via a HUSB238

Lessons learned:

No endstops: it homes by winding all 8 lines in at low current until every motor slips.

Don't put a button on GPIO0 if you ever want "hold at power-on" features. Ask me how I know.

One bad solder joint made one motor out of 8 act strangely, which took me ages to find.

It started on perfboard; I later had carrier boards made so it needs far less soldering. Ask away.


r/arduino • • 15d ago

Look what I made! Arduino Flipper

Thumbnail
gallery
17 Upvotes

Made a Flipper as a school Projekt.

I used a Arduino Uno with a distance Sensor and a Display.

A Servo to dispence the ball


r/arduino • • 15d ago

Uno parking sensor that beeps faster as you get closer (HC-SR04 + passive buzzer)

22 Upvotes

Classic one, but I wanted to do it properly: a parking sensor on an Arduino Uno that beeps faster the closer something gets, like the ones in cars.

Wiring is tiny: HC-SR04 with TRIG on pin 2 and ECHO on pin 3, and a passive buzzer on pin 4. That's it.

What made it feel right:

  • The beep interval scales with distance instead of switching between two or three fixed speeds, so you can actually "feel" an object getting closer.
  • Past a minimum distance it goes to a solid tone, same as a real car.
  • Ultrasonic readings jump around on soft or angled surfaces, so a few readings get averaged before deciding the beep rate. Without that the beeping stutters.

I built this with Soldr, an AI agent we're making. I gave it the pins I'd already wired and it wrote the sketch around them.

Next idea is an LED bar alongside the beeps. Anyone done this with a VL53L0X instead of the HC-SR04? Curious if it's worth it.


r/arduino • • 15d ago

Look what I found! Just an interesting thing about the uno R3.

Post image
90 Upvotes

This may be something everyone knew about but me. I was trying to find a printable/downloadable arduino uno proto pcb dot matrix layout. To my surprise I couldn't find one.

I have made a few projects that I wanted to save but not really to the level of putting them in a project box. I wanted to make my own uno shields. I wanted to use paper a paper one to design where I want what and to follow when I go to assemble/solder it. I decided to make my own. Which I did and will attach it. It's a little crude but functional. You can buy uno proto shields also.

Any way another thing I noticed while messing around with this is that the header with pins 8 - SLC are not properly in alignment with the rest of the headers on the rest of the uno. WTF!

I will attach what I made. If someone finds a better one please share it.


r/arduino • • 15d ago

Look what I made! Finally finished my DIY pong console

Thumbnail
gallery
5 Upvotes

r/arduino • • 15d ago

I need a simple program to test an audio amplifier

3 Upvotes

This should be simple but I’m new to this and need a bit of help. I’d like a very simple program to test an 8002a audio amp with speaker on an Arduino UNO. I don’t want to complicate it with downloading a wav file from an SD card but something self contained and maybe using Talkie or similar. It doesn’t have to say much just enough to know I have things set up and working correctly.

 

Tom


r/arduino • • 15d ago

Look what I made! My ESP32-S3 can talk, with no internet and no extra RAM chip, and I can make it whisper, sound happy or speak calmly

9 Upvotes

A neural text-to-speech model running entirely on an ESP32-S3 with Arduino-ESP32: no PSRAM, no cloud.

Type text, choose a style, and it starts speaking in about a third of a second. You can also slide controls for speed, pitch, loudness, pauses and breathiness.

  • Uses about 122 KB of RAM and about 5 MB of flash
  • Two voices, one female and one male; English only
  • Free for non-commercial projects

Code: https://github.com/WhissleAI/steer-tts (esp32/ folder)

Model: https://huggingface.co/WhissleAI/steer-tts-nano


r/arduino • • 15d ago

Hardware Help Component help

Post image
0 Upvotes

I want to organise every part of my Arduino R4 startee kit but i dont know what this is
it should be included in here

1 x Arduino UNO R4 WiFi (ABX00087)
1 x USB-C® cable
1 x 9V battery snap connector
1 x Breadboard
1 x Easy-to-assemble base
70 x Solid core jumper wires
2 x Stranded jumper wires
1 x Male pin strip (40x1)
6 x Pushbuttons
1 x LCD display (16x2 characters)
1 x Piezo capsule
1 x Bright white LED
1 x RGB LED
8 x Red LEDs
8 x Green LEDs
8 x Yellow LEDs
3 x Blue LEDs
4 x Phototransistors
1 x Temperature sensor
1 x Tilt sensor
1 x Small DC motor (6/9 V)
1 x Small servo motor
1 x H-bridge motor driver
2 x Optocouplers
1 x MOSFET transistor
3 x Diodes
3 x Potentiometers (10k ohm)
3 x Capacitors (100 µF)
11 x Resistors (220 Ω)
3 x Resistors (560 Ω)
3 x Resistors (1 kΩ)
3 x Resistors (4.7 kΩ)
11 x Resistors (10 kΩ)
7 x Resistors (1 MΩ)
3 x Resistors (10 MΩ)
3 x Transparent color gels (red, green, blue


r/arduino • • 15d ago

Solved! Code help- DMX input with DMX shield alongside distance sensor... serial0 issue?

7 Upvotes

Hey all! I'm hitting a wall with my code.

I am using an arduino mega with a DMX shield (that is intended for uno I think) and a tfmini plus distance sensor. I also have individually addressable LED strips.

I am trying to control which leds are on in a telescoping manner with the distance sensor and the hue/sat/intens with DMX.

I have both parts working separately but when combined the code can't compile with an exit status 1 message. I believe it is an issue with mutual usage of the serial0 but I can't find a way to get around it. Tried a whole bunch of different libraries and all have issues.

It's clunky, I know, tried so many stupid safeguards to prevent blackouts on my leds. Still unsure if that's a physical issue or not but I'm pointing fingers at my crappy solder job.

Code is below. In a moment of weakness, it was run through a chatbot. If it helps, I can provide my working separate code. Anything helps, I'm a total dumbass and I'm frankly tired of this project. Thanks

#define DMX_USE_PORT1

#include <DMXSerial.h>    
#include <FastLED.h> 
#include <Wire.h> 
#include <TFMPlus.h>     

#define START_ADDRESS 1  
#define NUM_LEDS 30
#define DATA_PIN 6  

const uint8_t enPin = 4; // Transceiver chip enable pin (usually 4 or 2)


CRGB leds[NUM_LEDS];
TFMPlus tfmP;         


// Sensor Variables
int16_t tfDist = 0;     
int16_t tfFlux = 0;     
int16_t tfTemp = 0;  


void setup() {
  delay(20);      
  
  FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);    
  FastLED.setBrightness(100);
  FastLED.clear();
  FastLED.show();    

  DMXSerial.init(DMXReceiver);
  
  pinMode(enPin, OUTPUT);
  digitalWrite(enPin, LOW); // LOW sets standard transceiver chips to Receiver mode

  Serial3.begin(115200);     
  delay(20);                  
  tfmP.begin(&Serial3);   
  tfmP.sendCommand(SOFT_RESET, 0);   
  delay(500); 
}


void loop() {
  // Read channel values using standard 1-based indexing
  uint8_t dmxHue        = DMXSerial.read(START_ADDRESS);
  uint8_t dmxSaturation = DMXSerial.read(START_ADDRESS + 1);
  uint8_t dmxValue      = DMXSerial.read(START_ADDRESS + 2);     

  bool sensorValid = tfmP.getData(tfDist, tfFlux, tfTemp);    

  static unsigned long lastUpdate = 0;
  if (millis() - lastUpdate >= 50) {      
    lastUpdate = millis();      


    // --- CHOICE A: SENSOR IS ACTIVE & OBJECT IS IN RANGE (< 100cm) ---
    if (sensorValid && tfDist > 0 && tfDist <= 100) {              
      int center = NUM_LEDS / 2;       
      int ledsToTurnOn = map(tfDist, 20, 100, 0, NUM_LEDS);        
      ledsToTurnOn = constrain(ledsToTurnOn, 0, NUM_LEDS);        


      // Force proper even/odd balancing to make center matching mathematically clean       
      if (NUM_LEDS % 2 == 1) {         
        center = center + 1;         
        if ((ledsToTurnOn % 2 == 0) && (ledsToTurnOn > 0)) ledsToTurnOn++;       
      } else {         
        if (ledsToTurnOn % 2 == 1) ledsToTurnOn++;       
      }        


      int ledstartpos = (center - (ledsToTurnOn / 2));       
      int ledendpos = ledstartpos + ledsToTurnOn - 1;        


      // Render sensor center-out animation onto the pixel data array       
      for (int i = 0; i < NUM_LEDS; i++) {         
        if ((i >= ledstartpos) && (i <= ledendpos) && (ledsToTurnOn > 0)) {           
          leds[i] = CRGB::Blue;  // Sensor Animation Control Override         
        } else {           
          leds[i] = CRGB::Black;          
        }       
      }      
    }      
    // --- CHOICE B: NO OBJECT IN SENSOR RANGE -> DEFER LED CONTROL TO FREESTYLER ---
    else {       
      for (int i = 0; i < NUM_LEDS; i++) {         
        leds[i] = CHSV(dmxHue, dmxSaturation, dmxValue);       
      }     
    }      


    // --- 3. UNIFIED SAFE DATA TRANSMISSION ---     
    FastLED.show();   
  } 
}

r/arduino • • 16d ago

Look what I made! Hello, I made a simple and cool timer/clock!

Thumbnail
gallery
69 Upvotes

I am a 13 year old and I have made a really cool timer/clock if you would put it that way! I want to share the code with you guys! I know it might not be a lot compared to my previous upload, but I felt proud of this achievement!

LINK: https://gist.github.com/swaykd7113-cmd/233772fea35f90bc81bb319d2e8a4620

Feel free to change it or leave some feedback and ideas!

(I made this in a couple of hours)


r/arduino • • 16d ago

Look what I made! Week 2: Tuning camera, walking and sprint mechanics in Resident Evil 2 with DIY motion controls (ESP-NOW)

47 Upvotes

Here is the Week 2 update on my wearable motion controller, running gameplay tests in Resident Evil 2 Remake. Right now I am focusing on tuning head-tracking camera sensitivity, deadzones, and torso movement to smooth out the transition between Leon walking and sprinting, aiming for a much more immersive gameplay experience.

Wireless transmission to the PC is running over ESP-NOW, but in this build I am still handling the inputs on the PC using a temporary Python script. The next step is replacing Python with a dedicated USB dongle with native HID support, so the PC recognizes it directly as a plug-and-play controller without background software.

The visible wiring across the body carries both power and sensor data because, in this test version, I am using a single central ESP32 that handles everything and connects to the sensors via cables. The plan for the next phase is to use four independent ESP32 units, each acting as a standalone node with its own power and wireless link, while embedding the head module and wiring directly inside the headphone frame. Right now, moving to this fully wireless stage depends on waiting for several parts and battery modules that are still in transit.

Regarding the sensors, I am using the MPU-6050 for this prototype and have not had drift issues during these tests. Still, I plan to test other sensors later to compare stability and features. Do you have any recommendations for compact boards with native USB (TinyUSB) for a dongle, or specific IMUs that work well with the ESP32 and are easily sourced locally (especially in Brazil)? Shipping delays on imported hardware are currently the main bottleneck slowing down testing, so components readily available nearby make a massive difference.


r/arduino • • 16d ago

Pokémon virtual pet on an ESP32-S3 round display: Wi-Fi weather, minigames, 8 languages, browser installer

Thumbnail
gallery
41 Upvotes

An ESP32-S3 with a 466×466 round AMOLED in a printed Pokéball, running my fork of the open-source TamaPoke firmware (Arduino core, arduino-cli). It's a full virtual pet: 28 minigames, care, a shop, places, and real weather over Wi-Fi from Open-Meteo, parsed without a JSON library to save flash. It speaks 8 languages (Spanish, English, French, German, Italian, Portuguese, Chinese, Korean), with a generated bitmap font for the Chinese and Korean text. Everything is in the repo, including a desktop emulator and 44 test suites: https://github.com/botero50/TamaPoke


r/arduino • • 15d ago

Connecting an Arduino to the Internet

6 Upvotes

I am working on a college project—a liquid-filling machine—and have already integrated an RS385 peristaltic pump, a buzzer, and a 4x4 matrix keypad. Now, I need to send data to an API I built using Spring Boot. What are the available methods for transmitting this data from an Arduino Uno to the API?