r/arduino • • 15h ago

Look what I made! My ESP32-S3 world radio: one button, a random station from anywhere on Earth, and the album cover in the middle of a visualiser

Enable HLS to view with audio, or disable this notification

368 Upvotes

Built on the Arduino core (Arduino-ESP32 3.3 on PlatformIO) for the Waveshare ESP32-S3-Touch-LCD-1.85, a round 360x360 touch screen with a speaker connector and battery header, so there's no soldering.

Press Drift and it picks a country, weighted by how many stations it has, and lands on one of its most played stations. Leave it alone and the screen turns into a spectrum radiating from the song's cover, with the station and the song running round the rim. There's a web remote on your network for searching 61,000+ stations, favourites, a battery gauge that learns its own curve, and it updates itself from GitHub.

Libraries: ESP32-audioI2S for the MP3/AAC streams and song titles, JPEGDEC and PNGdec for the covers and station logos, U8g2 fonts for the text (including the circular text on the rim), ArduinoJson for the station data. The display is an ST77916 over QSPI, which I ended up driving through esp_lcd directly because Arduino_GFX's QSPI bus garbled it.

The hardest part was memory: TLS on the S3 only uses internal RAM, so with an HTTPS stream playing there's room for about one more handshake. The old stream stops before each drift, and the covers, decoders and task stacks all live in PSRAM.

No toolchain needed to try it: https://airdrift.stream/esp32 flashes it from Chrome or Edge over USB, then you scan a QR code on the screen to give it your WiFi.

Source (MIT): https://github.com/Air-Drift/ESP32-S3

