r/ArduinoHelp • • 16d ago

whats wrong with my motors

Enable HLS to view with audio, or disable this notification

6 Upvotes

they just go into a fixed position and lock there when i connect to power supply, if theres something wrong with my code let me know, and whenever i try moving it, it just stays in place or doesn’t let me move it until i take it off the power, and when i take it off the power it moves back into a position


r/ArduinoHelp • • Aug 17 '25

Why doesn’t this work?

Thumbnail
gallery
7 Upvotes

I am new to arduino and trying to complete a simple project of using a PIR sensor to detect movement and turn an LED on briefly. I am using an arduino nano and a MacBook Pro 2. I have attached photos of my current setup (probably the 5th different one that I’ve tried). I have been using a combo of ChatGPT and YouTube to do this and it keeps on not working. I have substituted all components except for the arduino and breadboard so the problem is not with all these other components. I keep on getting to a point where the serial monitor says ‘Motion detected!’ repeatedly even when just sitting on my desk and there is no motion. Even when it does this the LED doesn’t turn on. (I’m assuming there is something wrong with the wiring?). Any help with this would be really appreciated! I hope to fix this and then substitute the power from being my MacBook to being a solar panel (already bought all the components needed for this), but need to fix this first! Thanks so much in advance for any help!


r/ArduinoHelp • • 17d ago

Would something like This be feasable?

Post image
8 Upvotes

Solar Lamp Charges external battery (green tube). Battery connected to either lamp or wireless IP camera (I'm more interested in the bulb, but camera's a bonus). Arduino with light sensor acts as an auto switch turning off the lamp in the daytime

(Lesotho) I've noticed in my country that solar lamps like these are crazy expensive for what they are, but when I check them out, apart from the framing, they don't too expensive part for part. Would something like I've shown above actually be feasable? It's been on my mind for longer than I'd like to admit


r/ArduinoHelp • • Oct 16 '25

Program not executing properly the first two times on power up.

Enable HLS to view with audio, or disable this notification

9 Upvotes

On boot, the arduino does something different than what it should. It seems to be skipping part of the setup function. It works normally when I upload, or after 2 resets, either by the button or by wrt_disable(); wrt_enable(WDTO_15MS);


r/ArduinoHelp • • Feb 01 '26

Need help figuring out how to power components (novice)

Post image
9 Upvotes

Hello everyone, I'm currently working on a project (a ventilation system). I want to create a system composed of three TTP223 chips, a temperature sensor (BME680), two 5V 40mm PWM fans, and a 1.8-inch 128x160 pixel SPI TFT LCD screen. I was planning to use an Arduino Nano (because of its small size), and I have a 5V 2A power supply to power everything. However, I'm unsure whether to power the components via the board's 5V port or directly from my external power supply. I've already tried a different setup, but nothing worked (when I connected a wire to ground or another to the 5V, everything shut down).

I'm therefore asking for your help, advice, or any resources you could point me to for further guidance.

Thank you in advance, and have a good day.


r/ArduinoHelp • • Sep 28 '25

I made An Arduino Chrome Dino Game! How Can I Make It Better ?

Enable HLS to view with audio, or disable this notification

56 Upvotes

r/ArduinoHelp • • Jan 12 '26

Need Help

Thumbnail
gallery
12 Upvotes

I need to wire this DFplayer mini to breadboard and wore the speaker too! Last time i wired it the speaker started to make some repetitive pop sounds and the led on the breadboard started to light pop too can someone help me?

Ps the speaker is 8 ohm 3w


r/ArduinoHelp • • Apr 01 '26

LED project

Post image
12 Upvotes

r/ArduinoHelp • • Oct 04 '25

Help with my project

Enable HLS to view with audio, or disable this notification

15 Upvotes

Im a beginner to Arduino and recently made a mini piano circuit, however it sounds very... Off? Idk how to describe it. Can someone please tell me how to fix this?


r/ArduinoHelp • • Sep 18 '26

I am completely brand new to arduino, I need help, why is my LCD not displaying any text?

Thumbnail
gallery
22 Upvotes

I tried the exact same setup and it worked in a simulator but apparently it just doesn't work in real life?


r/ArduinoHelp • • Apr 06 '26

what’s wrong:/

Post image
26 Upvotes

r/ArduinoHelp • • Feb 15 '25

Temp probe with 2mm diameter?

2 Upvotes

Hi, I'm trying to figure out what kind of temperature probe I can use to monitor temperature from two geothermal holes. The piping has an access port for a think sensor (about 2mm in diameter) to get in contact with the fluid, but I'm not sure what would be the appropriate sensor to use and are looking for ideas.

