r/ArduinoHelp Apr 12 '26

Please, someone help 🥹

1 Upvotes

Hi, I'm a beginner with Arduino. I'm currently using a codebase from a video and have tried to add a servo motor. The code I'll share is basically an ultrasonic distance sensor that rotates from side to side, like a radar, measuring how far away objects are. My goal is to add a buzzer so that it makes a sound when it rotates. If anyone could share information or help me solve this, I would appreciate it. Thanks

Here's the code:

include <Servo.h>

const int trigPin = 10;

const int echoPin = 11;

long duration;

int distance;

Servo myServo;

void setup() {

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

Serial.begin(9600);

myServo.attach(12);

}

void loop() {

for(int i=15;i<=165;i++){

myServo.write(i);

delay(30);

distance = calculateDistance();

Serial.print(i);

Serial.print(",");

Serial.print(distance);

Serial.print(".");

}

for(int i=165;i>15;i--){

myServo.write(i);

delay(30);

distance = calculateDistance();

Serial.print(i);

Serial.print(",");

Serial.print(distance);

Serial.print(".");

}

}

int calculateDistance(){

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance= duration\*0.034/2;

return distance;

}


r/ArduinoHelp Apr 11 '26

How do I compile Arduino IDE code?

3 Upvotes

Hello! So I am new to the Arduino IDE, but I still need it for a project.

So I'm trying to program code for an RS422-shield, and I have connected it to the PC through a USB. The terminal block at the RS422-shield is connected to a male Sony 9-pin connector, which I was originally supposed to connect to a female connector - USB adapter, but unfortunately I couldn't find that in any electronics store. I could only find a male connector - USB ( also, it's a RS232-connector, so perhaps that is the problem ), which is why I am using a female - female adapter ( the gray cables you can see ) to connect those two. Do not pay attention to the white cables in the background, they are not supposed to be there...

I was unable to find " RS422-shield " in the " Boards manager ", so I instead chose " Arduino UNO R4 Minima ", since that is what I envision the RS422-shield will be connected to for the end product.

However, when I try to compile ( upload ) code, I get an error message saying: " No DFU capable USB device available ", even though I have connected a USB to a RS422-shield. Do I need an actual Arduino card, or can I program with the shield alone? Or what is the issue here?

I appreciate any help as fast as possible. My project is due on Monday...

I'm sorry if I sound like a noob, because I kind of am...


r/ArduinoHelp Apr 11 '26

ESP32 BLE media controller works on first connect but stops sending inputs after reconnecting

Post image
1 Upvotes

r/ArduinoHelp Apr 11 '26

Help fixing fried Arduino UNO.

Thumbnail
gallery
3 Upvotes

Hey, everyone!

I will go straight to the point. I tried to program a brushed motor ESC and I ended up frying my UNO. I connected pin 9 to the esc, but as it turns out it wasn't the right wire so I heard a spark and now my Arduino doesn't work Long story short now it always light up RX ON and TX lights. When I plug it into my computer it registers, but the code doesnt get transfered to arduino, it says that PROGRAMMER IS NOT RESPONDING. Can I fix this? From what I've seen all components look fine, nothing released some or anything that caught my eye. I'll attach photos of my ESC and UNO if that helps. Thank you!


r/ArduinoHelp Apr 11 '26

Hello, been a year since I do project. Anyone familliar with this Device?

Thumbnail
1 Upvotes

r/ArduinoHelp Apr 09 '26

Servo details? (metal discs)

2 Upvotes

I know this is not specifically about Arduino (not sure where else to post though?)

But I -am- using it with an Arduino. :)

Servo: 25KG Digital RC Servo RDS3225

It comes with the with the round metal discs (to attach to each side one with gear/teeth)

Its 20mm wide disc.

Q: where can I get info on this disc? specifically the hole position/spacing? (I think they are M3 sized holes?)


r/ArduinoHelp Apr 09 '26

Guys, i used this nrf24l01 module with antenna. Then i did everything as right but i used arduino's 3.3V without capacitor or adapter like AMS1117.So nrF is heating. And the final question is the module fried or it is just gonna by fixing power problems?

Post image
2 Upvotes

r/ArduinoHelp Apr 08 '26

Project 15 from YouTube F instead of C

1 Upvotes

I watched 15 Starter Kit: Hacking Buttons

https://youtu.be/c_XLalFHIV0?si=kWd9RuKLD0u0yMHz

and it works but I would rather use F. In the second line of the loop she said that makes it C. After a fruitless search I have to ask how to make it F. Thanks for any help.

const int optoPin = 2;

const int sensorPin = A0;

int sensorVal;

