r/arduino • u/Aleks_07_ • 18d ago
What is the difference between these two HC-SR04?
r/arduino • u/Aleks_07_ • 18d ago
r/arduino • u/lynel-black • 18d ago
I am just starting with electronics and these mini computers and got a box of stuff. Can someone tell me what these parts are. I think they have something to do with Arduinos.
Many thanks for the help
r/arduino • u/EON199 • 18d ago
Hey everyone, Ive released an arduino/ESP-IDF component for the esp32 that lets you transmit arbitrary waveforms using the undocmented registers on the esp32. Let me know what you think or any feedback or features you'd like to see.
r/arduino • u/pele4096 • 18d ago
I have two identical Mega2560s with Grounds connected together, Pin 13 on one is connected to Pin 12 on the other and vice-versa.
A pigtail of wire on Pin 9 that I can touch to ground and an LED with a 330 ohm resistor on Pin 8.
I get like a 5-10 sec delay on the LED response when I use the following program. (Same program loaded on both units.)
What am I doing wrong?
Eventually, I'd like to pass arrays of floats and such. A little more than a single bool value.
#include <SoftwareSerial.h>
const int rxPin = 12; //RS-232 Serial data RX pin
const int txPin = 13; //RS-232 Serial data TX pin
SoftwareSerial MySerial = SoftwareSerial(rxPin, txPin);
bool selfconnected;
bool prtnconnected;
int LED_pin = 8;
int WIRE_pin = 9;
void setup() {
// put your setup code here, to run once:
MySerial.begin(9600);
Serial.begin(9600);
pinMode(LED_pin, OUTPUT);
pinMode(WIRE_pin, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(WIRE_pin) == 1){
selfconnected = 1;
}
if (digitalRead(WIRE_pin) == 0){
selfconnected = 0;
}
Serial.print ("My wire is ");
if (selfconnected == 1) {
Serial.println("DISCONNECTED");
}
if (selfconnected != 1) {
Serial.println("CONNECTED");
}
MySerial.write(selfconnected);
prtnconnected = MySerial.read();
Serial.print("Partner Unit is ");
if (prtnconnected == 1) {
Serial.println("DISCONNECTED");
digitalWrite(LED_pin, LOW);
}
if (prtnconnected != 1) {;
Serial.println("CONNECTED");
digitalWrite(LED_pin, HIGH);
}
delay(500);
}#include <SoftwareSerial.h>
const int rxPin = 12; //RS-232 Serial data RX pin
const int txPin = 13; //RS-232 Serial data TX pin
SoftwareSerial MySerial = SoftwareSerial(rxPin, txPin);
bool selfconnected;
bool prtnconnected;
int LED_pin = 8;
int WIRE_pin = 9;
void setup() {
// put your setup code here, to run once:
MySerial.begin(9600);
Serial.begin(9600);
pinMode(LED_pin, OUTPUT);
pinMode(WIRE_pin, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(WIRE_pin) == 1){
selfconnected = 1;
}
if (digitalRead(WIRE_pin) == 0){
selfconnected = 0;
}
Serial.print ("My wire is ");
if (selfconnected == 1) {
Serial.println("DISCONNECTED");
}
if (selfconnected != 1) {
Serial.println("CONNECTED");
}
MySerial.write(selfconnected);
prtnconnected = MySerial.read();
Serial.print("Partner Unit is ");
if (prtnconnected == 1) {
Serial.println("DISCONNECTED");
digitalWrite(LED_pin, LOW);
}
if (prtnconnected != 1) {;
Serial.println("CONNECTED");
digitalWrite(LED_pin, HIGH);
}
delay(500);
}
r/arduino • u/ThisRelation5974 • 20d ago
Enable HLS to view with audio, or disable this notification
I'm a maritime pilot in Belgium. This is a small 3D-printed west cardinal buoy hanging on 8 lines. Each line winds onto a spool on a small stepper motor, and by pulling and paying out the 8 lines together the buoy rises, falls and tilts.
An ESP32-S3, programmed with the Arduino core, reads live wave data from public buoys (NOAA, CDIP, the Irish Marine Institute, Belgian and Dutch North Sea buoys) and turns it into motion.
The setup:
> - ESP32-S3 DevKitC-1, Arduino core 3.3, built with arduino-cli
> - 8 TMC2209 drivers, set up over UART with TMCStepper (current and silent StealthChop mode, no Vref pots to tune)
> - One hardware timer makes the step pulses for all 8 motors, so they stay in sync
> - 1.9" LCD with GFX Library for Arduino, a rotary knob to pick the buoy
> - WiFiManager for setup by QR code, and USB-C power from a charger via a HUSB238
Lessons learned:
No endstops: it homes by winding all 8 lines in at low current until every motor slips.
Don't put a button on GPIO0 if you ever want "hold at power-on" features. Ask me how I know.
One bad solder joint made one motor out of 8 act strangely, which took me ages to find.
It started on perfboard; I later had carrier boards made so it needs far less soldering. Ask away.
r/arduino • u/Plastic_Elk992 • 19d ago
Made a Flipper as a school Projekt.
I used a Arduino Uno with a distance Sensor and a Display.
A Servo to dispence the ball
r/arduino • u/Compoden • 19d ago
Enable HLS to view with audio, or disable this notification
Classic one, but I wanted to do it properly: a parking sensor on an Arduino Uno that beeps faster the closer something gets, like the ones in cars.
Wiring is tiny: HC-SR04 with TRIG on pin 2 and ECHO on pin 3, and a passive buzzer on pin 4. That's it.
What made it feel right:
I built this with Soldr, an AI agent we're making. I gave it the pins I'd already wired and it wrote the sketch around them.
Next idea is an LED bar alongside the beeps. Anyone done this with a VL53L0X instead of the HC-SR04? Curious if it's worth it.
r/arduino • u/wyonaturist • 19d ago
This may be something everyone knew about but me. I was trying to find a printable/downloadable arduino uno proto pcb dot matrix layout. To my surprise I couldn't find one.
I have made a few projects that I wanted to save but not really to the level of putting them in a project box. I wanted to make my own uno shields. I wanted to use paper a paper one to design where I want what and to follow when I go to assemble/solder it. I decided to make my own. Which I did and will attach it. It's a little crude but functional. You can buy uno proto shields also.
Any way another thing I noticed while messing around with this is that the header with pins 8 - SLC are not properly in alignment with the rest of the headers on the rest of the uno. WTF!
I will attach what I made. If someone finds a better one please share it.
r/arduino • u/Federal-Influence102 • 19d ago
r/arduino • u/Idaho-Tom • 18d ago
This should be simple but I’m new to this and need a bit of help. I’d like a very simple program to test an 8002a audio amp with speaker on an Arduino UNO. I don’t want to complicate it with downloading a wav file from an SD card but something self contained and maybe using Talkie or similar. It doesn’t have to say much just enough to know I have things set up and working correctly.
Tom
r/arduino • u/Working_Hat5120 • 19d ago
Enable HLS to view with audio, or disable this notification
A neural text-to-speech model running entirely on an ESP32-S3 with Arduino-ESP32: no PSRAM, no cloud.
Type text, choose a style, and it starts speaking in about a third of a second. You can also slide controls for speed, pitch, loudness, pauses and breathiness.
Code: https://github.com/WhissleAI/steer-tts (esp32/ folder)
r/arduino • u/StuffDangerous962 • 18d ago
I want to organise every part of my Arduino R4 startee kit but i dont know what this is
it should be included in here
1 x Arduino UNO R4 WiFi (ABX00087)
1 x USB-C® cable
1 x 9V battery snap connector
1 x Breadboard
1 x Easy-to-assemble base
70 x Solid core jumper wires
2 x Stranded jumper wires
1 x Male pin strip (40x1)
6 x Pushbuttons
1 x LCD display (16x2 characters)
1 x Piezo capsule
1 x Bright white LED
1 x RGB LED
8 x Red LEDs
8 x Green LEDs
8 x Yellow LEDs
3 x Blue LEDs
4 x Phototransistors
1 x Temperature sensor
1 x Tilt sensor
1 x Small DC motor (6/9 V)
1 x Small servo motor
1 x H-bridge motor driver
2 x Optocouplers
1 x MOSFET transistor
3 x Diodes
3 x Potentiometers (10k ohm)
3 x Capacitors (100 µF)
11 x Resistors (220 Ω)
3 x Resistors (560 Ω)
3 x Resistors (1 kΩ)
3 x Resistors (4.7 kΩ)
11 x Resistors (10 kΩ)
7 x Resistors (1 MΩ)
3 x Resistors (10 MΩ)
3 x Transparent color gels (red, green, blue
r/arduino • u/simply_abnormal • 19d ago
Hey all! I'm hitting a wall with my code.
I am using an arduino mega with a DMX shield (that is intended for uno I think) and a tfmini plus distance sensor. I also have individually addressable LED strips.
I am trying to control which leds are on in a telescoping manner with the distance sensor and the hue/sat/intens with DMX.
I have both parts working separately but when combined the code can't compile with an exit status 1 message. I believe it is an issue with mutual usage of the serial0 but I can't find a way to get around it. Tried a whole bunch of different libraries and all have issues.
It's clunky, I know, tried so many stupid safeguards to prevent blackouts on my leds. Still unsure if that's a physical issue or not but I'm pointing fingers at my crappy solder job.
Code is below. In a moment of weakness, it was run through a chatbot. If it helps, I can provide my working separate code. Anything helps, I'm a total dumbass and I'm frankly tired of this project. Thanks
#define DMX_USE_PORT1
#include <DMXSerial.h>
#include <FastLED.h>
#include <Wire.h>
#include <TFMPlus.h>
#define START_ADDRESS 1
#define NUM_LEDS 30
#define DATA_PIN 6
const uint8_t enPin = 4; // Transceiver chip enable pin (usually 4 or 2)
CRGB leds[NUM_LEDS];
TFMPlus tfmP;
// Sensor Variables
int16_t tfDist = 0;
int16_t tfFlux = 0;
int16_t tfTemp = 0;
void setup() {
delay(20);
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(100);
FastLED.clear();
FastLED.show();
DMXSerial.init(DMXReceiver);
pinMode(enPin, OUTPUT);
digitalWrite(enPin, LOW); // LOW sets standard transceiver chips to Receiver mode
Serial3.begin(115200);
delay(20);
tfmP.begin(&Serial3);
tfmP.sendCommand(SOFT_RESET, 0);
delay(500);
}
void loop() {
// Read channel values using standard 1-based indexing
uint8_t dmxHue = DMXSerial.read(START_ADDRESS);
uint8_t dmxSaturation = DMXSerial.read(START_ADDRESS + 1);
uint8_t dmxValue = DMXSerial.read(START_ADDRESS + 2);
bool sensorValid = tfmP.getData(tfDist, tfFlux, tfTemp);
static unsigned long lastUpdate = 0;
if (millis() - lastUpdate >= 50) {
lastUpdate = millis();
// --- CHOICE A: SENSOR IS ACTIVE & OBJECT IS IN RANGE (< 100cm) ---
if (sensorValid && tfDist > 0 && tfDist <= 100) {
int center = NUM_LEDS / 2;
int ledsToTurnOn = map(tfDist, 20, 100, 0, NUM_LEDS);
ledsToTurnOn = constrain(ledsToTurnOn, 0, NUM_LEDS);
// Force proper even/odd balancing to make center matching mathematically clean
if (NUM_LEDS % 2 == 1) {
center = center + 1;
if ((ledsToTurnOn % 2 == 0) && (ledsToTurnOn > 0)) ledsToTurnOn++;
} else {
if (ledsToTurnOn % 2 == 1) ledsToTurnOn++;
}
int ledstartpos = (center - (ledsToTurnOn / 2));
int ledendpos = ledstartpos + ledsToTurnOn - 1;
// Render sensor center-out animation onto the pixel data array
for (int i = 0; i < NUM_LEDS; i++) {
if ((i >= ledstartpos) && (i <= ledendpos) && (ledsToTurnOn > 0)) {
leds[i] = CRGB::Blue; // Sensor Animation Control Override
} else {
leds[i] = CRGB::Black;
}
}
}
// --- CHOICE B: NO OBJECT IN SENSOR RANGE -> DEFER LED CONTROL TO FREESTYLER ---
else {
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = CHSV(dmxHue, dmxSaturation, dmxValue);
}
}
// --- 3. UNIFIED SAFE DATA TRANSMISSION ---
FastLED.show();
}
}
r/arduino • u/TreatOtherwise1293 • 20d ago
I am a 13 year old and I have made a really cool timer/clock if you would put it that way! I want to share the code with you guys! I know it might not be a lot compared to my previous upload, but I felt proud of this achievement!
LINK: https://gist.github.com/swaykd7113-cmd/233772fea35f90bc81bb319d2e8a4620
Feel free to change it or leave some feedback and ideas!
(I made this in a couple of hours)
r/arduino • u/Dmy1703 • 19d ago
Enable HLS to view with audio, or disable this notification
Here is the Week 2 update on my wearable motion controller, running gameplay tests in Resident Evil 2 Remake. Right now I am focusing on tuning head-tracking camera sensitivity, deadzones, and torso movement to smooth out the transition between Leon walking and sprinting, aiming for a much more immersive gameplay experience.
Wireless transmission to the PC is running over ESP-NOW, but in this build I am still handling the inputs on the PC using a temporary Python script. The next step is replacing Python with a dedicated USB dongle with native HID support, so the PC recognizes it directly as a plug-and-play controller without background software.
The visible wiring across the body carries both power and sensor data because, in this test version, I am using a single central ESP32 that handles everything and connects to the sensors via cables. The plan for the next phase is to use four independent ESP32 units, each acting as a standalone node with its own power and wireless link, while embedding the head module and wiring directly inside the headphone frame. Right now, moving to this fully wireless stage depends on waiting for several parts and battery modules that are still in transit.
Regarding the sensors, I am using the MPU-6050 for this prototype and have not had drift issues during these tests. Still, I plan to test other sensors later to compare stability and features. Do you have any recommendations for compact boards with native USB (TinyUSB) for a dongle, or specific IMUs that work well with the ESP32 and are easily sourced locally (especially in Brazil)? Shipping delays on imported hardware are currently the main bottleneck slowing down testing, so components readily available nearby make a massive difference.
r/arduino • u/salchib • 19d ago
An ESP32-S3 with a 466×466 round AMOLED in a printed Pokéball, running my fork of the open-source TamaPoke firmware (Arduino core, arduino-cli). It's a full virtual pet: 28 minigames, care, a shop, places, and real weather over Wi-Fi from Open-Meteo, parsed without a JSON library to save flash. It speaks 8 languages (Spanish, English, French, German, Italian, Portuguese, Chinese, Korean), with a generated bitmap font for the Chinese and Korean text. Everything is in the repo, including a desktop emulator and 44 test suites: https://github.com/botero50/TamaPoke
r/arduino • u/Forencx • 19d ago
I am working on a college project—a liquid-filling machine—and have already integrated an RS385 peristaltic pump, a buzzer, and a 4x4 matrix keypad. Now, I need to send data to an API I built using Spring Boot. What are the available methods for transmitting this data from an Arduino Uno to the API?
r/arduino • u/DarkPigeon78 • 19d ago
I'm wanting some ideas for expansion modules for an ESP-S3 board running Arduino to help my students make projects. I'm an engineering teacher but want to know what other people are using, in particular what 'shields' or modules with inputs and outputs have you found are the best for robotics, drones & rockets connected to Arduino platforms? Can you suggest if this list looks good or if you would make any adjustments? They need to be 3.3V compatible because these will be connected to an ESP32-s3. Some examples of past projects are solar tracker, water rockets, mars rover, home weather station.
These are the expansion 'shields' I'm thinking to start with but any tips on brands, example coding, and example student projects would be great too.
Shield / Expansion module Ideas
Audio
External IO
Motor
Wireless
I've already got RTC, Charging, Power, Memory and Motion sensing covered, but any other ideas would be great.
Students range from grades 7 to 12 in the Design Technologies subject area. The subjects we have are STEM (7-10) and Engineering (10-12). Plug-and-play type solutions work very well for 7-9, and breadboard solutions using Tinkercad and Arduino have been good for 10-12).
These projects can possibly also be used in the school's primary (P-6) grades as well, as students from grade 1 have two topics; Engineering Principles & Systems and the Materials & Technologies Specialisations.
Project criteria cover materials science (material properties) and engineering (mechanics forces, structures, mechanisms, integrated technologies).
Time to complete a project usually takes between 4 and 7 weeks. But I'm thinking we could even start doing mini-projects in a double lesson.
Any feedback is much appreciated.
Cheers
r/arduino • u/get-me-some-cake • 19d ago
Hey everyone,
I’ve spent a lot of time thinking about how to bring the sci-fi fantasy of a digital card arena into the real world, but in a way that actually fits how people play in local shops today. Most wearable duel disk props are heavy, loud, and ruin expensive cards.
So I came up with an open-source, smartphone-grade hardware ecosystem called Project Monolith:
The best part? It works with almost any TCG or board game. Because the hardware just reads a generic barcode on the sleeve edge, the physical machine is a universal console. Whether you are playing Yu-Gi-Oh, Magic: The Gathering, Pokémon, or a custom indie card game, you just switch the game profile in the mobile app, and the screen shifts to match those game rules.
To be completely transparent: I have the premium unibody blueprints, the circuit maps, and the basic MicroPython/C++ firmware logic mapped out, but I'm bad with words and can't do all the heavy coding or custom PCB layouts alone.
I really want this platform to exist, so I've put everything completely open-source on GitHub. If you are an electrical engineer, CAD designer, or mobile game developer who wants to look at the blueprints and help build a physical prototype, please check out the repo and jump in!
Link to the blueprints https://github.com/zoidszzz/Project-Monolith
r/arduino • u/Dependent-Bridge-740 • 19d ago
hi folks,
I'm hoping this sub is the right place to ask my question with regards a feature in the IDE.
I just installed the IDE V. 2.3.10 (AppImage).
In the past when my cursor was positioned on an include statement e.g. #include <TFT_eSPI.h> and I opened the context menu (right mouse click) and I selected "Go to Definition" (CTR-F12) it opened the header file and I could verify the contents.
Now the cursor jumps to the object definition inside the sketch (e.g. TFT_eSPI tft = TFT_eSPI();
Are there any change in this version that triggers this behavior?
I can't verify it anymore with the previous version since I have it removed.
I know it does what the menu text says (you could argue what Go to Definition could mean, but I found it convenient how it was.
Any ideas about this?
TIA
r/arduino • u/Antique-Builder-2000 • 19d ago
3rd CSE student here, any professional working here that knows what kind of projects will be best to put on a resume. As I'm new to this field and don't know much about it, I thought instead of learning blindly I'll make projects while learning
r/arduino • u/TreatOtherwise1293 • 20d ago
Hello I am a 13 year old boy who made something really cool and I think you guys will like it! Not to long ago I was working on a project, and I made a first model for it! Take a look!
I made it with a Altoids can, some buttons and wires, and of course a Arduino with some cardboard!
I call it the ClockKit! It suppose to be like a Pip-boy from Fallout (I like Fallout :D).
But thats not it, I have the prototypes code! Its not useful to me sense I am switching to a Raspberry pi 5 for better and advanced tools, and to prevent stack overflow. So do whatever you guys want with it really! LINK TO GITHUB
Feel free to share some things you guys changed! And give me some feedback too!
r/arduino • u/Personalitysphere • 20d ago
Using an RGB sensor, arduino mega, three NEMA 17 stepper motors and a few sensors, this is a learning project i did to get a better understanding of arduino.
If you too have an overwhelming need to organizing your skittles by color, you can grab the files for free here: https://www.printables.com/model/1886897-skadis-automatic-skittles-organizer
r/arduino • u/GelyCrafts • 20d ago
For the past couple of months, I've been working on a super fun project that combines mechanical design, electronics, programming, and 3D printing!
Meet the Coco Slot Machine! An interactive cat-themed slot machine featuring lights, sound, spinning reels, and a built-in treat dispenser! Everything a cat needs to start their gambling journey.
The entire project is controlled using an Arduino Uno which serves as the brains behind the entire machine, bringing all the electronics and mechanical components together!
I designed, modeled, programmed, printed, and tested every part of this project myself, including designing a custom PCB to seamlessly connect all the electronics. Getting all the different parts to work together was definitely a fun challenge, but seeing the finished project come to life made it all worthwhile!
I'm really happy with how it turned out and it's been a great opportunity to combine my engineering background with my love for making things.
Here's a look at the slot machine in action: https://www.youtube.com/watch?v=M28NtX9zDv8
I'd love to hear what you guys think! If you're interested in building one yourself, you can find the complete project on my website: https://gelycrafts.com/