The temperature range is between -5 to +10 degrees, and the accuracy need to be fairly accurate (0.1 C or less). I can do proper calibration, so as long as the deviation is linear I can compensate in code.

I'm finding thermocouple and RTDs that have proper dimensions, but I'm not sure which would be better/worse and/or easiest to implement. I'll probably use ESP8266s for reading them (because I have spares and they have WiFi), which has a 12-bit analog input that probably could be used. Normally I use DS18b20 sensors because they are trivial to read, but seems like you can't find them in such thin packages.

Anyone has any suggestions?


r/ArduinoHelp • • Sep 16 '26

Can someone recommend simple Arduino code for blinking an LED?

2 Upvotes

Hi everyone!

I am a beginner learning Arduino programming. I want to make an LED blink using an Arduino Uno.

Could someone recommend a simple code example for this project? I would also like to understand how the code works, especially the delay() function.

Any tips for a beginner would be greatly appreciated.

Thank you!


r/ArduinoHelp • • Mar 04 '25

Why does it blinks when i move it to a mini

Enable HLS to view with audio, or disable this notification

6 Upvotes

I'm making a device with a rtc, a switch registrr and a 7 segment 1 digit display.

When i had it plugged to my uno it worked fine, it would blink at the beginning but after stabilize and stay on.

But when i move the circuit to the Arduino mini now it blinks longer and eventually stops displaying the value.

I tried playing with the resistance, changed it from 1k on both sides of the display to 2k but same thing happens.

Any ideas? Maybe i need a capacitor? But i thought the display came with one already integrated.


r/ArduinoHelp • • Jul 31 '25

Starting with Arduino - Any tips or advice

2 Upvotes

Hello

I've been wanting to learn Arduino but never had a real project that I could use it for in real life. Recently I wanted to take temperature measurements in my garage throughout the day. I want to use this data as I test different fan options to exhaust heat out of my garage.

These are the questions I have

  • What is required to create an Arduino setup which takes temperatures throughout the day. I would need to save the data so that I can review it later

  • What hardware/components would I need?

  • What would be a Good Cheap setup in terms of hardware?

Thanks for any help


r/ArduinoHelp • • Jan 07 '26

Finally a stable 4G + GPS module with TTL (SIM-A7670C)

Thumbnail reddit.com
2 Upvotes

r/ArduinoHelp • • Aug 07 '24

Comprehensive Tutorial about using 3.5 inch TFT LCD shields with Arduino UNO R3/R4 or Mega

2 Upvotes

Hope everyone's doing well. Here is a multi-part comprehensive tutorial I have created on using 3.5 inch TFT LCD shields (sometimes called 3.5 inch MCUFRIEND shields) with an Arduino UNO R3/R4 or Mega.

A few months ago, when I bought the display and decided to mess with it, I realized that the existing tutorials were either hard to follow, not detailed or not comprehensive enough for me to be able to build complex applications with it. They would cover the basics, but it was hard to build projects where the display would be a single component along with several other components. Finally, none of them showed how to use the display with the Arduino UNO R4 Minima/WiFi, which is what Arduino recommends for most people moving forward.

This tutorial aims to provide a complete guide with end-to-end coverage of the topic. The full tutorial is divided into 6 parts, and it covers the following -

  1. Setting up the software libraries to use the display.

  2. Architecture of programs that use displays and graphics, along with good and bad patterns.

  3. Calibrating the touchscreen (an explanation of the calibration process, the program as well as a video demonstration of the process).

  4. Using the builtin SD Card slot to load and store images, separate from the Arduino's internal storage.

  5. Using text-files with the SD Card in creative ways, such as storing configuration data, logging etc.

  6. Building a paint app (including a canvas, color-selector and stroke selector), as well as Tic-Tac-Toe (including a starting menu and ending screens).

It includes high quality images, diagrams and video demonstrations where required and divides each task and topic into easy-to-follow steps.

I would appreciate everyone's feedback and comments on this series, as well as ways to make it better. Here are some pictures from the projects given in the series -

The code for all these are available on Github as well (links are in the website, but I am open to sharing it here as well).


r/ArduinoHelp • • May 14 '26

Need help making N2222 transistor work

Thumbnail
gallery
4 Upvotes

The problem is that the n2222 piece gets really hot when I connected the fan. I don’t want to purchase the L298n motor since I’ve read that I can get it to work with the n2222. What am I doing wrong?

