r/arduino • u/umberto_pagano • 2d ago
Look what I made! I made this Cocktail Machine with Arduino
I hope you like it!
r/arduino • u/umberto_pagano • 2d ago
I hope you like it!
r/arduino • u/Direct_Tank_3263 • 2d ago
Does it look like it's in the right place?
Red LED
Long leg A10
Short leg A15
330Ω resistor B5 to B10
Red wire Arduino D13 to A5
Brown wire B15 to the 12th hole on the negative
Green LED
Long leg E25
Short leg E28
resistor E20 to D25
Green wire Arduino D12 to D20
Black wire D28 to the 10th hole on the negative
r/arduino • u/Vast-Speaker791 • 2d ago
Im sorry in advance, Im way out of my depth here, im just an X-ray student that had to build some type of circuit related to xray physics for a project due this Thursday.
Im having a hard time getting my lock to move. The pushbutton works, the batteries work, and I can feel the spring inside the lock moving when I press the push button. However the lock doesn’t depress on its own without putting pressure on it first. It only needs light pressure, such as lightly holding a finger on top of it while you press the push button. I thought it could be a problem with the lock, so I bought a new one, but it works even worse. So I bought two more locks of different brands, and these don’t even move at all. So then I thought maybe the circuit needs more power? I plugged an additional 9V battery in, but that still didn’t work.
I have 2 9V batteries, a 12V/1A pushbutton, and a 12V/.43A battery attached. I also tried a 12V/.83A battery.
Any help is greatly appreciated. TIA!
r/arduino • u/MetisAdam • 2d ago
This is a pretty simple process if you have mess with them before, do beware that some have sealed hole.
Just connect the 2nd or the 3th pin to the your MCU digital pin, and make sure to use high value resistor like 1M ohm or somthing, my arduino crash if i connect it raw, and your may too, even death is possible.
I wasnt able to find that fan hall effect latch data sheat, but i figure they are the same anyway.
My fan hall effect latch, output high at 180 and 360, so the my code divide it by 2.
Doing some coding and thats it.
I did check it accuratecy using slowmo, they spit out the same number so that good enough.
Mine is in RPS but converting it to RPM is easy.
Serial.println(((fan1_rotation_accumulate / 2.0) / measure_time), 1); //rps
Serial.println(((fan1_rotation_accumulate / 2.0) / measure_time) * 60.0, 1);//rpm
//THIS ONE IS THE LATER CODE SNIPPET
//THE WHOLE CODE IS BELOW
static uint16_t fan1_rotation_accumulate = 0;
static unsigned long start;
static unsigned long end;
static float measure_time = 5; // rps every second
static bool fan1_high_flag = false;
static bool start_high_flag = false;
//fixed time acumulation
// edit: i made i small improvement to this code after posting, by adding an extras if statement,
// this make the ouputed data very consistant, but it resolution is tide to how long the time window you're measuring
if (digitalRead(2) == LOW || start_high_flag == true) { //start as soon as it pass the hall effect and turning low. Not sure why it only output rounded number
start_high_flag = true;
if (digitalRead(2) == HIGH) {
start_high_flag = false;
start = micros();
while (1) {
if (digitalRead(2) == HIGH) {
if (fan1_high_flag == false) {
fan1_high_flag = true;
fan1_rotation_accumulate++;
}
} else {
fan1_high_flag = false;
}
end = micros();
if ((end - start) / 1000000.0 >= measure_time) {
Serial.print("fan_1:");
Serial.println((fan1_rotation_accumulate / 2.0) / measure_time, 2); //rps
fan1_rotation_accumulate = 0;
break;
}
}
}
}
//THE WHOLE CODE
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
pinMode(3, INPUT);
}
void loop() {
static uint16_t fan1_rotation_accumulate = 0;
static uint16_t fan2_rotation_accumulate = 0;
static unsigned long start;
static unsigned long end;
static float measure_time = 1; // rps every second
static bool fan1_high_flag = false;
static bool fan2_high_flag = false;
/*
//fixed time acumulation
start = micros();
while (1) {
//fan 1
if (digitalRead(2) == HIGH) {
if (fan1_high_flag == false) {
fan1_high_flag = true;
fan1_rotation_accumulate++;
}
} else {
fan1_high_flag = false;
}
//fan 2
if (digitalRead(3) == HIGH) {
if (fan2_high_flag == false) {
fan2_high_flag = true;
fan2_rotation_accumulate++;
}
} else {
fan2_high_flag = false;
}
end = micros();
if ((end - start) / 1000000.0 >= measure_time) {
Serial.print("fan_1:");
Serial.println(((fan1_rotation_accumulate / 2.0) / measure_time), 1); //rps
// Serial.println(((fan1_rotation_accumulate / 2.0) / measure_time) * 60.0, 1);//rpm
fan1_rotation_accumulate = 0;
Serial.print("fan_2:");
Serial.println(((fan2_rotation_accumulate / 2.0) / measure_time), 1);
fan2_rotation_accumulate = 0;
break;
}
}
*/
//avg by time
// fit for stable ouput
// instead of waiting 60s to see result, you can see the result get more narrowed down with time
// run longer time frame by changing the time_frame measuring window
// it wont be good for fast changing rpm
static uint8_t acum_time = 1;
static uint8_t time_frame = 60; //in second
start = micros();
while (1) {
//fan 1
if (digitalRead(2) == HIGH) {
if (fan1_high_flag == false) {
fan1_high_flag = true;
fan1_rotation_accumulate++;
}
} else {
fan1_high_flag = false;
}
//fan 2
if (digitalRead(3) == HIGH) {
if (fan2_high_flag == false) {
fan2_high_flag = true;
fan2_rotation_accumulate++;
}
} else {
fan2_high_flag = false;
}
end = micros();
if ((end - start) / 1000000.0 >= measure_time) {
//Serial.println(acum_time);
Serial.print("fan_1:");
Serial.println(((fan1_rotation_accumulate / 2.0) / (measure_time * acum_time)), 2);
Serial.print("fan_2:");
Serial.println(((fan2_rotation_accumulate / 2.0) / (measure_time * acum_time)), 2);
acum_time++;
if (acum_time >= time_frame) {
fan1_rotation_accumulate = 0;
fan2_rotation_accumulate = 0;
acum_time = 1;
}
break;
}
}
}r/arduino • u/bruce2205 • 2d ago
FFT class to take different sizes eg 128, 64, 32, 16, 8 bins.
Speeds: 128: 6.1ms, 64: 2.7ms, 32: 1.12ms.
r/arduino • u/RoberBotz • 3d ago
It does't work that well cuz I used very cheap components but still. :))
It can simulate mouse movement and some kind of edge scrolling, when the pointer leaves an imaginary circle it keeps going, then simulate clicks and some keyboard presses.
Overall I should have used an esp instead of arduino or make use of a wifi module with arduino and make use of the wifi instead of using a very cheap radio transmiter.
And I should have used more accelerometer/gyroscopes, the more expensive ones for better precision, and so I can have more ways to detect and calculate input.
The glove has one arduino nano, one radio transmiter, one accelrometer gyrscope, the usb dongle has one arduino micro pro and a radio receiver.
Sharing a quick 25-minute breadboard holiday build for anyone looking for a simple weekend project with an Arduino UNO and a strip of addressable LEDs.
Parts used:
Wiring:
The one trap beginners hit: do not power 30 LEDs straight from the Arduino's 5 V pin. At full white each pixel can pull around 60 mA (up to 1.8 A total), which will brown out or overheat the board. Giving the strip its own 5 V supply and tying grounds together keeps everything rock solid.
Starter sketch (using the FastLED library):
#include <FastLED.h>
#define DATA_PIN 6
#define NUM_LEDS 30
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(80);
}
void loop() {
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = (i % 2 == 0) ? CRGB::Red : CRGB::Green;
}
FastLED.show();
delay(600);
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = (i % 2 == 0) ? CRGB::Green : CRGB::Red;
}
FastLED.show();
delay(600);
}If you want a printable wiring diagram and live supplier pricing for the parts list, the full step-by-step guide is here: https://usefootprint.app/projects/ws2812b-neopixel-strip?utm_source=reddit&utm_medium=post&utm_campaign=reddit&utm_content=arduino_neopixel
r/arduino • u/Due-Calligrapher2681 • 2d ago
just trying to set up an home lab for the penetration testing and network security stuff is anyone has and idea to download the external packages from apt like n-map to download in the Arduino-OS
r/arduino • u/RollTide_1717 • 2d ago
Hey all, looking for a bit of help and direction. Making a button box for sim racing. Pretty basic and just emulates ignition wipers lights.
- it has 4 toggles and 1 button all led and using vcc on the board for power
- The left most toggle controls the button. Meaning when it is off the button is off. When on ignition turns on. Then pressing the button will start the car.
- the other toggles will be off or on. And just be used to control lights or wipers in the game.
As the game uses key presses I’m unsure if I should be using the keyboard library or joystick library.
Can someone help point me in the right direction on the correct way to go library wise, maybe a basic toggle example
r/arduino • u/TemporaryFly5737 • 3d ago
So ive been working on this for a day now and got a prototype and eventually am going to 3d print a frame and desing a pcb,yall got any other ideas that i should add to it
r/arduino • u/stillnotfamous14 • 2d ago
I built a very simple system with a momentary switch that activates a linear actuator, which then goes through a sequence of motions (hence the Arduino instead of a simple switch).
My main loop has a variable that tracks the previous status of the switch and then I assign a digitalRead() to a second variable. By comparing the digitalRead to the previous status, the code only responds once to status changes (I don't know how long the user will hold the button down).
It worked, but had unexpected problems - the actuator would only complete part of its sequence and then branch into other parts or re-start its sequence. I figured the mechanical switch was bouncing or something like that, so I added in delays and so forth, but nothing solved the problem.
To try to figure it out, I added a print statement immediately after where I assign the digitalRead() status so I could see what status was being read. This was just a debug attempt, but it completely solved the problem and everything worked properly. I thought that was a coincidence, I must have made some other change somewhere so when everything was working properly, I commented out the print statement, and the timing problems came back.
I tried other variations like just doing a second digitalRead() after the first one (without printing anything) and assigning the second digitalRead() to a dummy variable, but none of those fixed the problem; the print statement seemed to clear some buffer or something.
Can anyone explain this, or is there a better way to fix the problem? Thanks.
void loop() {
buttonPush = digitalRead(buttonPin);
Serial.println(digitalRead(buttonPin)); <--- This is the debug line that fixed everything
if (buttonPush == HIGH && buttonState == LOW) { // Button released
// Go through button release sequence
}
r/arduino • u/HistoricalYam7322 • 3d ago
Hi all! This is Kevin – an old Android phone that spent years in a drawer. Now he's getting a second life.
The plan: build a small rover around the phone and send it 3.9 km across fields and dirt roads to the next village here in Slovakia. Alone.
Current parts:
- old smartphone (brain, camera, face)
- Arduino
- 4x yellow TT gear motors + wheels
- motor driver
- power: the phone's own battery + a power bank
Big unknowns so far:
- will the power bank last for a 4 km trip
- how the motors will handle mud and grass
- how the phone should talk to the Arduino (USB OTG vs Bluetooth)
What would you change before I start building? Any tips for driving through fields with TT motors are very welcome 🙏
I'll post updates as Kevin progresses.
YouTube: https://youtube.com/@kevintherover
Website: www.kevintherover.com
r/arduino • u/C4LORINE • 3d ago
r/arduino • u/Murky-Drawer-8270 • 3d ago
hi guys, second year cs student here. we are trying to make a maze solving line tracking robot using an arduino uno r3 and a l293d microcontroller. heres the maze we need to traverse through:

the main challenge here is how to prioritise the robot so it does the specified action we need it to, ie keep going forward, go right/left, hit the obstacle outside. we are using 5 IR sensors, for front, left, right, and 2 to keep the bot on the line. the qs is, to keep wall sensing the first priority then the line tracking as second, how many more sensors will be required, how will the sensors be mounted, ie downward facing or facing the wall, and is it optimal to use a simple if/else system for the turns or a FSM to determine which action to take at a particular junction?
r/arduino • u/VlrmPrjct • 3d ago
The installed Arduino (CLI) Univere is a f******* mess and far away from 'Keep It Simple'.
Quick inventory of my machine because its running out of space.
AppData\Local\Arduino15: cores, download cache, indexes. Shared by IDE 1.8, IDE 2 and arduino-cli, so of course they step on each otherDocuments\Arduino\libraries: libs. Not next to the cores. Why would they beAppData\Roaming\arduino-ide: IDE 2 settings, a browser cache, and an arduino-cli.yaml (+ .bak)~\.arduinoIDE: another IDE 2 folder. Just becauseAppData\Roaming\Arduino IDE: a log file for every day I dared to open it since 2024~\.platformio: its own toolchains, its own libs, its own universeAnd where does all of this live? Not in a directory you picked. 20GB buried in AppData, hidden by default, somewhere you'd never look. Your user profile just quietly grows. Disk cleanup won't touch it. Backup tools happily copy it every night.
Result: the same core several times at ~1.5 GB each, two versions of a library fighting over which one gets picked, and a sketch that compiles in one tool and dies in the other.
New PC? Good luck. Backing up "your Arduino setup"? Which one?
All I want is one folder. Boards, libs, config. Copy it, zip it, done.
Is it just me, or does everyone have an Arduino-old-DONT-DELETE lying around?
r/arduino • u/bruce2205 • 3d ago
lsdx is a standalone, single-chip HF SSB/CW transceiver built on the LGT8F328P (32 MHz LQFP48 Nano board). By exploiting the LGT8F328P's hardware DSP unit (uDSU FMACSS instructions) and 12-bit ADC, lsdx runs both a quadrature phasing SDR receiver and a polar Envelope Elimination and Restoration (EER) SSB exciter on an 8-bit microcontroller with only 2 KB of SRAM.
dsu_mag() / dsu_atan2() polar conversion, 125 kHz fast PWM envelope output (OC2B), and direct 40-bit phase/frequency modulation of an AD9850 DDS.Dual Synthesizer Architecture:
CLK0 / CLK1 90° phase offset) across 100 kHz – 30 MHz.PCF8574) with S-meter / TX envelope bargraph (updates 1 character per loop pass so audio DSP never stutters).Putting the code up for anyone interested in cheap SDR but the filters an math library might be useful for music or motor control.
Will put some pics up when progress from breadboard to pcb.
r/arduino • u/Top-Judgment-8089 • 3d ago
Hello i have a project due next week for arduino, they require me to include a servo motor and add another component to the project. They mostly evaluate the coding. I have an idea in mind but im just wondering if this is possible. I am not experienced enough with arduino yet and do not have enough time to test the components and play with the coding. ive only done a blinking led project so far.
So what i had in mind was to include a joystick to control the movement of the servo and add a potentiometer to control the speeding rotation. Is it possible to control the speed of the potentiometer? Im not sure of the limits of what u can do on arduino. Ive seen cases where people were able to control the movement of the servo with a joystick and a potentiometer but not both together that serve a different purpose each.
Edit: I end up changing my project, my project will only include a servo, a buzzer, and a sensor HC SR04. Thank you for the help and responses, I will definitely consider them for future reference
r/arduino • u/Direct_Tank_3263 • 4d ago
If I place an IR break beam sensor below the end of the water tube and adjust the flow regulator so that the water falls in drops will the sensor be able to detect and count each drop accurately?
++ what would be the best way to attach both the transmitter and receiver to the metal ring of this stand knowing that they need to be perfectly aligned and at the same height?
(((Sorry if this is a dumb question it’s my first Arduino project and I’m just worried if I might mess something up ))
r/arduino • u/zandrew • 4d ago
I'm looking for some kind of a screw terminal for this. Just wondering what size I should buy.
r/arduino • u/joy_2001 • 4d ago
Yes, I built another esp32 oscilloscope. I started this project partly out of necessity, cuz I can't afford a bench scope, yet, and procuring a good used scope is also a pain where I live (also I didn't look up the numerous projects that already existed, till after I already started working on this :p), but this was a great learning experience.
Disclaimer:
What it is: flash the firmware from the web page (no toolchain), open the scope page in Chrome/Edge, and your ESP32 becomes a scope.
Limits:
r/arduino • u/Effective-Meeting-70 • 4d ago
Yeah it was hard but it's cool as it's a big step for me. Ignore my parents btw 😭
r/arduino • u/Weekly-Ad2984 • 5d ago
I have been building and learning arduino for about 2 weeks now and this is my most complex project so far
Yes its ugly and unpolished but it works
Its a radar system with a ultrasonic sensor
Its a 2 esp 8266's setup
Esp 1 serves as a power supply for the joystick module and the sensor and also the control for the servo
All the code is on esp 1
And the esp2 i used as a power supply for the servo
I cheaped out on the interface because i didnt wanna waste time on it cuz i thought the project wouldn't work so i used ai
I used
long duration = pulseIn(echoPin, HIGH, 3000);
To make it detect how far the object is
As a start i set the max to 15cm
I also made it make its own network to which when you connect snd go to a web adress it takes you to the interface
r/arduino • u/Donalini • 5d ago
I wanted a simple, reliable way to monitor water pressure for the cows from my computer without having to go down and physically check the gauge. So a few youtube videos later I put together this dedicated point-to-point wireless gauge which is plug and play.
Needs tare/calibration tweak before going into the field and think i might put the gauge in a proper IP rated case but proof of concept works fantastically.
What does everyone think?
r/arduino • u/Joe_Scotto • 5d ago
This is the ScottoMIDI, a 2-octave keyboard with 8 drum pads and transport controls. It's completely handwired and uses Akko Fairy Silents for the instrument clusters then Kailh Box Jades for the other controls.
All the files to build it are available for free along with about 40 other boards I've designed over the years. I also make videos on these projects and have one coming out today on this one over on my YouTube channel.
If you have any questions, please feel free to ask... I love talking about my projects!
Disclaimer: I've been told RP2040 is fine here since you can program it with the Arduino IDE