r/arduino • • Sep 27 '26

Hardware Help Need to differentiate between red light and white light on a sensor

9 Upvotes

I have a game project that I am struggling to solve an issue on.

The aim is to open a device and disable a security feature before continuing. This security feature is a light sensor, if the item is opened when it is bright they will lose a life or fail the game.

The method I would like the players to use is have use red light. This will make the rest of that section of the game more challenging.

I have tested a few things with an LDR and filters etc. to try and get some sort of difference in values for the red light and white light with no luck.

Looked into a TCS34725 RGB colour sensor but i am unsure if this would even work as it is mainly used to detect the colours of an object, not environmental light.

Does anyone know if it would be possible to cover the white LED and only use the sensor to detect a large enough difference in white light and red light to make the game work?

The aim is to not cover the sensor as it should trigger fairly quickly after the device is open, so needs to be quite sensitive. Plus they are not meant to know the location of the sensor. Although if I cannot figure anything better out, I will probably have to go this route.

Or are there any other suggestions from people on what i could do?

Edit: I was using the wrong shade filters. Tested all of the shades and found one that drops the levels enough to make the game work.


r/arduino • • Sep 27 '26

Hardware Help I need help and some advice

16 Upvotes

First of all: I have an Arc reactor that runs on 9 volts, and it's currently on a different circuit from the Arduino because of that.

I want it to be controllable by Arduino, but I definitely don't want to have to open it up and redo all the wiring to get it to work at 5V. Does anyone know what I can do here?

And now my second problem: In the video, I show a part of the armor that has 3 motors, and every time they turn on, they restart the armor. I don't know exactly why, so I wanted to isolate them, make them function like a Li-ion battery while only receiving commands from the Arduino.

If anyone can help, I would really appreciate it. This project is a test for my next armor designs, and I want to bring many new things to it.


r/arduino • • Sep 27 '26

Beginner's Project I blinked my first LED

146 Upvotes

It’s nothing crazy, but I got my first starter kit and I make an LED blink. Then I made it blink “SOS” in Morse code. Then I used nested loops to make it blink Morse code 3 times.

Super excited to do this. I’ve been in tech my whole career but I’ve never been much into electronics until now. Accomplishing something felt good.


r/arduino • • Sep 28 '26

ADF5355 Registers Not Correct?

2 Upvotes

I am trying to output 2.4 ghz with my ADF5355 and I don't get anything. I am using a 125 MHz reference and these are my registers. This is the datasheet and my code https://www.analog.com/media/en/technical-documentation/data-sheets/ADF5355.pdf Can anyone double check my registers to see if I am doing anything wrong because I used a logic analyzer to make sure bits are being sent to the adf5355 correctly and they are. I am using an arduino pro mini ATMega328P and this pcb https://www.amazon.com/Development-Generator-Infrastructure-Microwave-Programmable/dp/B0F7SVD7F1

#include <SPI.h>

const uint8_t LE_PIN = 10;
const uint8_t CE_PIN = 9;


// ============================================================
// ADF5355
//
// Reference = 125 MHz
// RF output = 2400 MHz
// VCO       = 4800 MHz
// RF divider = /2
// OUTPUT    = RFOUTB
// N = 38.4 | INT = 38 | FRAC1 = 6710886 | FRAC2 = 50 | MOD2 = 125
// ============================================================


// ------------------------------------------------------------
// R0
// ------------------------------------------------------------

const uint32_t R0 =
  0b00000000001000000000001001100000;


// ------------------------------------------------------------
// R1
// ------------------------------------------------------------

const uint32_t R1 =
  0b00000110011001101011001100100001;


// ------------------------------------------------------------
// R2
// ------------------------------------------------------------

const uint32_t R2 =
  0b00000000110010000000011111010010;


// ------------------------------------------------------------
// R3
// ------------------------------------------------------------

const uint32_t R3 =
  0b00000000000000000000000000000011;


// ------------------------------------------------------------
// R4
// ------------------------------------------------------------

const uint32_t R4 =
  0b00000000000000000000100100000100;


// ------------------------------------------------------------
// R5
// ------------------------------------------------------------

const uint32_t R5 =
  0b00000000100000000000000000100101;


// ------------------------------------------------------------
// R6
//
// RFOUTB DISABLED
// RFOUTA ENABLED
// RF divider = /2
//
// ------------------------------------------------------------

const uint32_t R6 =
  0b00110101001001100100000001100110;