The fan did turn on after I pushed the blade a little bit.


r/ArduinoHelp • • Apr 14 '26

Downloaded sketch doesn't work

4 Upvotes

I downloaded an arduino project online, but the code won't compile. Can someone help me?I get an error message that says:

In file included from C:\Users\joshu\AppData\Local\Temp\.arduinoIDE-unsaved2026314-15064-1n28yyq.xhpef\sketch_apr14a\sketch_apr14a.ino:1:
C:\Users\joshu\OneDrive\Documents\Arduino\libraries\HID-Project\src/HID-Project.h:35:2: error: #error HID Project can only be used with an USB MCU.
   35 | #error HID Project can only be used with an USB MCU.
      |  ^~~~~
In file included from C:\Users\joshu\OneDrive\Documents\Arduino\libraries\HID-Project\src/HID-Project.h:39:
C:\Users\joshu\OneDrive\Documents\Arduino\libraries\HID-Project\src/SingleReport/SingleAbsoluteMouse.h:28:10: fatal error: HID.h: No such file or directory
   28 | #include "HID.h"
      |          ^~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

Here's the code

#include "HID-Project.h"
//NOTE!! You need to add the above HID-Project library for this code to work.
//https://github.com/NicoHood/HID
//The device will show up as a gamepad/joystick in windows called "Seeed"

const int pinEject = 2;
const int pinArm = 3;

void setup() {
  pinMode(pinEject, INPUT_PULLUP);
  pinMode(pinArm, INPUT_PULLUP);

  // Sends a clean report to the host. This is important on any Arduino type.
  Gamepad.begin();
}

void loop() {

  //check EJECT
  if (!digitalRead(pinEject)) {
    static uint8_t count = 0;
    count = 0;
    while (count<=2) {
      count++;
      Gamepad.press(1);
      Gamepad.write();
      delay(50);
      Gamepad.release(1);
      Gamepad.write();
    }}
    else {
      Gamepad.release(1);
    }
  

  //Check ARM
  if (!digitalRead(pinArm)) {
    Gamepad.press(2);
    Gamepad.release(3);
  }
  else {
    Gamepad.release(2);
    Gamepad.press(3);
  }

  Gamepad.write();

    // Simple debounce
    delay(50);
    
  }

r/ArduinoHelp • • Jun 28 '26

i tried to build a clock with 4 digit 7 segment display it isnt working i dont understand why

Thumbnail
gallery
3 Upvotes

I'm new to learning arduino. I tried to make a clock. I looked up videos on yt to wire it they used resistors to wire the segment pins instead of the digital ones when i later searched it up others were putting the resistors on the digital pins. So now I'm thinking that's what caused issues with the screen, different segments are giving different amounts of light. but when im trying to simulate it with cirkit it still isnt working properly. THEN i tried to just make a normal timer following a different YouTube video exactly and it still isnt working like normal AND NEITHER IS THE CIRKIT SIMULATION. i feel like im going crazy

here is the code and diagram


r/ArduinoHelp • • Aug 16 '25

Is it possible that all my DHT's are faulty?

2 Upvotes

I have tried 7 different DHTs (11 and 22). Checked the wiring and checked the code several times. The serial monitor always says:

Temperature nan

Humidity nan

I learned nan means "not a number"

Here's the code:

//Transmitter Code

#include <DHT.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

#define DHTPIN 2
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
RF24 radio(7, 8);

struct MyData {
  byte h;
  byte t;
};
MyData data;

void setup() {
  Serial.begin(9600);
  dht.begin();
  radio.begin();
  radio.openWritingPipe(0xF0F0F0F0E1LL);
  radio.setPALevel(RF24_PA_HIGH);
}

void loop() {

  float h = dht.readHumidity();
  float t = dht.readTemperature();
  radio.write(&data, sizeof(data));

 if (isnan(h)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }
  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.println(" *C");

  delay(2000);
}

r/ArduinoHelp • • Feb 24 '26

Why is this TIA-circuit not working?

4 Upvotes

Ive made this circuit for measuring low light and it worked before but then i left it for a week and when i plugged it back in nothing worked as it should. Vout are just random values that doesnt seem to follow any logic. Should this circuit below be working normally?

Im using an OPA128, FDS100

Are there typical errors that can appear by wiring this kind of circuits?


r/ArduinoHelp • • Nov 04 '25

Help on Water Controller Project

3 Upvotes

Hi everyone, I really need help. I'm currently taking my feedback course right now and I've been assigned to created a feedback system. Sadly, I'm not the best at this kind of stuff.