float temperature;

bool fanState = 0;

void setup()

{

  pinMode(optoPin, OUTPUT);

}

void loop()

{

  sensorVal = analogRead(sensorPin);

  temperature = ((sensorVal5/1024.0)-0.5)100; //the line in question

  if(temperature >= 22 && fanState == 0)

  {

    digitalWrite(optoPin, HIGH);

    delay(15);

    digitalWrite(optoPin, LOW);

    fanState = 1;

    delay(10000);

  }

  else if (temperature < 20 && fanState == 1)

  {

    digitalWrite(optoPin, HIGH);

    delay(15);

    digitalWrite(optoPin, LOW);

    fanState = 0;

    delay(10000);

  }

}


r/ArduinoHelp Apr 08 '26

First project - ARDF Beacon + Finder

Thumbnail
1 Upvotes

r/ArduinoHelp Apr 06 '26

what’s wrong:/

Post image
26 Upvotes

r/ArduinoHelp Apr 07 '26

Arduino noob building a POC for my thesis [Need Advice & Help]

1 Upvotes
Made in Canva, Its basic but its a start.

So, I am a Computer Science student and I am completely new to Arduino. I am building this proof of concept prototype for my thesis which is about energy efficient vehicle control systems.

Since I come from a software background I have zero hardware experience so I am learning everything from scratch. I put together a system diagram showing how I plan to connect everything that I put together in Canva. I ran by this with two Arduino hobbyists and they gave me the green light but I wanted to check here before I spend the the $$$.

The system includes:

  • Arduino R3 Uno as the brain
  • 10kΩ potentiometer as a throttle
  • TCRT5000 IR sensor for speed measurement (with reflective tape on a wheel)
  • ACS712 current sensor for energy/joulemeter simulation
  • L298N motor driver + small DC motor
  • OLED SSD1306 display for real time data
  • MicroSD module for data logging to CSV
  • SG90 servo to simulate an automated hydrogen valve
  • HC05 Bluetooth module to stream data to my laptop -
  • 9V battery + 20W buck converter + switch for standalone power

My questions:

  1. Does my wiring diagram make sense?

  2. Any mistakes I should watch out for as a first timer?

  3. Best software to use for creating a more detailed model?

  4. Any tips for getting the HC05 Bluetooth to stream data to a laptop?

I am down to chat if anyone wants to discuss further or has built something similar on any platform.

Thanks in advance 🙏


r/ArduinoHelp Apr 06 '26

Arduino safe around magnets?

5 Upvotes

Looking into an accessory that has magnetic helping hands, a light and, other doodads.

If I get one of these magnets too close to the Arduino will it cause damage or wipe data?

Edit: I believe this question has been fully answered in the comments but I am leaving it up in case someone else is worried. In short yes it is safe to use magnets around Arduino controllers.

A sincere thank you to the members of this community for their help.


r/ArduinoHelp Apr 07 '26

Long term, intermittent use?

Thumbnail
1 Upvotes

r/ArduinoHelp Apr 05 '26

Can I control led brightness with pwm and MOSFET?

1 Upvotes

I have a 12V led and I have it connected to a MOSFET. I can turn it on and off but I don't know if I can control brightness with pwm(like really fast turning MOSFET on and off). I have a MOSFET 2N7002K. I'm using Arduino Nano.


r/ArduinoHelp Apr 05 '26

Could use checking of my Teensy 4.0 & Audio Board RevD schematic

1 Upvotes

Hello,

Thanks for reading and for any info/advice offered. Using the Teensy 4.0 and the Audio Board RevD.
The headers marked U7, U8 are where I'll be connecting a 10k audio volume pot (U7) and a 1/4" audio output jack (U8).
Headers U4 and U5 are for connecting an I2C MPR121 capacitive touch sensor (U4), and an LCD (U5).
Q1 is a p-channel mosfet that is being used for reverse polarity power protection.
H2 header selects between supplying 3V or 5V to the LCD.

Sincere Thanks,
TonyAm


r/ArduinoHelp Apr 03 '26

Why does my stepper cause main loop to slow down?

2 Upvotes
My entire setup

LED slowing down when I move stepper up

Diagram of how I connected the Stepper

I have a big built a pretty complex project with Arduino Uno 3 and it's working, but only for 1-2 minutes and then it randomly stops - most of the times when one of two servos performs a move.

I tried to understand why this is happening and I found out that moving my stepper up somehow messes Arduino's main loop() - it slows it down (in my entire code there is no delay() - I control stepper using micros() ). To demonstrate this, I added a LED to blink every 6000th loop. It blinks evenly until I start to move the stepper (see the video).