The stations come from Air Drift (https://airdrift.stream), a free radio site I make, with a globe you can spin. It's also on phones, Windows, Fire TV and Alexa: https://airdrift.stream/apps

Happy to answer questions about any of it.


r/arduino • • 16h ago

Is this a code issue or Arduino limitation

Enable HLS to view with audio, or disable this notification

47 Upvotes

Building a display for my car based on open source shift light code by Chippernut https://github.com/chippernut .

It has a tachometer with a 4 digital RPM readout and sequential shift light that flashes once a certain RPM is reached.

Started adding features to customise the code for my application but having trouble with the 4 digit RPM reading freezing (you can see it get stuck on 6xxx in the video) after flashing the shift lights as it turns off each of the 25 LEDs. Any idea if this a processing speed issue or a coding issue?

The 14 segment ht16k33 display I added is using backpack over I2C.

The addressable LED strips are dotstar SK9822 (APA102 clone).

Running on an Arduino nano with a second nano sending out a dummy RPM pulse for bench testing.

I was planning on (probably overkill) moving to a Teensy as I add more to features but wanted to get some advice on this in its current state first.

There is a lot of code but this is the bit where the meat is:

``` if (rpm > 0 ){

//START - CHANGE ADD. ht16k33 14 seg// void showValue(int rpm); { rpm = constrain(rpm, 0, 9999);

char text[5]; // room for 4 characters plus the terminating '\0' snprintf(text, sizeof text, "%4d", rpm);

for (uint8_t i = 0; i < 4; i++) { disp.writeDigitAscii(i, text[i]); }

disp.writeDisplay(); } //END - CHANGE ADD. ht16k33 14 seg//

if(DEBUG){Serial.println(rpm); }




  if (digitalRead(dimPin) != dimmer){
     dimmer = digitalRead(dimPin);
      loadallcolors(); 

      if (digitalRead(dimPin) == dimmerlogic){
      display.setBrightness(dimval);
      disp.setBrightness(ht16k33Dim);//CHANGE ADD. ht16k33 14 seg
     }else{
      display.setBrightness(brightval);
      disp.setBrightness(ht16k33Bright);//CHANGE ADD. ht16k33 14 seg

       }
  }

} else { display.setColon(false);
SEG_WRITE[0] = (SEG_G); // - SEG_WRITE[1] = (SEG_G); // - SEG_WRITE[2] = (SEG_G); // - SEG_WRITE[3] = (SEG_G); // - display.setSegments(SEG_WRITE);

//START - CHANGE ADD. ht16k33 14 seg// disp.clear(); // Clear the display buffer disp.writeDigitRaw(0,0b0000000011000000); // Set '—' on the first digit disp.writeDigitRaw(1,0b0000000011000000); // Set '—' on the second digit disp.writeDigitRaw(2,0b0000000011000000); // Set '—' on the third digit disp.writeDigitRaw(3,0b0000000011000000); // Set '—' on the fourth digit disp.writeDisplay(); // Send buffer to the display //END - CHANGE ADD. ht16k33 14 seg//

}

if (rpm > highRpmMem) {highRpmMem = rpm;} //CHANGE/ADD this saves the highest RPM

if (rpm < shift_rpm){ digitalWrite (shiftSwitchPin, LOW); if (shiftStat==true){ for(int i=0; i<TOTALNUMPIXELS; i++) { //CHANGE/ADD strip.setPixelColor(i, strip.Color(0, 0, 0)); strip.show(); shiftStat = false;//CHANGE/ADD put status change here//CHANGE/ADD }

} for (a = 0; a<NUMPIXELS; a++){ if (rpm>rpmtable[a][0]){ switch (rpmtable[a][1]){ case 1: strip.setPixelColor(a,color1); break;

        case 2:
          strip.setPixelColor(a,color2);  
        break;

        case 3:
           strip.setPixelColor(a,color3);  
        break;        
      }
  } else {
strip.setPixelColor(a, strip.Color(0, 0, 0));    
  } 
}

} else {

unsigned long currentMillis = millis();

  if(currentMillis - previousMillis > shiftinterval) {
      previousMillis = currentMillis;   
      flashbool = !flashbool; 

      if (flashbool == true)
       for(int i=0; i<TOTALNUMPIXELS; i++) { //CHANGE/ADD
          strip.setPixelColor(i, flclr1);
       }
      else
       for(int i=0; i<TOTALNUMPIXELS; i++) { //CHANGE/ADD
           strip.setPixelColor(i, flclr2); 
        }      
    } 
    shiftStat = true ;//CHANGE/ADD put status change here
    if (shiftSwitchOn == true){ 
      if (shiftSwitchEngauge = true) {digitalWrite (shiftSwitchPin, HIGH);Serial.println("Switch is on"); }
    }

} ```

And here is the full (and still quite messy) draft:

Actually I can't post the whole code as it's over the post character limit... Is there another way I can share it here?

Here's the start of the code with the libraries used and the setup: ```

include <Adafruit_DotStar.h>

include <EEPROM.h>

include <EEPROMAnything.h>

include "SSD1306Ascii.h"

include "SSD1306AsciiSoftSpi.h"

include <TM1637Display.h>//CHANGE/ADD. V2 display returns

//ht16k33 14 seg//

include <Wire.h>//CHANGE/ADD. for ht16k33

include <Adafruit_GFX.h>//CHANGE/ADD. for ht16k33

include "Adafruit_LEDBackpackEDIT.h"//CHANGE/ADD. for ht16k33

define DISPLAY_ADDRESS 0x70//CHANGE/ADD. for ht16k33

Adafruit_AlphaNum4 disp = Adafruit_AlphaNum4();//CHANGE/ADD. for ht16k33

int string_pointer = 0;//CHANGE/ADD. for ht16k33 char display_buffer[4];//CHANGE/ADD. for ht16k33 long last_display_refresh = 0L;//CHANGE/ADD. for ht16k33 int ht16k33Bright;//CHANGE/ADD. for ht16k33 int ht16k33Dim;//CHANGE/ADD. for ht16k33

void(* resetFunc) (void) = 0; int DEBUG; int NUMPIXELS = 20; int EXTRANUMPIXELS;//CHANGHE/ADD int TOTALNUMPIXELS;//CHANGE/ADD bool shiftStat = false;

define DATAPIN 4 //DIFFERENT TO SCHEMATIC!!!CHANGE/ADD

define CLOCKPIN 5 //DIFFERENT TO SCHEMATIC!!!CHANGE/ADD

Adafruit_DotStar strip = Adafruit_DotStar(EEPROM.read(11)+ EEPROM.read(32), DATAPIN, CLOCKPIN, DOTSTAR_BGR);

const int rpmPin = 2; //CHANGE/ADD. There is no mention of pin 8 which is in the schematic? Looks like old senseoption which used <FreqMeasure.h> //CHANGE/ADD V2 had ledPin = 13 here const int dimPin = A2; const int sensorInterrupt = 0; const int timeoutValue = 10; volatile unsigned long lastPulseTime; volatile unsigned long interval = 0; volatile int timeoutCounter; long rpm;
long rpm_last;
int display_rpm;//CHANGE/ADDthis is new for V3 int activation_rpm; int shift_rpm; int highRpmMem = 0;//CHANGE/ADD int menu_enter = 0; int current_seg_number = 1; int seg_mover = 0; long previousMillis = 0; int shiftinterval = 50; boolean flashbool = true;
int prev_animation; int prev_color; boolean testbright = false; int prev_variable; int prev_menu; boolean testdim = false; int justfixed; //CHANGE/ADD this is new for V3

//array for rpm averaging, filtering comparison const int numReadings = 5; int rpmarray[numReadings]; int index = 0; // the index of the current reading long total = 0; // the running total long average = 0; // the average

//These are stored memory variables for adjusting the (5) colors, activation rpm, shift rpm, brightness //Stored in EEPROM Memory int c1; int c2; int c3; int c4; int c5; int brightval; //7-seg brightness int dimval; //7-seg dim brightness int sb; //strip brightness int dimsb; // strip dim brightness boolean dimmer = false; boolean dimmerlogic = false; int pixelanim=1;
int smoothing; int rpmscaler; int shift_rpm1; // USED TO BE A LONG!! int shift_rpm2; int shift_rpm3; int shift_rpm4; int seg1_start = 1; int seg1_end = 1; int seg2_end = 2; int seg3_end = 3; int activation_rpm1; int activation_rpm2; int activation_rpm3; int activation_rpm4; int a; //CHANGE/ADD this is new for V3

//new code bellow// //int buzzerPin 7;//CHANGE/ADD int shiftSwitchPin = 10;//CHANGE/ADD //int otherSwitchPin 9;//CHANGE/ADD bool shiftSwitchEngauge = false;//CHANGE/ADD int shiftSwitchOn;//Store in EEPROM. CHANGE ADD //bool otherSwitchSet = false;//CHANGE/ADD

int rst = 0; int cal; int prev_cal;

// COLOR VARIABLES - for use w/ the strips and translated into 255 RGB colors long color1; long color2; long color3; long flclr1; long flclr2;//CHANGE/ADD. From V2

//Creates a 32 wide table for our pixel animations int rpmtable[32][2];

// ROTARY ENCODER VARIABLES int button_pin = A0; //CHANGE/ADD int menuvar; int val; int rotaryval = 0;

// CONFIGURATION FOR 7-SEG DISPLAY//CHANGE/ADD

define CLK 12

define DIO 11

TM1637Display display(CLK, DIO); uint8_t SEG_WRITE[] = { // [=] EXIT SEG_A | SEG_F| SEG_E | SEG_D,
SEG_A | SEG_D,
SEG_A | SEG_D,
SEG_A | SEG_D | SEG_B | SEG_C
};

// A // --- // F | | B // -G- // E | | C // --- // D

// CONFIGURATION FOR OLED DISPLAY //SSD1306AsciiSoftSpi oled;//CHANGE/ADD. Delete this for TM1637 support //#define OLED_DC 7 //#define OLED_CS 6 //#define OLED_CLK 10 //#define OLED_DATA 9

// CONFIGURATION FOR THE ROTARY ENCODER // Arduino pins the encoder is attached to. Attach the center to ground. #define ROTARY_PIN1 A1//CHANGE/ADD #define ROTARY_PIN2 A3//CHANGE//ADD

// Use the full-step state table (emits a code at 00 only) //CHANGE/ADD. What is this? const char ttable[7][4] = { {0x0, 0x2, 0x4, 0x0}, {0x3, 0x0, 0x1, 0x40}, {0x3, 0x2, 0x0, 0x0}, {0x3, 0x2, 0x1, 0x0}, {0x6, 0x0, 0x4, 0x0}, {0x6, 0x5, 0x0, 0x80}, {0x6, 0x5, 0x4, 0x0}, };

volatile unsigned char state = 0;

char rotary_process() { char pinstate = (digitalRead(ROTARY_PIN2) << 1) | digitalRead(ROTARY_PIN1); state = ttable[state & 0xf][pinstate]; return (state & 0xc0); }

                          /*************
                           * SETUP *
                          *************/

//SETUP TO CONFIGURE THE ARDUINO AND GET IT READY FOR FIRST RUN void setup() {

//get stored variables getEEPROM(); check_first_run();

if(DEBUG){
  Serial.begin(57600);
  Serial.println("ChipperNut ShiftLight Project. V2 or V3");
  Serial.println("Prepare for awesome......");
}


for (int thisReading = 0; thisReading < numReadings; thisReading++){
  rpmarray[thisReading] = 0;  
}

timeoutCounter = timeoutValue; buildarrays();

strip.begin(); strip.clear(); //CHANGE/ADD. Added in V3 strip.show(); // Initialize all pixels to 'off'

//ROTARY ENCODER pinMode(rpmPin, INPUT); pinMode(dimPin, INPUT_PULLUP); pinMode(button_pin, INPUT_PULLUP); pinMode(ROTARY_PIN1, INPUT_PULLUP); pinMode(ROTARY_PIN2, INPUT_PULLUP); //pinMode(buzzerPin, OUTPUT);//CHANGE/ADD pinMode(shiftSwitchPin, OUTPUT);//CHANGE//ADD //pinMode(otherSwitchPin, OUTPUT);//CHANGE//ADD

attachInterrupt(0, sensorIsr, RISING);

loadallcolors();

//oled.begin(&Adafruit128x64, OLED_CS, OLED_DC, OLED_CLK, OLED_DATA);//CHANGE/ADD. Delete this for TM1637 support //oled.clear(); //oled.setFont(chippernut); //oled.print("c"); //bootanimation(); //delay(1000); //oled.clear();

//ht16k33 14 seg// disp.begin(DISPLAY_ADDRESS);//CHANGE/ADD. for ht16k33 disp.clear();//CHANGE/ADD. for ht16k33 disp.writeDisplay();//CHANGE/ADD. for ht16k33

if(DEBUG){Serial.println("LOADED.");}

if (digitalRead(dimPin) == dimmerlogic){ display.setBrightness(dimval); disp.setBrightness(ht16k33Dim);//CHANGE/ADD. for ht16k33 } else{ display.setBrightness(brightval); disp.setBrightness(ht16k33Bright);//CHANGE/ADD. for ht16k33
}

//Sets the total number of usable leds TOTALNUMPIXELS = NUMPIXELS+EXTRANUMPIXELS;//CHANGE/ADD

//CHANGE/ADD. Shift lights not working? disp.clear(); // Clear the display buffer disp.writeDigitAscii(0, 'H'); // Set 'H' on the first digit disp.writeDigitAscii(1, 'E'); // Set 'E' on the second digit disp.writeDigitAscii(2, 'L'); // Set 'L' on the third digit disp.writeDigitAscii(3, 'P'); // Set 'P' on the fourth digit disp.writeDisplay(); // Send buffer to the display

display.setColon(false); //SEG_WRITE[0] = (SEG_G); //- //SEG_WRITE[1] = (SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_G); //g //SEG_WRITE[2] = (SEG_A | SEG_D | SEG_E | SEG_F | SEG_G); //E //SEG_WRITE[3] = (SEG_D | SEG_E | SEG_F | SEG_G); //t //display.setSegments(SEG_WRITE); //delay(600); //display.setColon(false);
//SEG_WRITE[0] = (SEG_G); //- //SEG_WRITE[1] = (SEG_A | SEG_C | SEG_D | SEG_F | SEG_G); //S //SEG_WRITE[2] = (SEG_A | SEG_D | SEG_E | SEG_F | SEG_G); //E //SEG_WRITE[3] = (SEG_D | SEG_E | SEG_F | SEG_G); //t //display.setSegments(SEG_WRITE); //delay(600); //display.setColon(false);
SEG_WRITE[0] = (SEG_G); //- SEG_WRITE[1] = (SEG_G); //- SEG_WRITE[2] = (SEG_G); //- SEG_WRITE[3] = (SEG_G); //- display.setSegments(SEG_WRITE); delay(400); display.setColon(false);
SEG_WRITE[0] = (SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F); //O SEG_WRITE[1] = (SEG_G); //- SEG_WRITE[2] = (SEG_G); //- SEG_WRITE[3] = (SEG_G); //- display.setSegments(SEG_WRITE); delay(200); display.setColon(false);
SEG_WRITE[0] = (SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_G); //g SEG_WRITE[1] = (SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F); //O SEG_WRITE[2] = (SEG_G); //- SEG_WRITE[3] = (SEG_G); //- display.setSegments(SEG_WRITE); delay(200); display.setColon(false);
SEG_WRITE[0] = (SEG_G); //- SEG_WRITE[1] = (SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_G); //g SEG_WRITE[2] = (SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F); //O SEG_WRITE[3] = (SEG_G); //- display.setSegments(SEG_WRITE); delay(200); display.setColon(false);
SEG_WRITE[0] = (SEG_G); //- SEG_WRITE[1] = (SEG_G); //- SEG_WRITE[2] = (SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_G); //g SEG_WRITE[3] = (SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F); //O display.setSegments(SEG_WRITE); delay(200); display.setColon(false);
SEG_WRITE[0] = (SEG_G); //- SEG_WRITE[1] = (SEG_G); //- SEG_WRITE[2] = (SEG_G); //- SEG_WRITE[3] = (SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_G); //g display.setSegments(SEG_WRITE); delay(200); display.setColon(false);
SEG_WRITE[0] = (SEG_G); //- SEG_WRITE[1] = (SEG_G); //- SEG_WRITE[2] = (SEG_G); //- SEG_WRITE[3] = (SEG_G); //- display.setSegments(SEG_WRITE); delay(200);

} ```


r/arduino • • 5h ago

Microcontroller advice: looking for a chip with more RAM

4 Upvotes

Hello, I am looking for advice on which chip to use. I am currently using ATmega328P DIP chips, but I frequently run out of RAM, and I would also like to try other chips.

I am going to buy an ESP32 to test it anyway, but what I am really looking for is just the raw chip itself. The issue is that for ESP32s, I get the feeling they are only sold as modules or on boards, and not as simple bare chips (and even less so in DIP format).

Has anyone faced this issue before? Or do you have any advice on finding a chip with more RAM that can still be easily used as a standalone component?


r/arduino • • 1d ago

Hi everyone! I wanted to share my Arduino project: an animatronic built around an Arduino Nano files on did3d.fr.

Enable HLS to view with audio, or disable this notification

275 Upvotes

r/arduino • • 7h ago

Look what I made! The Lighter

6 Upvotes

This is the "Lighter," a small device that connects to a personal server, which in turn communicates with the Tuya API. This allows me to use it as a sort of remote control for my smart light—I find it rather inconvenient to have to keep pulling out my phone just to operate it. This is the first project for which I’ve built a custom case and actually put into real-world use. While there are certainly plenty of flaws in the design, electronics, and programming, I’m really happy with the result. (The menu text is in Portuguese because I’m Brazilian.)

Lighter in Work


r/arduino • • 19h ago

Beginner's Project need advice as a beginner

Thumbnail
gallery
33 Upvotes

recently got into electronics a couple days ago and made a bunch of LEDs light up in order from one to 15 in binary as a first time project.

everything past this stage looks utterly impossible, any advice on where to go or what to work on next?


r/arduino • • 3h ago

Beginner needs a project

2 Upvotes

Hi all, I've wanted to do a project with an arduino or raspberry pi for a long time but have not yet found or figured out a cool little project. I'm looking for an idea or a project where i can learn how to program and build something that is fun and somewhat easy. I have SOME experience in python and HTML but thats about it.

If you have some suggestions or repo's to check that would be helpful!


r/arduino • • 2h ago

Atlas Scientific EZO-EC receives UART data but won't respond to commands (Arduino UNO R4 WiFi)

1 Upvotes

Hi everyone,

I'm currently developing an IoT-based photobioreactor using an Arduino UNO R4 WiFi. One of the sensors I'm integrating is the Atlas Scientific EZO-EC conductivity sensor, mounted on an Atlas Scientific Electrically Isolated EZO Carrier Board (Version 6).

I'm experiencing an issue where the Arduino can receive data from the EZO-EC circuit, but the sensor doesn't seem to respond to any commands sent from the Arduino.

Hardware setup

  • Microcontroller: Arduino UNO R4 WiFi
  • Sensor: Atlas Scientific EZO-EC
  • Carrier board: Atlas Scientific Electrically Isolated EZO Carrier Board (V6)
  • Communication protocol: UART (9600 baud)

Wiring:

Carrier Board Arduino UNO R4 WiFi
RX/SCL D1 (TX)
TX/SDA D0 (RX)
VCC 5V
GND GND
OFF Not connected

The issue

The Arduino successfully receives continuous data from the EZO-EC circuit.

For example:

0,0.00,1.000
0,0.00,1.000
0,0.00,1.000

However, when I try sending commands to the EZO-EC, the circuit does not appear to respond.

I've tested the following commands:

  • i — Device information
  • K,? — Probe K-value
  • Cal,? — Calibration status
  • C,0 — Disable continuous readings
  • L,0 — Turn off the LED

None produced the expected response.

Even after sending C,0, the sensor continues transmitting data. Similarly, the LED continues blinking green/cyan after sending L,0.

Troubleshooting performed

  1. Confirmed that the Arduino and EZO-EC are communicating at 9600 baud.
  2. Tested Arduino Serial1 using a loopback connection between D0 (RX) and D1 (TX). The test was successful.
  3. Confirmed that data from the EZO-EC can be received consistently.
  4. Verified the UART wiring between the Arduino and the isolated carrier board.
  5. Tested multiple commands using the required carriage return (\r) termination.
  6. Tested the EC sensor separately from the other sensors, pumps, relay modules, and IoT functions.

Despite these checks, the issue persists.

Questions

  1. Has anyone encountered one-way UART communication with an Atlas Scientific EZO circuit?
  2. Could there be an issue with the RX communication path on the electrically isolated carrier board?
  3. Is there anything specific about the Arduino UNO R4 WiFi's hardware UART that I should check?
  4. Could this be caused by the EZO-EC configuration, or does it suggest a possible hardware issue?
  5. What would be the best way to diagnose the problem further?

I haven't tested the electrical signals using a multimeter or oscilloscope yet.

My main concern is that although I can receive sensor readings, I cannot access the calibration functions, which are essential for validating the sensor before using it in my research experiments.

I'd really appreciate any suggestions or troubleshooting advice.

Thanks in advance!


r/arduino • • 17h ago

Hardware Help Newbie confused about hooking up this spi screen to Nano. This is the best pin out diagram I could find

Thumbnail
gallery
13 Upvotes

So I am completely new to this, all I have done so far is hook up addressable LED strips. I got this cheap little screen to practice on, and I can't find any good tutorials for the nano. This diagram looks very helpful, but I can't figure out what to do with the BL pin. Does NC mean not connected? If so will the back light still light up? I'm using an adjustable power supply, I plan on using 5 volts. What I gather here is we use resistors and hook it up to the 3.3 volt. Is that correct? Thanks in advance for any help. 😁


r/arduino • • 1d ago

Look what I made! Little robot on wheels

Enable HLS to view with audio, or disable this notification

47 Upvotes

I didn't make any larger movements, otherwise everything would have come off.


r/arduino • • 16h ago

Look what I made! Arduino R4 WiFi — 4WD SLAM Radar 2D Robot

Enable HLS to view with audio, or disable this notification

5 Upvotes

An autonomous 4-wheel drive explorer robot based on Arduino UNO R4 WiFi, designed to navigate through paths and mazes while detecting surrounding obstacles. The robot performs 180° radar scans via an ultrasonic sensor mounted on a servo motor and transmits real-time telemetry via Wi-Fi to an interactive Web dashboard, which reconstructs the 2D vector map of the surrounding walls.


r/arduino • • 18h ago

Look what I made! Cosplay prop...

Enable HLS to view with audio, or disable this notification

9 Upvotes

We got invited to a costume required Halloween party and we just can't do simple or cute, we're going all out and we made some steampunk cosplay that we will continue to refine and wear to Ren Faire type events.

I initially had a schematic to do an 8 LED array with a bunch of components to randomly fade the LEDs in and out. While I was working on another project I was picking around in Tinkercad with circuits and found the pixel ring LEDs and they showed sample circuits and code. Just for grins I had chat gpt modify the code for green only and random. It came back with great code that used an analog input to create a random pattern.

After seeing this and how inexpensive and seemingly easy it was to code for I ordered some Arduinos!

All of this to say that it's not that hard and if you're on the fence, jump in!


r/arduino • • 12h ago

Beginner's Project Something similar to the AdaFruit macropad but battery powered?

2 Upvotes

I'm working on a music toy project with the following requirements:

- Built in speaker/buzzer (doesn't have to be good, just beeps and boops is enough)

- Portable (battery powered, and can fit in pocket, no extra cables required to use)

- At least 4 buttons in a grid (but preferably not more than 12 buttons or so, then it gets too big)

- Programmable so I can assign sound to the buttons etc.

I got excited when I came across the Adafruit Macropad RP2040 because it looks absolutely perfect, but unfortunately it can't be powered on its own.

I'll eventually try to build it totally from scratch, but as I'm a beginner (i just have some soldering experience from working on drones) I'd rather buy a kit or something pre-made that I can just repurpose or hack

Are there any products or kits out there that might be a good starting point?

Thanks!


r/arduino • • 1d ago

ChatGPT My first animatronic // Arduino UNO

Enable HLS to view with audio, or disable this notification

306 Upvotes

It can talk with the AI model Chat gpt oss 20b (via openrouter)

The eyes mechanism is 1 object, you dont have to attach multiple pieces or even add metal or strings.


r/arduino • • 12h ago

Hardware Help Can I solder jumper wires directly to pre-soldered header pins on an ESP32?

1 Upvotes

Sorry if this is the wrong sub, but i figured people would have expertise.

I bought an ESP32 with pre-soldered header pins, planning to connect everything using female jumper wires. Unfortunately, the space between the header pins and the battery below is pretty tight. I can technically fit the female connectors and get everything in place, but the wires have to bend pretty severely, and I'm worried they'll eventually break or lose connection. I cant use longer standoffs because its sized to a hole in the box for a usb-c.

I'm considering a couple options:

I could remove the header pins entirely by cutting off the plastic housing and desoldering each pin individually, then soldering wires directly to the board. However, I'm concerned about putting too much heat on the board and damaging it.

I could also solder wires directly onto the top of the existing header pins. This seems like the easiest solution, but the pins are pretty close together, so I'm worried about accidentally bridging two pins together.

Maybe just removing the pins that i need to use is best. im only connecting to GND, 3V, EN and a data pin.

Has anyone dealt with anything similar or has a recommendation?

Appreciate any advice!


r/arduino • • 21h ago

Need help picking a component

3 Upvotes

Hey All,

I am working on a project. I have a pulley that moves a string with a cart across a gap (backwards and forwards). I want to know when that cart enters and exits that gap. What sensor would I use to detect when something passes it? This is a road crossing model I am building. And I want to be able to track dynamically when the cart enters and exits the road space. The road will be roughly 6in wide to give you an idea of dimensions. I am just starting into the world of Arduinos and so I apologize if this is a real dumb question. But when I search online, I get a bunch of random "kits" with all sorts of sensors. I cannot think of a better way to describe what I am looking for to Google. Cheers!


r/arduino • • 1d ago

Look what I made! This Arduino desktop display showcases the vastness of space by scrolling across large astronomical mosaics. It takes 10 days of continuous scrolling to view the largest, the 5-gigapixel Cosmic Treasure Chest.

Thumbnail
gallery
129 Upvotes

Full project build tutorial on Hackster here. Github code here.

The idea behind this project was to use my PyPortal to make an ambient, eye-catching desktop ornament that showcases astronomical images. Its something that can sit on my desk and be fun to glance at throughout the day.

By scrolling across these large images at a slow pace, its gives a sense of how much of the cosmos these images are capturing. It can take days to scroll across a single image.

There is a preprocessing Python script which runs on the user's computer to download one of five mosaics, and parse them into a long strip that can be scrolled across. This formatted image strip is stored on an SD card and slotted into the PyPortal.

The PyPortal runs an Arduino script, which reads the image contents and scrolls it across the screen. Memory limitations are wokred around by reading only the new image columns entering frame, and scrolling is kept smooth by using the display's hardware scrolling feature.

Touch controls allow the user to set the brightness, and change the scroll speed.


r/arduino • • 1d ago

Getting Started How do you learn to code for different components?

14 Upvotes

I’ve been learning Arduino through tutorials and small projects with my starter kit, so I understand the basics of coding and the Arduino IDE. I also have a little experience with other programming languages, like Python, but I’m still a beginner overall.

Now that I’m trying to build projects with different sensors, displays, and other components, I’m struggling to learn the specific syntax, libraries, and code needed to get them working individually and together.
I’m a visual learner, so I learn best from tutorials where someone walks through the code and explains the concepts behind it. However, it’s hard to find tutorials for the specific components I want to use, and I struggle to get much out of documentation alone.

I’ve tried using AI like ChatGPT and Claude, but I often end up with code examples without really understanding how to write the code myself.

I’m looking for resources or learning methods that actually teach me how to program components, rather than just giving me working code. How do you guys learn to use new components, understand their libraries, and eventually write your own code without relying on tutorials for every project? I’d especially appreciate advice from people who started as beginners and learned through hands-on projects.


r/arduino • • 1d ago

Look what I made! My ESP32/DHT11 room monitor records temperature while the PC is off, then syncs to a local dashboard

2 Upvotes

I put together a room temperature and humidity monitor to see how the room changes after the heating comes on. The hardware is a classic ESP32 Dev Module and a three-pin DHT11 sensor: 3V3 to +, GND to -, and GPIO18 to signal. The firmware is an Arduino sketch using Adafruit DHT / Unified Sensor and ESP32 core WiFi, WebServer and LittleFS support. I used AI coding assistance during development.

Readings are taken every 2.5 seconds, with a persistent flash sample every 30 seconds. The board can keep recording while powered from a USB wall supply, even with the computer off. Its circular buffer holds approximately seven days; once the local Node.js server starts, it imports missing readings over Wi-Fi into a daily JSON archive.

The browser interface includes live readings, date/time navigation, 1/6/24-hour graphs, CSV export, English/Italian options and outdoor weather from Open-Meteo. The main work was handling restarts, clock synchronization and duplicate imports so that the history stays usable.

The DHT11 has limited accuracy, so I treat it as a hobby monitor rather than a calibrated instrument. No readings are collected when the ESP32 loses power.

Repository with firmware, wiring, setup and screenshots: https://github.com/lsvt-commits/esp32-room-climate-monitor

Sharing the build here in case it is useful to someone working on a similar Arduino/ESP32 logger.


r/arduino • • 1d ago

Looking for uninterrupted DC power

5 Upvotes

I would like uninterrupted power. I was looking at this at Adafruit.com

USB Battery Pack for Raspberry Pi - 10000mAh - 2 x 5V outputs : Adafruit Industries, Unique & fun DIY electronics and kits

The charging circuit will draw 1A from a 5V supply (plug a microUSB connector into the pack and then to a computer or wall adapter). You can charge and power something at the same time but the output switches to the USB input when charging so the output voltage may fluctuate. Its not good as a 'UPS' power supply for an embedded linux board, although microcontrollers like Arduino may not care about the voltage drop as much. Also, there's ~80% efficiency loss on both ends so if you charge it at 1A and draw 1A at the same time, the battery pack will eventually go empty. However, if you're powering something thats 500mA or less, you can keep it topped up no problem. Also, when you start and stop charging the pack, it will flicker the output, this can cause a 'power sensitive' device like the Pi or an iPhone to reset on the power supply.

A battery pack is intended to be a charging device so I can understand that output can fluctuate. Fluctuation does no harm when used as a charger. Adafruit seems to say twice in that paragraph that it is not uninterrupted. "Arduino may not care" but if I'm dreaming, I can hope for something truly uninterrupted.

What do you use for uninterrupted power? I do not want something that gives me uninterrupted 120 VAC output. I just want DC uninterrupted. The Adafruit battery pack has 10,000 mAh. Something in that capacity ballpark I suspect is a reasonable thing for me to be seeking.

Context ... I want to run an Adafruit Feather 32u4 with a Micro USB port.


r/arduino • • 1d ago

Software Help All about separate .cpp and .h in Arduino app...

4 Upvotes

This is embarrassing, but I've been building and coding Arduino apps for a long time. But I put everything (methods, I mean) all in the .ino file. I'd like to learn how to build separate .cpp and .h files for different functions, i.e., wifi and MQTT setups.

So if I create a separate mqtt_setup.cpp, do I put its library dependencies (#include's) in that file or in the .ino? And what goes into the .ino to reference the methods in the MQTT file? I imagine there'll be a Matt_setup.h file included as well? Do I declare the forward references (proper term?) to methods within the mqtt_setup.cpp in there?

Sorry if this is basic C/C++ stuff, but I haven't done it this way, ever.

Backstory: I used LCD Wizard to design the UI for a revamped dashboard app. All the associated .cpp files are separate along with their respective header files. I want to keep this arrangement for user-defined .cpp's that I develop. I don't want to bloat the .ino.

Am I making any sense?


r/arduino • • 1d ago

Simple ESP32CE-DEV IR remote HELP!

1 Upvotes

I have an old LG CRT TV i want to create a custom remote for, simply to turn the TV on/off and switch to AV using a single button.

I purchased a ESP32C3-DEV board, with some cheap IR Modules wired up like this:

ESP32 (GPIO 7) -> IR TRANSMITTER (DAT)

ESP32 (5V) -> IR TRANSMITTER (VCC)

ESP32 (GND) -> IR TRANSMITTER (GND)

In combination with this sketch:

#include <IRremote.hpp>

const int IR_SEND_PIN = 8;

void setup() {
  Serial.begin(115200);
  IrSender.begin(IR_SEND_PIN);

  Serial.println("LG TV IR test starting...");
  delay(2000);

  // LG power toggle
  Serial.println("Sending LG power command...");
  IrSender.sendLG(0x04, 0x08, 0);

  delay(2000);

  // LG TV/AV input selection
  Serial.println("Sending LG TV/AV command...");
  IrSender.sendLG(0x04, 0x0B, 0);

  Serial.println("Test complete.");
}

void loop() {
}

Which didnt work.

I then used a IR receiver to capture the power signal of my sony sound systems remote, to try emulate something i know works:

#include <IRremote.hpp>


const uint8_t IR_SEND_PIN = 7;
unsigned long lastSend = 0;


void setup() {
  Serial.begin(115200);
  IrSender.begin(IR_SEND_PIN);
  delay(1000);
  Serial.println("Sony IR test started");
}


void loop() {
  if (lastSend == 0 || millis() - lastSend >= 5000) {
    lastSend = millis();


    Serial.println("Sending Sony command: Address 0x30, Command 0x15");
    IrSender.sendSony(0x30, 0x15, 2);
  }
}

But that didnt work either.

I have tested the IR LED in my camera to see if i can see any active signal, but cant see anything!
Compared to my Sony remote which is very visible.

I am now seeking help as i am unsure if i have wired something wrong, a component may be broken or there is something in the sketch i am missing.
Any direction would be appreciated


r/arduino • • 1d ago

Getting Started How do you plan for your projects?

3 Upvotes

When you have an idea for solving some problem or doing recreational stuff with the board, how do you go about planning for it?

I'm making a RGB LED that can be controlled with a button interface and a potentiometer. Practically useless, but I wanted to make something with my knowledge of 1/3 of Paul mcWhorter's new arduino series and I'm having fun manifesting thought into reality. My issue is that I went in headbutting it with minimal thought or planning for the project, I know what components I needed and I had thought of a rough idea of how it supposed be.


r/arduino • • 1d ago

Hardware Help Struggling to move a project to perfboard

3 Upvotes

Hey! I've posted to this sub a few times now regarding some beginner projects I've made, but this is my first time asking for help! I've just finished making a pomoduro timer on my UNO R3 Devboard, but I want to move this to an actual perfboard project. I plan to move it to a NANO (I've got an atmega328p nano at hand). I also have perfboard but I bought the wrong size (too small but I plan on soldering the NANO's headers to two sections of this perfboard to solve this. I'm just looking for suggestions on ways to implement this project onto perfboard.

My main questions are:

Can I just copy my breadboard layout onto the perfboard?

I know they don't link so how could I power each component?

Adding onto above, how do I make a ground rail?

I've seen sources online saying I can solder multiple holes together to make a rail, but some say to also use solid core wire between each of these to link them, will just solder do?

Thanks in advance, and happy monday!


r/arduino • • 2d ago

Mod's Choice! My daughter (14) made an automatic Panipuri filler, what do you think?

Enable HLS to view with audio, or disable this notification

532 Upvotes

My daughter (14) made an automatic Panipuri filler, what do you think?

It uses

  1. An arduino nano board. It was a simple read the sensor and switch the relay project. It uses an IR distance sensor to read if a panipuri is placed below it, a 5 volt relay module, a submersible pump and a power supply. If a panipuri is placed below the sensor, nano turns the relay on which makes the submersible pump push water to fill the panipuri.
  2. This project is a simple code which reads sensor value using gpio pin and writes gpio to switch the relay.
  3. I had tough time calibrating the IR sensor to detect the right distance. It kept behaving unpredictably initially. after a lot of trial and error, it worked and we were able to use the machine for like 3 hours in the stall my daughter put up

Here is the detailed video explaining working, hardware and software etc

https://youtu.be/47xYUN5-_l4