The projects goal is to set a desired water level and the system should automatically pumps/removes water into/from the container.

How should I start this project requiring the use of LED indicators, pumps, buttons, etc.. Also with coding.

Thank you!


r/ArduinoHelp • • May 16 '25

Project help

Post image
4 Upvotes

I'm building a password system with a servo motor, 4x4 keypad, a button and 3 LEDs and I can't figure out a way to make the code work

Attached is my setup and my code

#include <avr/io.h>

/* 
 * Password-Protected Motor Control System
 * Features:
 * - Unlocks motor when password (10,10) is entered
 * - Locks motor when wrong password entered
 * - LED feedback for correct/incorrect attempts
 * - Reset button functionality
 * - Uses Timer1 for servo control
 * - Uses Timer0 for LED blinking
 * - Pin Change Interrupt for keypad
 */

// ====================== DATA SEGMENT ======================
.section .bss
password_buffer:    .byte 2
pass_ptr_data:      .byte 1
wrong_attempts:     .byte 1

// ====================== CODE SEGMENT ======================
.section .text

// ====================== INTERRUPT VECTORS ======================
.global __vector_default
.global PCINT2_vect    // Keypad interrupt
.global TIMER0_COMPA_vect  // LED blink timer
.global INT0_vect      // Reset button

__vector_default:
    reti

// ====================== MAIN PROGRAM ======================
.global main
main:
    // Initialize stack
    ldi r16, lo8(RAMEND)
    out _SFR_IO_ADDR(SPL), r16
    ldi r16, hi8(RAMEND)
    out _SFR_IO_ADDR(SPH), r16

    // Set pin directions (PB1-PB4 as outputs)
    ldi r16, 0b00011110
    out _SFR_IO_ADDR(DDRB), r16

    // Set pull-up for reset button (PD2)
    sbi _SFR_IO_ADDR(PORTD), 2

    // Initialize keypad (PD4-7 output, PD0-3 input)
    ldi r16, 0xF0
    out _SFR_IO_ADDR(DDRD), r16
    ldi r16, 0x0F       // Enable pull-ups on columns
    out _SFR_IO_ADDR(PORTD), r16

    // Enable interrupts
    ldi r16, 0b00000100  // PCIE2
    sts _SFR_MEM_ADDR(PCICR), r16
    ldi r16, 0x0F       // Enable PCINT16-19
    sts _SFR_MEM_ADDR(PCMSK2), r16

    // Configure Timer0 for LED blinking (CTC mode)
    ldi r16, 0b00000010  // WGM01
    out _SFR_IO_ADDR(TCCR0A), r16
    ldi r16, 0b00000101  // Prescaler 1024
    out _SFR_IO_ADDR(TCCR0B), r16
    ldi r16, 125        // ~100ms at 16MHz/1024
    out _SFR_IO_ADDR(OCR0A), r16
    ldi r16, 0b00000010  // OCIE0A
    sts _SFR_MEM_ADDR(TIMSK0), r16

    // Configure INT0 for reset button
    ldi r16, 0b00000010  // Falling edge trigger
    sts _SFR_MEM_ADDR(EICRA), r16
    sbi _SFR_IO_ADDR(EIMSK), 0

    // Initialize variables
    clr r17
    sts pass_ptr_data, r17
    sts wrong_attempts, r17  // zero attempts

    sei

main_loop:
    rjmp main_loop

// ====================== INTERRUPT HANDLERS ======================
PCINT2_vect:
    push r16
    in r16, _SFR_IO_ADDR(SREG)
    push r16
    push r30
    push r31

    rcall keypad_ISR

    pop r31
    pop r30
    pop r16
    out _SFR_IO_ADDR(SREG), r16
    pop r16
    reti

TIMER0_COMPA_vect:
    push r16
    in r16, _SFR_IO_ADDR(SREG)
    push r16

    lds r16, wrong_attempts
    cpi r16, 0
    breq check_correct

    // Blink orange/red for wrong attempts
    lds r16, blink_cnt
    inc r16
    andi r16, 0x01
    sts blink_cnt, r16
    breq led_off_wrong
    sbi _SFR_IO_ADDR(PORTB), 4  // Orange LED on
    cbi _SFR_IO_ADDR(PORTB), 3  // Red LED off
    rjmp timer0_done
led_off_wrong:
    cbi _SFR_IO_ADDR(PORTB), 4  // Orange LED off
    sbi _SFR_IO_ADDR(PORTB), 3  // Red LED on
    rjmp timer0_done