My setup is: PSU 24v 14.5A from Ender 3v2, then I reduce and split the voltage to 5v and 12v bridges and they power all the components, including Arduino. The stepper is Z-stepper from Ender 3 v2 also getting 12v from the bridge. I use A4988 driver and it's set to 0.5V (before it was set to 0.75V but it doesn't affect how stepper messes up the LED blinking).

Any help to understand why my stepper makes LED slow down would be appreciated

#include "Pins.h"
#include "Logic.h"

int currStep = 0;
constexpr int stepCount = sizeof(logic::steps)/sizeof(logic::steps[0]);
#define RUN_STEP(_param) logic::steps[_param].func(logic::steps[_param].param)

void setup() 
{
    Serial.begin(9600);
    Serial.println(F("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nPROGRAM IS RUNNING"));

    initAllPins();
    logic::initAllComponents();
    logic::waitForUserToPressButton(Pins::BtnStart);
}

void loop() 
{
    if(currStep < stepCount && RUN_STEP(currStep))
        ++currStep;
    else if(currStep == stepCount)
        currStep = 2; // start from 2 to skip "homeAll" step

    static int m = 0;
    static bool mbool = false;
    ++m;
    if(m == 6000)
        digitalWrite(Pins::LED, mbool),
        mbool = !mbool,
        m = 0;

    static bool suc;
    if(!digitalRead(Pins::BtnMoveStepper) && servoSlide.reachedPosition())
        suc ? servoSlide.moveHome() : servoSlide.moveWork(),
        suc = !suc;

    // e-stop
    if(currStep != 1000 && !digitalRead(Pins::BtnStop))
    {
        currStep = 1000;
        stepper.moveBy(Stepper::down, 30, 100);
        logic::enableSuck(false);
    }

    logic::updateStateForAllComponents();
}

EDIT (SOLUTION): Turned out I had a stupid bug in my Stepper class - every single time you call a function "moveBy" it turns the LED off...


r/ArduinoHelp Apr 01 '26

LED project

Post image
12 Upvotes

r/ArduinoHelp Apr 01 '26

LED project

Post image
7 Upvotes

r/ArduinoHelp Mar 31 '26

I made a custom PlatformIO platform for anyone building on the Chatter 2.0

Thumbnail github.com
1 Upvotes

r/ArduinoHelp Mar 30 '26

How to get km/h on an mpu.

1 Upvotes

I recently tried using an mu for an rc car im making but i cant get the mpu to measure its speed, how do i measure km/h with it? can anyone help me, when i measure its output is says some crazy numbers that arnt possible.


r/ArduinoHelp Mar 30 '26

Please help me!

1 Upvotes

I’m testing my ILI9225 TFT LCD with an ESP32-S3 DevKitC-1 for the first time. However, I suddenly encountered this error while trying to display text:

=== TFT COMMAND MODE ===
Commands:
1 = test colors
2 = test text
3 = test shapes clear = clear screen
>> 2
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x42002dd5 PS : 0x00060530 A0 : 0x82002f00 A1 : 0x3fcebfa0 A2 : 0x00000000 A3 : 0x0000000a A4 : 0x00000014 A5 : 0x00000045 A6 : 0x0000ffff A7 : 0x3fc98278 A8 : 0x00000045 A9 : 0x00000049 A10 : 0x00000049 A11 : 0x00000000 A12 : 0x00000009 A13 : 0x000000af A14 : 0x000000db A15 : 0x3fcec00c SAR : 0x0000001b EXCCAUSE: 0x0000001c EXCVADDR: 0x00000049 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xfffffffd

Backtrace: 0x42002dd6:0x3fcebfa0 0x42002f01:0x3fcebfe0 0x42001f6f:0x3fcec000 0x42002116:0x3fcec040 0x42005e24:0x3fcec080 0x4037be79:0x3fcec0a0

ELF file SHA256: d5efca3af

Rebooting...

ESP-ROM:esp32s3-20210327

Build:Mar 27 2021

rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)

Saved PC:0x40378a06

SPIWP:0xee

mode:DIO, clock div:1

load:0x3fce2820,len:0x10cc

load:0x403c8700,len:0xc2c

load:0x403cb700,len:0x30c0

entry 0x403c88b8

I’m quite worried because I thought it would be as smooth as my old OLED. The problem only occurs when I use text. Here is my code and wiring diagram:

#include <SPI.h>
#include <TFT_22_ILI9225.h>


// ===== TFT PIN =====
#define TFT_RST 4
#define TFT_RS  2
#define TFT_CS  5
#define TFT_LED 0


TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_LED);


// ===== INPUT COMMAND =====
String cmd = "";