// ------------------------------------------------------------
// R7
// ------------------------------------------------------------

const uint32_t R7 =
  0b00010000000000000000000000000111;


// ------------------------------------------------------------
// R8
// ------------------------------------------------------------

const uint32_t R8 =
  0b00010000001011010000010000101000;


// ------------------------------------------------------------
// R9
// ------------------------------------------------------------

const uint32_t R9 =
  0b00110101111111111100110000101001;


// ------------------------------------------------------------
// R10
// ------------------------------------------------------------

const uint32_t R10 =
  0b00000000110000000011111111111010;


// ------------------------------------------------------------
// R11
// ------------------------------------------------------------

const uint32_t R11 =
  0b00000000011000010011000000001011;


// ------------------------------------------------------------
// R12
// ------------------------------------------------------------

const uint32_t R12 =
  0b00000000000000100000010000011100;




// ============================================================
// SPI WRITE
// ============================================================

void writeRegister(uint32_t value)
{
  digitalWrite(LE_PIN, LOW);

  delayMicroseconds(1);

  SPI.transfer((uint8_t)(value >> 24));
  SPI.transfer((uint8_t)(value >> 16));
  SPI.transfer((uint8_t)(value >> 8));
  SPI.transfer((uint8_t)value);

  delayMicroseconds(2);

  digitalWrite(LE_PIN, HIGH);

}


// ============================================================
// SETUP
// ============================================================

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

  delay(1000);

  Serial.println();
  Serial.println("================================");
  Serial.println("ADF5355 - 2.400 GHz RFOUTB");
  Serial.println("================================");
  Serial.println("Reference : 125 MHz");
  Serial.println("PFD       : 125 MHz");
  Serial.println("VCO       : 4800 MHz");
  Serial.println("RF DIV    : /2");
  Serial.println("OUTPUT    : RFOUTB");
  Serial.println();


  pinMode(LE_PIN, OUTPUT);
  pinMode(CE_PIN, OUTPUT);

  digitalWrite(LE_PIN, LOW);
  digitalWrite(CE_PIN, HIGH);

  SPI.begin();

  SPI.beginTransaction(
    SPISettings(
      3000000,
      MSBFIRST,
      SPI_MODE0
    )
  );


  // ==========================================================
  // INITIAL LOAD
  // ==========================================================

  Serial.println("Writing initial registers...");

  writeRegister(R12);
  delayMicroseconds(5);

  writeRegister(R11);
  delayMicroseconds(5);

  writeRegister(R10);
  delayMicroseconds(5);

  writeRegister(R9);
  delayMicroseconds(5);

  writeRegister(R8);
  delayMicroseconds(5);

  writeRegister(R7);
  delayMicroseconds(5);

  writeRegister(R6);
  delayMicroseconds(5);

  writeRegister(R5);
  delayMicroseconds(5);



  writeRegister(R4);
  delayMicroseconds(5);

  writeRegister(R3);
  delayMicroseconds(5);

  writeRegister(R2);
  delayMicroseconds(5);

  writeRegister(R1);
  delayMicroseconds(40);

  writeRegister(R0);
  delayMicroseconds(5);


  SPI.endTransaction();


  Serial.println();
  Serial.println("================================");
  Serial.println("ADF5355 CONFIGURED");
  Serial.println("RFOUTB = 2400 MHz");
  Serial.println("RFOUTA = OFF");
  Serial.println("================================");
}


void loop()
{
}

r/arduino • • Sep 27 '26

Hardware Help Resurrecting old Arduino boards

4 Upvotes

I have a old MEGA with an Atmel 1280 that I was using in ~2010, programming on a XP machine running Arduino IDE 0017. This still works with that old laptop and that old IDE. When I connect to my new W11 machine with IDE 2.3.6 the MEGA is not recognized. I'd like to use this with my grandkids and wonder what needs to be changed/updated to bring the MEGA into a current IDE.

Second is an RFduino kit that I got as a kickstarter...I think they're gone but wonder if that board will work as an equivalent to a current Arduino.

TIA for any help.


r/arduino • • Sep 27 '26

I've developed a Web App for Arduino Unos and Nanos: Built for Chromebook classrooms

2 Upvotes

Hi,

I’m a STEM teacher whose students work on Chromebooks. I've found that the Arduino Cloud is good but sometimes buggy, so I developed a web app that allows students to write, compile, and upload sketches to an Arduino. The app that I built runs completely in a browser; there’s nothing to download or install, and it includes library support as well as the use of the serial monitor and the serial plotter. The app should work in Chrome and Edge browsers, but it will not work in Safari, Firefox or other browsers.