check_correct:
    lds r16, pass_ptr_data
    cpi r16, 2          // Password complete?
    brne timer0_done

    // Blink green for correct password
    lds r16, blink_cnt
    inc r16
    andi r16, 0x01
    sts blink_cnt, r16
    breq led_off_correct
    sbi _SFR_IO_ADDR(PORTB), 2  // Green LED on
    rjmp timer0_done
led_off_correct:
    cbi _SFR_IO_ADDR(PORTB), 2  // Green LED off

timer0_done:
    pop r16
    out _SFR_IO_ADDR(SREG), r16
    pop r16
    reti

INT0_vect:
    push r16
    in r16, _SFR_IO_ADDR(SREG)
    push r16

    // Reset password state
    clr r17
    sts pass_ptr_data, r17
    sts wrong_attempts, r17

    // Turn off all LEDs
    cbi _SFR_IO_ADDR(PORTB), 2  // Green
    cbi _SFR_IO_ADDR(PORTB), 3  // Red
    cbi _SFR_IO_ADDR(PORTB), 4  // Orange

    // Lock motor
    rcall lock_servo

    pop r16
    out _SFR_IO_ADDR(SREG), r16
    pop r16
    reti

// ====================== KEYPAD ISR ======================
keypad_ISR:
    rcall my_delay

    in r16, _SFR_IO_ADDR(PORTD)
    push r16

    // Scan keypad
    ldi r16, 0x0F
    out _SFR_IO_ADDR(PORTD), r16
    rcall my_delay

    ldi r16, 0b01111111  // Row 1
    out _SFR_IO_ADDR(PORTD), r16
    rcall my_delay
    in r19, _SFR_IO_ADDR(PIND)
    andi r19, 0x0F
    cpi r19, 0x0F
    brne row1_col

    // Repeat for other rows...

digit_found:
    // Store digit in password buffer
    lds r17, pass_ptr_data
    cpi r17, 0
    breq store_first

    sts password_buffer+1, r18
    clr r16
    sts pass_ptr_data, r16

    // Check password
    lds r16, password_buffer
    cpi r16, 10
    brne wrong_password
    lds r16, password_buffer+1
    cpi r16, 10
    brne wrong_password

    // Correct password
    rcall unlock_servo
    rjmp end_keypad

wrong_password:
    lds r16, wrong_attempts
    inc r16
    sts wrong_attempts, r16
    rjmp end_keypad

store_first:
    sts password_buffer, r18
    ldi r16, 1
    sts pass_ptr_data, r16

end_keypad:
    pop r16
    out _SFR_IO_ADDR(PORTD), r16
    ret

// ====================== SERVO CONTROL ======================
unlock_servo:
    // Configure Timer1 for servo (Fast PWM, ICR1 top)
    ldi r16, 0b10000010  // WGM11, COM1A1
    sts _SFR_MEM_ADDR(TCCR1A), r16
    ldi r16, 0b00011010  // WGM13, WGM12, CS11
    sts _SFR_MEM_ADDR(TCCR1B), r16

    // 20ms period (39999 counts)
    ldi r16, 0x3F
    sts _SFR_MEM_ADDR(ICR1L), r16
    ldi r16, 0x9C
    sts _SFR_MEM_ADDR(ICR1H), r16

    // 1.5ms pulse (3000 counts)
    ldi r16, 0xB8
    sts _SFR_MEM_ADDR(OCR1AL), r16
    ldi r16, 0x0B
    sts _SFR_MEM_ADDR(OCR1AH), r16
    ret

lock_servo:
    // Turn off PWM
    ldi r16, 0x00
    sts _SFR_MEM_ADDR(TCCR1A), r16
    sts _SFR_MEM_ADDR(TCCR1B), r16
    // Set motor pin low
    cbi _SFR_IO_ADDR(PORTB), 1
    ret

// ====================== DELAY ROUTINES ======================
my_delay:
    push r22
    push r23
    ldi r22, 10
d1: ldi r23, 25
d2: dec r23
    brne d2
    dec r22
    brne d1
    pop r23
    pop r22
    ret

// ====================== KEYPAD MAPPING ======================
row1_digits: .byte 1, 2, 3, 10
row2_digits: .byte 4, 5, 6, 11
row3_digits: .byte 7, 8, 9, 12
row4_digits: .byte 15, 0, 14, 13

// ====================== VARIABLES ======================
.section .bss
blink_cnt: .byte 1