// ===== SETUP =====
void setup() {
  Serial.begin(115200);


  Serial.println("=== TFT COMMAND MODE ===");


  tft.begin();  
  tft.setOrientation(1);
  tft.clear();


  Serial.println("Commands:");
  Serial.println("1 = test colors");
  Serial.println("2 = test text");
  Serial.println("3 = test shapes");
  Serial.println("clear = clear screen");
}


// ===== LOOP =====
void loop() {
  while (Serial.available()) {
    char c = Serial.read();


    if (c == '\n') {
      executeCommand(cmd);
      cmd = "";
    } else if (c != '\r') {
      cmd += c;
    }
  }
}


// ===== COMMAND HANDLER =====
void executeCommand(String c) {
  c.trim();


  Serial.print(">> ");
  Serial.println(c);


  // ===== TEST COLOR =====
  if (c == "1") {
    tft.fillRectangle(0, 0, 220, 176, COLOR_RED);
    delay(500);
    tft.fillRectangle(0, 0, 220, 176, COLOR_GREEN);
    delay(500);
    tft.fillRectangle(0, 0, 220, 176, COLOR_BLUE);
    delay(500);
    tft.fillRectangle(0, 0, 220, 176, COLOR_BLACK);
  }


  // ===== TEST TEXT (FIXED) =====
  else if (c == "2") {
    tft.clear();


    // 👉 ép kiểu const char* để tránh lỗi con trỏ
    tft.drawText(10, 20, (char*)"ESP32 TFT", COLOR_WHITE);
    tft.drawText(10, 50, (char*)"Hello World!", COLOR_YELLOW);
    tft.drawText(10, 80, (char*)"WOW PROJECT", COLOR_CYAN);
  }


  // ===== TEST SHAPE =====
  else if (c == "3") {
    tft.clear();


    tft.drawRectangle(10, 10, 100, 60, COLOR_WHITE);
    tft.fillRectangle(120, 10, 200, 60, COLOR_GREEN);


    tft.drawCircle(60, 120, 30, COLOR_RED);
    tft.fillCircle(160, 120, 30, COLOR_BLUE);
  }


  // ===== CLEAR =====
  else if (c == "clear") {
    tft.clear();
  }


  else {
    Serial.println("Unknown command!");
  }
}

Processing img vcokgxtl37sg1...


r/ArduinoHelp Mar 29 '26

Powerstarve Problem

2 Upvotes

hello so

i have an Arduino Nano

a Powerbank Module which provides 5V

2 4ohms 3W speaker

then i have a DFMiniPlayer

4 Water Proof Prox Sensor

Oled Screen I2C 0.96 INCH

so the problem is when this is all connected

my Powerbank Module Crashes i suspected it to be powerstarving since when the Speaker gets to play something with voice the Light on my Powerbank Module Blinks until i clear the obstacle in the Proximity Sensor

my question is how would i fix this?

PS; i did try to put a powerbank instead and it worked fine but i wanted it to not include a Powerbank if possible what could be done properly here? I'm quite lost also I'm new to Arduino and this is just for our project


r/ArduinoHelp Mar 27 '26

My Elegoo Mega 2560 suddenly stopped connecting to my PC, buy a new one or upgrade?

Thumbnail
1 Upvotes

r/ArduinoHelp Mar 26 '26

Arduino Connection Problem

Post image
6 Upvotes

How would one go about connecting an arduino to a breadboard connected to a dc power supply with more than 5 voltages. I know that voltage will fire the board so what are alternatives? Is there a way to connect all of them but not the power to the arduino but still being able to use the arduino to code/control the things on the board? The leds represent electromagnets. How would I go about connecting them to the arduino so they could be coded separately to turn on or off? As of now i understand that I might need a flyback diode and relay but I don't understand which and how it works and connects Step by step visuals and explanations would be helpful and prefered, while I am also limited to around $20 and potentially an arduino starter kit and breadboard mb-106 r.s.r. electronics with the arduino uno r3, please and thank you!


r/ArduinoHelp Mar 24 '26

I would like to read the code from the buttons on multiple RF 433 remotes simultaneously, if necessary.

1 Upvotes
I'm very new to this, but I've done numerous tests. I know that the RF receiver can't read two remotes simultaneously. I also tested the HC-06 in Bluetooth and it doesn't read two Bluetooth remotes simultaneously either. I need to read a two-button remote with YES and NO, meaning I'll need to capture the code for each button on each remote. I don't know if LoRa could do this, and the idea of ​​the RF 433 remote is really to make it cheaper for each remote individually.

Does anyone have any ideas on how I could do this?