I’ve successfully tested the app on my own using an Arduino Uno and an Arduino Nano connected to a Chromebook, but I haven't had the opportunity to test it with my classes yet as we cover Arduino in the spring.

Right now, I'm looking for people who are interested in testing the web app in their classes. Just a heads up: this is running on a free-tier server, and I've verified it holds up reliably for a class of ~30 compiling in a normal staggered sequence. If the app gets a lot more traffic than that all at once, response times could slow down noticeably. Here's the link.

https://zio-arduino-app.onrender.com/

I'd appreciate your feedback to improve the app's functionality.

Thank you.


r/arduino • • Sep 27 '26

Look what I made! I built a pocket note-finder for my clarinet (ESP32-S2, Arduino framework) - build details inside

Post image
16 Upvotes

I wanted a gadget that listens to my clarinet and shows the note on the spot, so I built one: ESP32-S2 running Arduino-framework firmware, an analog mic, a small color display showing pitch, cents and a staff view, LiPo battery, 3D-printed enclosure. It also works on my saxophone, which I tried after the fact.

The part that took the longest was pitch detection on a cheap mic - reed instruments have a weak fundamental and my first version kept jumping to the third harmonic. Fixed by reworking how the detection weighs partials. All code, the case STL, and the parts list are MIT on GitHub: https://github.com/robotaitai/NoteNode

Star it if you'd build one. And if you've done audio pitch work on Arduino-class hardware, I'd love to hear how you handled noisy real-world input - I'll be in the comments.


r/arduino • • Sep 28 '26

Laya-Q

Thumbnail
github.com
0 Upvotes

Hi all,

I wanted to post a small passion project of mine.

With the recent releases of Jev, and Laya, I built an app lab / git repo to automatically setup Laya to run on an Arduino Uno Q. This automatically installs the model, and has a small portal for you to get up and running. Check it out at the GitHub Repo.


r/arduino • • Sep 27 '26

Look what I made! How Super Nintendo World actually works:

7 Upvotes

r/arduino • • Sep 27 '26 Bravo

Finished the prototype!

42 Upvotes

Completed the prototype. Next step is perfboard then custom PCB! Enjoying this process so much.


r/arduino • • Sep 27 '26

Newb to Arduino, advice on current LED light project

4 Upvotes

Hey all, looking for some advice as a complete beginner. I'm trying to create a setup that involves 3 independent LED light strips on 3 bookshelves. I'd like them to be independent of each other (no wires attached to the other led strips or plugs to an outlet) and controlled by one controller. I'd like the lights to be able to last for ~5 hours before I have to recharge them.

So..my research shows this:

1x controller that controls everything - ESP32-C3 SuperMini
3x light strips (addressable light strips cut into 3 pieces) - WS2812B
3x usb battery to power the LED strips (not sure where to get this, are these just powerbanks?)
3x shelf controller - ESP32-C3 SuperMini

If this is right, do I just put everything together, write the code, upload and test?


r/arduino • • Sep 27 '26

Hardware Help need advice with temperature sensor for espresso machine

Thumbnail
gallery
5 Upvotes

hey! I'm working on my coffee machine it works beautifully but I'm adding the alexrus/marax Arduino shot timer, but would also like to add some sort of temperature sensor...any ideas? I have to mount the sensor as close to the group head as possible (where the water comes out) thanks in advance


r/arduino • • Sep 26 '26

My first personal Arduino project

50 Upvotes

I made a light activated scream machine for scaring my wife when she walks in the door tonight. Wish me luck!


r/arduino • • Sep 26 '26

The entire wire melted...

Thumbnail
gallery
31 Upvotes

Idk whether it's because I used the wrong gnd (everything except the servo was on its gnd, the servo was on the Arduino gnd but the Arduino gnd was on the batteries) or because I hot glue the wires to the breadboard so they wouldn't fall out in 2 seconds

The second I plugged in the 12v for the l829n it started smoking and I unplugged everything.

I gutted everything, looks fine besides a selected few wires (has melted gunk in them) and I might need to use a different l829n.


r/arduino • • Sep 26 '26

Software Help I forgot to save my code but the arduino still remembers it, can I get it back?

99 Upvotes

What the title says, if I plug the arduino in it works just fine but I can't edit the code cause I don't have it anymore. How can I get it back?


r/arduino • • Sep 26 '26

ESP32 running out of RAM? Your board probably has megabytes of PSRAM doing nothing. I made a library that fixes that with one include

21 Upvotes

If your board has PSRAM (ESP32 WROVER, most ESP32-S3 boards like the N8R8), you've got megabytes of extra memory that your vectors, maps and strings never touch. They all squeeze into the internal RAM instead.

This library moves them over:

#include <PsramStl.h>

void setup() {
  Serial.begin(115200);
  if (!psram::begin(Serial)) return;   // tells you how to turn PSRAM on if it's off

  psram::vector<float> samples;
  samples.reserve(250000);             // 1 MB, twice ALL of the internal RAM
}

void loop() {}

Try it in 2 minutes

  1. Tools > PSRAM > Enabled (or "OPI PSRAM" on S3 N8R8 boards)
  2. Download the ZIP from the releases page, then Sketch > Include Library > Add .ZIP Library
  3. File > Examples > PsramStl > QuickStart

There are 6 examples: containers, putting your own objects in PSRAM, what happens when PSRAM fills up, diagnostics, and a big sensor ring buffer. Every single one gets booted in Espressif's emulator on every push, so they actually run.

Heads up: this is for C++ containers like std::vector and std::map, not the Arduino String class.

Repo (free, MIT): https://github.com/aeljandro2/esp32-psram-stl

I made it, so if you try it on your board, tell me how it went!


r/arduino • • Sep 27 '26

Software Help ESP32-S3 (N16R8) enumerates as CDC but never as HID — USBHIDGamepad not showing up, any known fix?

2 Upvotes

Board: ESP32-S3-N16R8, dual USB-C (COM + USB), core 3.3.11, Arduino IDE 2.2.1. USB Mode set to USB-OTG (TinyUSB).

Goal: pot → gamepad trigger axis for a sim racing handbrake.

#include "USB.h"
#include "USBHIDGamepad.h"

USBHIDGamepad Gamepad;
const int potPin = 1;

void setup() {
pinMode(potPin, INPUT);
Gamepad.begin();
USB.begin();
}

void loop() {
int pot = analogRead(potPin);
int mapped = map(pot, 0, 4095, 0, 255);
Gamepad.rightTrigger(mapped);
delay(20);
}

Plugged into the native USB port, Device Manager only ever shows a USB Serial Device (usbser.inf), never anything HID. joy.cpl shows nothing. Same result with CDC On Boot on or off, different cable, different port, and swapping the begin() call order.

Anyone gotten USBHIDGamepad actually enumerating as HID on core 3.3.x on an S3? Trying to figure out if this is a known bug or something I'm missing.


r/arduino • • Sep 27 '26

Look what I made! I made a keyboard (kind of)

2 Upvotes

The esp32 ble library was deprecated, and my devlit v1 can't support usb devices, so I had to vibecode with Gemini to make a python bridge, and c++. It took me 2 days. How functional is it, out of 10? 0, am I proud of it, yes!


r/arduino • • Sep 27 '26

Hardware Help Servo Making Clicking Noise

Post image
4 Upvotes

Ive heard my servo motor make a clicking noise when the circuit is connected to a power source, I think that its just stalling (because i saw another post that had the same issue), I just wanted to ask what I can do to fix it, I am too scared to bust both the servo or the Arduino, though i have tried finding a power source that delivers more than 5V (ive been onsucessful on that), is it just a battery that y'all can recommend or is it something comepletely different?

Components:

- (Generic) Arduino UNO R3

-Breadboard (Medium)

-(Generic) Push Button

-Steren Servo motor (MOT-135, 4,5-6V=20 mA 10 kgf-cm @ 6V =)

Program (Just in case its that):

#include <Servo.h>

const int button = 13;

Servo jaw;

void setup() {

pinMode(button, INPUT);

jaw.attach(12);

}

void loop() {

while(digitalRead(button) == LOW){

jaw.write(0);

}

jaw.write(90);

delay(500);

jaw.write(0);

delay(500);

jaw.write(90);

}


r/arduino • • Sep 26 '26

Why doesn't pushing two buttons work as expected?

29 Upvotes

I'm trying to make a "piano" but since I only have 4 buttons I wanted my buzzer to make a different note when two buttons are being pushed at the same time but for some reason it makes no sound. Why is that?

Here is the code:

int buzzerPin = 8;
int button1 = 2;
int button2 = 3;
int button3 = 4;
int button4 = 5;
int buttonState1;
int buttonState2;
int buttonState3;
int buttonState4;


void setup() {
  pinMode(buzzerPin, OUTPUT);
  pinMode(button1, INPUT_PULLUP);
  pinMode(button2, INPUT_PULLUP);
  pinMode(button3, INPUT_PULLUP);
  pinMode(button4, INPUT_PULLUP);
  Serial.begin(9600);
}


void loop() {
  buttonState1 = digitalRead(button1);
  buttonState2 = digitalRead(button2);
  buttonState3 = digitalRead(button3);
  buttonState4 = digitalRead(button4);
  if(buttonState1 == LOW && buttonState2 == buttonState3 == buttonState4 == HIGH){
    tone(buzzerPin, 262); //Do
  }
  else if(buttonState2 == LOW && buttonState1 == buttonState3 == buttonState4 == HIGH){
    tone(buzzerPin, 294); //Re
  }
  else if(buttonState3 == LOW && buttonState1 == buttonState2 == buttonState4 == HIGH){
    tone(buzzerPin, 330); //Mi
  }
  else if(buttonState4 == LOW && buttonState1 == buttonState2 == buttonState3 == HIGH){
    tone(buzzerPin, 349); //Fa
  }
  else if(buttonState1 == buttonState2 == LOW && buttonState3 == buttonState4 == HIGH){
    tone(buzzerPin, 392); //Sol
  }
  else{
    noTone(buzzerPin);
  }
  Serial.print(buttonState1);
  Serial.print(buttonState2);
  Serial.print(buttonState3);
  Serial.println(buttonState4);
}

I checked if the buttons were working properly and they were.


r/arduino • • Sep 26 '26

Beginner's Project ACEBOTT QD020 Spider Robot: servos twitch/move but the robot won't walk official code/project included

Thumbnail
gallery
8 Upvotes

Hey everyone, I'm trying to get an ACEBOTT QD020 Quadruped Bionic Spider Robot V2.0 working.

The ESP8266 is connected and I've successfully uploaded code. The servos respond and twitch/move, but the spider doesn't actually perform the walking gait.

I'm using the official ACEBOTT tutorial package. I found the official ACECode project here:

English → ACECode(Beginner) → 2.ACECode Program → Lesson 8 → 8.1app_control.sb3

I also have the Arduino code from the official package. The walking routine contains the official Servo_Prg_2 forward sequence for all 8 servos.

Current situation:

ESP8266 connects successfully

Code uploads successfully

All/most servos respond

Servos twitch/move

Robot does not walk

I'm trying to use the official ACEBOTT software/code rather than modifying the gait randomly

The servo pins in the code are:

GPIO14, GPIO12, GPIO13, GPIO15, GPIO16, GPIO5, GPIO4, GPIO2

The code maps these to 8 servos.

What could cause a QD020 to move its servos but not execute the walking gait?

I'm especially interested in:

Whether the official QD020 servo mapping is correct

Whether the ESP8266 needs a specific firmware/project uploaded before the .sb3 app-control project works

Whether there is a specific ACEBOTT initialization/calibration procedure

Whether this sounds like a servo power/current problem

Whether the official Lesson 8 8.1app_control.sb3 is supposed to control the robot directly or whether another firmware needs to be flashed first

If anyone has successfully built the QD020, I'd really appreciate the exact steps you used to get the first forward movement working.

I can provide the complete official code, wiring, screenshots, and a video of what the servos are doing.


r/arduino • • Sep 27 '26

Not able to connect device to esp 32 DEVKITV1

Thumbnail
gallery
1 Upvotes

Every time I click add device it then says no device connected/ found. Currently running arduino cloud.


r/arduino • • Sep 25 '26

Getting Started My first steps

Post image
190 Upvotes

r/arduino • • Sep 25 '26

Look what I made! I built an Arduino-controlled mechanical flip clock with timer and stopwatch modes

1.8k Upvotes

I built this Arduino Pro Mini-powered flip clock as a prototype using six mechanical 7-segment flip displays.
It currently has three modes: a normal clock, a countdown timer, and a stopwatch. The rotary encoder is used to set the time and timer, and the buttons switch between the different modes.
The enclosure is still a rough 3D-printed prototype and I definitely want to clean up the design and wiring for the final version, but the main functionality is working now.
I’m also thinking about adding a few more features before I call it finished. Any ideas for things that would be useful or just fun to add?