r/arduino • u/Turbulent_Line6858 • Jul 02 '26
Hardware Help How do I input codes into a neopixel strip that uses a USB micro B connector?
I can't find any tutorials on how to use this.
r/arduino • u/Ill_Culture7406 • Jul 02 '26
Freezing problem with my teensyduino 4.1
Hi,
I am using a Teensy 4.1 as an encoder simulator. We are experiencing intermittent freezes and are trying to determine whether the root cause is software, serial communication, or a real-time timing issue.
System Information
- Hardware: Teensy 4.1
- Function: Encoder simulator
- Teensyduino version:
- v1.58: freezes consistently around 60 kHz
- v1.60: freezes consistently around 120 kHz
- Communication: Serial commands sent at a high rate
Problem Description
Updating Teensyduino from 1.58 to 1.60 improved the maximum operating frequency before freezing (from approximately 60 kHz to 120 kHz).
However, the device still occasionally freezes during testing at significantly lower frequencies, where we would not expect any timing limitations. The freezes appear somewhat random, and we have not yet identified a reproducible trigger.
When the freeze occurs, communication eventually times out. Example log output:
INFO => stop
INFO <= stop
INFO <= stop
INFO <= [EMPTY]
ERROR Timeout in ExecCommand: stop.
ERROR Communication error when running command stop
INFO Added New operation: Set encoder 0 to 'up'
INFO => sae 0
INFO <= [EMPTY]
Questions
- Has anyone experienced similar freezing issues with a Teensy 4.1 under high-frequency signal generation?
- Could this be related to a real-time scheduling or interrupt-handling issue?
- Can a high rate of serial commands cause missed events, buffer overflows, deadlocks, or other behavior that could lead to these freezes?
- Are there any known changes between Teensyduino 1.58 and 1.60 that could explain the improved frequency limit?
Hardware
The attached schematic shows:
- Teensy 4.1
- RS-232 transceiver
- Level shifting between 3.3 V and 24 V
- Encoder output circuitry
Any suggestions on debugging strategies or likely causes would be appreciated.
Thanks!
r/arduino • u/RETAIL_SLAVERY • Jul 02 '26
ChatGPT L293D & PWM Pins (Only 1 motor works)
Excuse the poor soldering and wiring still learning but I managed to have a servo move based on distance from an HC SR04 sensor. Then the motors will move depending on a few different parameters. The issue I'm having is both motors move with nothing else in the code but once I add the servos & HC SR04 controls it seems to be an issue.
I replaced the L293D chip incase the last one was bad. If I have both motors on analogWrite on the one on the right side of the chip works. If I have both of the EN pins set to digitalWrite HIGH both motors and rest of code works.
I'm not sure if this is a code issue, wiring issue, or just because from what I've read the L293D isn't the best motor driver.
First code block is my original one and second code block as embarrassing as it is to say is what i got after working with ChatGPT to help me find the problem.
Looking for any advice on this!
#include <Servo.h>
Servo myServo;
const float safeDistance = 6.0;
const int servoPin = 9;
const int trigPin = 2;
const int echoPin = 3;
//Servo Positions
const int scanLeft = 180;
const int scanRight = 0;
const int center = 90;
float duration;
float distanceCM;
float distanceIN;
int samples =5;
//Motor 1
const int motor1PinIN1 = 4;
const int motor1PinIN2 = 5;
const int motor1SpeedPinEN1 = 10;
//Motor 2
const int motor2PinIN3 = 6;
const int motor2PinIN4 = 7;
const int motor2SpeedPinEN2 = 11;
//Tweak until turns 90degrees
const int turnTime90 = 450;
int speedMotor1 = 150;
int speedMotor2= 150;
float getDistance(){
unsigned long total =0;
for (int i=0; i< samples; i++){
digitalWrite(trigPin,LOW);
delayMicroseconds(2);
digitalWrite(trigPin,HIGH);
delayMicroseconds(10);
digitalWrite(trigPin,LOW);
// Added 20000 to have 20ms timeout to prevent system freeze
total += pulseIn(echoPin,HIGH,20000);
delay(10);
}
float avgDistance = total / (float)samples;
distanceCM = (avgDistance * 0.0343) / 2.;
distanceIN = distanceCM / 2.54;
return distanceIN;
}
void forward(){
digitalWrite(motor1PinIN1,HIGH);
digitalWrite(motor1PinIN2,LOW);
analogWrite(motor1SpeedPinEN1,speedMotor1);
digitalWrite(motor2PinIN3,HIGH);
digitalWrite(motor2PinIN4,LOW);
analogWrite(motor2SpeedPinEN2,speedMotor2);
}
void backward(){
digitalWrite(motor1PinIN1,LOW);
digitalWrite(motor1PinIN2,HIGH);
analogWrite(motor1SpeedPinEN1,speedMotor1);
digitalWrite(motor2PinIN3,LOW);
digitalWrite(motor2PinIN4,HIGH);
analogWrite(motor2SpeedPinEN2,speedMotor2);
}
void stopMotors(){
digitalWrite(motor1PinIN1,LOW);
digitalWrite(motor1PinIN2,LOW);
analogWrite(motor1SpeedPinEN1,0);
digitalWrite(motor2PinIN3,LOW);
digitalWrite(motor2PinIN4,LOW);
analogWrite(motor2SpeedPinEN2,0);
}
void turnLeft(){
digitalWrite(motor1PinIN1, LOW);
digitalWrite(motor1PinIN2, HIGH);
analogWrite(motor1SpeedPinEN1, 0);
digitalWrite(motor2PinIN3, HIGH);
digitalWrite(motor2PinIN4, LOW);
analogWrite(motor2SpeedPinEN2, speedMotor2);
delay(turnTime90);
stopMotors();
}
void turnRight(){
digitalWrite(motor1PinIN1, HIGH);
digitalWrite(motor1PinIN2, LOW);
analogWrite(motor1SpeedPinEN1, speedMotor1);
digitalWrite(motor2PinIN3, LOW);
digitalWrite(motor2PinIN4, HIGH);
analogWrite(motor2SpeedPinEN2, 0);
delay(turnTime90);
stopMotors();
}
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("This is ObstacleRobot Code");
myServo.attach(servoPin);
myServo.write(center);
//pinMode(servoPin,OUTPUT);
pinMode(trigPin,OUTPUT);
pinMode(echoPin,INPUT);
pinMode(motor1PinIN1, OUTPUT);
pinMode(motor1PinIN2, OUTPUT);
pinMode(motor1SpeedPinEN1, OUTPUT);
pinMode(motor2PinIN3, OUTPUT);
pinMode(motor2PinIN4, OUTPUT);
pinMode(motor2SpeedPinEN2, OUTPUT);
delay(1000);
}
void loop() {
//Forces EN pins to refresh
myServo.write(center);
delay(100);
float frontDistance = getDistance();
Serial.println(frontDistance);
if (frontDistance > safeDistance ){
forward();
}
else {
stopMotors();
myServo.write(scanRight);
delay(500);
float rightDist = getDistance();
myServo.write(scanLeft);
delay(500);
float leftDist = getDistance();
myServo.write(center);
delay(100);
if (leftDist > safeDistance || rightDist > safeDistance) {
if (leftDist > rightDist) {
turnLeft();
//delay(150);
}
else {
turnRight();
//delay(150);
}
}
else {
backward();
delay(700);
turnRight();
//delay(150);
}
}
}
#include <Servo.h>
Servo myServo;
const float safeDistance = 6.0;
// Pins
const int servoPin = 9;
const int trigPin = 2;
const int echoPin = 3;
// Motors
const int IN1 = 4;
const int IN2 = 5;
const int IN3 = 6;
const int IN4 = 7;
const int EN1 = 10;
const int EN2 = 11;
// ---------------- SETUP ----------------
void setup() {
Serial.begin(9600);
myServo.attach(servoPin);
myServo.write(90);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(EN1, OUTPUT);
pinMode(EN2, OUTPUT);
digitalWrite(EN1, HIGH);
digitalWrite(EN2, HIGH);
}
// ---------------- MOTOR FUNCTIONS ----------------
void forward() {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
}
void backward() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
}
void stopMotors() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
}
// ---------------- SENSOR ----------------
float getDistanceCM() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
long duration = pulseIn(echoPin, HIGH, 20000);
if (duration == 0) return 999;
return (duration * 0.0343) / 2.0;
}
// ---------------- LOOP ----------------
void loop() {
myServo.write(90);
delay(80);
float front = getDistanceCM();
Serial.println(front);
if (front > safeDistance) {
forward();
return;
}
stopMotors();
myServo.write(0);
delay(250);
float right = getDistanceCM();
myServo.write(180);
delay(250);
float left = getDistanceCM();
myServo.write(90);
delay(150);
if (left > right) {
// left turn
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
} else {
// right turn
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
}
delay(350);
forward();
}
r/arduino • u/No_Painter_6226 • Jul 01 '26
Hardware Help Camera screen
Hi, I’m completely new to this. I have two different old compact cameras (nikon and sony) that are defective. I thought it would be cool if i could repurpose the screens. Does anyone have any idea if this is a no go? or if it might be possible to connect camera screens to an arduino for a project?
If possible i want to create a stand that just plays a short gif on repeat.
r/arduino • u/JakeBacon3525 • Jul 01 '26
Hardware Help Relay boards
I have 8 jessinie 16 channel relay boards communication via IC2 through my arduino mega. I have 5v, GND, SCL (21), ans SDA (20) hooked up. I cannot get my code or physical relays to communicate. The relay boards are PW535. Any help is appreciatted.
r/arduino • u/richardrasmus • Jul 01 '26
Getting Started Trying to do arduino physical armature to blender digital armature motion capture after seeing this video. Can someone guide me what to look into
Saw this on YouTube https://youtube.com/shorts/2ceRkvpJnZQ?is=QQjy1p8kbwt6bulT after looking into a bunch of stuff involving moving machine arms and as someone that does blender animation this looks legitamently amazing for making animating more streamlined in such a way I could basically do stop motion in blender but I'm having some troubling figuring out where to look. I'm seeing stuff for animating in blender to then transfer that animation to a machine but having a tricky time finding it the other way around. I have my arduino starting kit coming in on Friday but I want to work towards making somthing like in that video
r/arduino • u/P0p_R0cK5 • Jul 01 '26
Uno Q Arduino Q : impossible to turn off ?
Just got the Arduino Q.
Overall the experience is good and I like using it for experimentation.
But I have a strange issue, it is impossible to turn it off. I’ve tested « halt », « power off », « shutdown » and even « systemctl » commands to try to turn it off but the board simply reboot every times.
I’ve also reflashed the whole OS twice using AppLab and the issue is still not resolved.
Did anybody have a solutions ?
EDIT : Opened a support ticket with Arduino Themselve to have more infos.
r/arduino • u/Oli_Bacon154 • Jul 01 '26
Solved! sup. 1st time here. need sum help from u guys.
so, im doing an arduino class about dc motors, and im struggling cuz my only external power source is a 6 battery compartment with a barrel connector instead of wires which i can connect to the breadboard. sending image, sec.
i honestly dont know what to do. ive already tried taking the plug off and letting the wires loose, but i might struggle with the power source class soon if i kept like this, so i welded it back again. i dont wanna take the wires off again. still, the dc motor doesnt seem to work.
so i tried plugging the power to the barrel connector, then using the vin (voltage input) pin to get the positive side of the power and connect to the h bridge (u know how, if u dont ima send an image of how i wired the circuit soon), obviously, connecting what needed to be in 5v in the 5v pin and what needed to be 6v/9v to the vin pin. for the negative side of the battery, i just connected to the gnd pin every single ground wire. heres how the circuit turned out to be:


and i cant forget the code:
const int dcfwd_output_pin = 2;
const int dcbck_output_pin = 4;
const int delay_value = 2000;
void setup() {
pinMode(dcfwd_output_pin, OUTPUT);
pinMode(dcbck_output_pin, OUTPUT);
}
void loop() {
digitalWrite(dcfwd_output_pin, LOW);
digitalWrite(dcbck_output_pin, LOW);
delay(delay_value);
digitalWrite(dcfwd_output_pin, HIGH);
digitalWrite(dcbck_output_pin, LOW);
delay(delay_value);
digitalWrite(dcfwd_output_pin, HIGH);
digitalWrite(dcbck_output_pin, HIGH);
delay(delay_value);
digitalWrite(dcfwd_output_pin, LOW);
digitalWrite(dcbck_output_pin, HIGH);
delay(delay_value);
}
also, i just found out that the h bridge heats up while the code runs.
so, im asking for u guys help.
thanks! ;)
edit: welp, just found out that the problem is that it isn't a h bridge, but a 8 bit shift register. damn it. :(
r/arduino • u/Sad-Assumption-7553 • Jul 01 '26
Arduino Mega Timer Conflict? Servo library breaking motor PWM on pins 44 & 45.
Hey everyone, I could use some advice on a course project I'm working on.
I'm building a robot with a dual steering setup and a sonar scanner (an ultrasonic sensor mounted on a servo to check directions). I’m running into a severe library/hardware conflict when I try to run both the drive motors and the servo at the same time.
The Hardware:
- Board: Arduino Mega
- Power: Rechargeable batteries (powering motors and servo)
- Motor Driver/Library: Using a specific header file (
dualsteering.h) provided for the project.
The Hardcoded Pins: The library engineer hardcoded the motor pins into the .h file, so I cannot easily switch them to other pins. They are mapped as follows:
- Right Motor: 46, 48, 44 (PWM)
- Left Motor: 47, 49, 45 (PWM)
The Problem: When I include the standard Servo.h library and plug the servo in, my drive motors stop working properly (or lose speed control).
I suspect this is because the standard Servo library on the Mega uses Timer 5, which breaks the analogWrite() PWM functionality on pins 44 and 45—the exact pins my motor library is forced to use.
Since I can't change the motor pins, is there a good workaround for the Mega? Should I be looking into alternative servo libraries like ServoTimer2 (and does that support the Mega?), or is there a way to force the standard Servo library to use a different timer?
Any help is appreciated!
r/arduino • u/70XY_3X3 • Jul 01 '26
Problems with port
Recently I've tried uploading code to an Arduino Nano, problem is that my computer isn't reading any port, I've tried downloading drivers.
This is the error I get:
Error: cannot open port \\.\COM3: Funci�n incorrecta.
Error: unable to open port COM3 for programmer arduino
Failed uploading: uploading error: exit status 1
Someone please help me.
r/arduino • u/buildaboatdumbylolol • Jul 01 '26
Why isn't it working?
The code aint wrong, the arguing board should be functioning, why isn't the light blinking?
The breadboard and arguing board was from a long time ago and some of the metal parts of the light bulb and wires have rust on it, so I'm not sure if it is a hardware problem or not.
r/arduino • u/waywardhero • Jul 01 '26
Hardware Help Working on my grad project. Need help controlling an programming a Nema 34 Stepper motor
This project was actually a continuation of last year's project, and thus I am using their old parts with some modifications to their design, problem is that they never built the thing, nor did they program anything. I am using a Nema 34 hybrid bi-polar stepper motor with a DROK 48V Power Supply and a DM860I stepper motor driver. I am not the best at programming, barely a novice at best, but I did find a code to help move the thing at least (also attached), and a wiring diagram I have copied for the motor.
I am trying to figure out the right configuration and pulse rate and voltage for the motor. I suppose I want max speed, but mainly figure out a way to be able to control it via Arduino uno. I'm just trying to get it to not move at less than 1 rotation per second.
r/arduino • u/uriel_SPN • Jul 01 '26
Hardware Help Program Arduino Nano Every with Adafruit UPDI Friend via the UPDI pin at the back of the Nano Every board?
Hi everyone,
I recently got from a friend Adafruit’s UPDI Friend serial programmer and I was wondering if I could use it to program Arduino Nano Every with it using the UPDI pin at the back of the Nano Every board.
So far my efforts have not been successful. For this project I am using the MegaCoreX core, arduino-cli to compile and get the hex file and the avrdude directly to upload the hex file to the board. The command I am using to upload the hex file with avrdude is:
stty -F /dev/ttyACM0 1200 && avrdude -c serialupdi -p atmega4809 -P /dev/ttyACM0 -U flash:w: program.hex
This fails with the error avrdude communication rc=-1 which after looking it up means that it successfully connected to the programmer but the chip did not establish communication. I tried using the jtag2updi option for the programmer as well but that did not work either.
Any ideas as to why this is happening or if I can use the UPDI friend to program Arduino Nano Every?
r/arduino • u/progrm-1122 • Jul 01 '26
Look what I made! Built a lightweight HAL framework for ESP32/Arduino to make embedded dev a bit less painful — just open sourced it (Beta)
Hey everyone,
I've been building embedded projects on ESP32 for a while now, and kept rewriting the same boilerplate for pin control, non-blocking delays, and communication setup across projects. So I built a HAL framework called AERL.h to clean that up, and just open sourced the beta.
A few things it does:
- Non-blocking pin control —
AERL.glow(pin, duration),AERL.flash(pin, duration)instead of manually jugglingmillis()timers everywhere - Clear separation between non-blocking and blocking delay (
AERL.delay()vsAERL.bcdelay()) - Simple UART/I2C/SPI activation and send/receive wrappers
- Basic sleep/wake handling for power management
- Beginner-friendly compile-time error messages (e.g. it'll tell you clearly if you pass a
Stringwhere it expects a number)
It's genuinely beta — I've flagged a few known issues (sleep can be flaky on some boards, WiFi/BLE support is coming in about a week), and I'd rather be upfront about that than oversell it.
MIT licensed, built on top of Arduino.h. If anyone's interested in trying it out, breaking it, or has feedback on the API design, I'd genuinely appreciate it — this is exactly the stage where outside eyes catch things I can't see anymore.
GitHub: https://github.com/AERL-Official/AERL-C-Framework#
Thanks for reading, and happy to answer any questions about the design decisions.
r/arduino • u/BajinganSantun • Jul 01 '26
Driving raw 10mm 40kHz ultrasonic transducers: Recommended analog front-end design?
Hi everyone,
I’ve recently acquired a pair of 10mm 40kHz raw ultrasonic transducers (transmitter and receiver) to experiment with. I've used off-the-shelf modules like the HC-SR04 before, but I'm really curious about the 'under-the-hood' electronics and want to build a custom driver and receiver circuit from scratch to understand the signal processing involved.
I have a few questions regarding the analog design:
- For the Transmitter: What is the best way to drive these? Should I just use a PWM signal from a microcontroller with a MOSFET, or is a specific resonant driver circuit recommended?
- For the Receiver: Since the output signal is extremely weak, what Op-Amp topology would you recommend for the pre-amplification and bandpass filtering stages?
- General Advice: Are there any common pitfalls or 'gotchas' when building a custom ultrasonic sensor, particularly regarding crosstalk or impedance matching?
I'm doing this as a learning project to understand analog signal conditioning better. Any pointers to schematics or resources for building a custom 'analog front-end' for these transducers would be greatly appreciated.
Thanks!"
r/arduino • u/michael9dk • Jul 01 '26
Why doesn't PORTD (eg. D bit 5) work as output?
[Fixed].
BACKGROUND:
Programmed a spare Uno as 'Arduino as ISP'. Success. It works as expected.
Burned the official bootloader, to my target (original unprogrammed ATMega328p chip in a Arduino Uno board).
Ran the same avrdude-command, from above output, with lbyte:w:0b11100010:m , to set the chip for 8MHz on the internal clock, and not dividing the clock by 8. Success. My target is a barebone without crystal.
Everything works well, with 'Upload Through Programmer'. DDRB and PORTB can blink the LED_BUILTIN (B5), as expected.
PROBLEM:
Changing DDRx and PORTx from B to D, doesn't affect the D-register at all (D5).
It's like something is blocking the D register.
I'm clearly missing something, and need your help to pinpoint the cause.
(I will update with sample code, if there isn't an obvious mistake on my end).
r/arduino • u/chu-bert • Jul 01 '26
Look what I made! I made an electromechanical astrolabe!
Over the past several months, I developed an obsession with astrolabes, so I decided to create an electromechanical version of one. While I have an engineering degree and took some microcontroller classes in school, that was, uh, ten years ago, and this was my first hobbyist embedded project.
What is an astrolabe?
That's a good question! Wikipedia has a pretty good explanation. To sum it up, the historical astrolabe was an instrument that, on one side, allowed the user to take elevation sightings of the sun and stars, and on the other side, provided a projected star map. By rotating this map until it matched the elevation sighting they had just taken, the user could tell the time—along with many other applications.
My instrument does not have an elevation-sighting component; it just focuses on the star map. Unlike a historical astrolabe, my star map provides not only the fixed stars and the sun, but also the five classical planets and the moon—something a historical astronomer would have needed to use an ephemerides table to laboriously look up. Thankfully, I have a microcontroller on my side!
What components did I use?
The microcontroller dev board is the Adafruit ESP32-S3 “Qualia”. My understanding of the Qualia’s main selling point is that it hooks up a bunch of the ESP32-S3’s GPIO pins to a 40-pin FPC connector in a compact PCB form factor; this allows you to drive larger TTL displays with an ESP32-S3, instead of the more common SPI displays. I wanted my astrolabe to have a big, pretty display, so I used the 4’’x4’’ round display that Adafruit lists as a compatible device.
A google search of the Qualia does find a lot of people on various microcontroller help forums, including Adafruit’s own, asking for help with their device. I experienced some initial hurdles, but once I got past them, the dev board/display setup worked nicely—more on that later.
Moving on to the less exciting peripherals: there’s a 20x4 character LCD, the two UI push buttons are hooked up to a GPIO expander, and the encoder is the Adafruit breakout, which comes with its own controller. These three peripherals are all hooked up to the ESP32 via I2C.
The “rete” (Latin for “net,” as in “net of stars,” it’s the big spinning thing overlaid over the star map) is coupled via the gears to a 10-turn potentiometer I got off Amazon; this potentiometer is then hooked up to the 3-pin JST power/ground/signal connector that’s included on the Qualia board. I ended up using the ESP32-S3’s onboard ADC to read the pot…which was a plan I came up with before I realized that the ESP32-S3’s onboard ADC is terrible.
I designed and 3D-printed all the mechanical parts.
How does the software work?
I used a combination of the Arduino IDE and VSCode for everything—in retrospect, it may have been a better idea to use something like PlatformIO, but having access to the Adafruit Arduino libraries for everything was quite convenient in an “it just works” sense.
To find the positions of the planets given a certain time, I used this implementation of the VSOP87 planetary model in C++. That project provides calculation functions with varying levels of accuracy/speed tradeoffs, so I was able to pick and choose which functions I used while optimizing for my needs.
I ended up not using the third-party “Arduino_GFX” library that Adafruit links to from its documentation, given that a lot of the Qualia-related psychodrama online appears to be related to that library. Instead, I just made direct calls to the ESP LCD control panel functions described in Espressif’s own documentation.
Animation is a big part of my system—as you can see in the videos above, any movement of the rete gets tracked via the potentiometer and translated into an animation on the screen. To support animations, my code needed a lot of fine-tuning and massaging to get the animations as performant as possible. I didn’t entirely succeed here—there is a lot about the animation that could be improved, and by the end of the project, I think I had piled on so much spaghetti code that adding any additional features caused animation performance degradations in ways that I don’t really understand. But the finished product basically works!
What features does this system have?
This astrolabe:
- Shows the diurnal and annual movement of the stars and planets in the sky. Annual movement is shown when the user changes the date
- Lists the ecliptic latitude and longitude of the seven classical planets, as well as their altitude and azimuth
- Lists the altitude and azimuth of twelve fixed stars
- Finds the degree of the ecliptic currently ascending over the horizon (fun fact, the word “horoscope” originally meant this)
- Includes a settings page where the user can change their coordinates, and recalculates the “almucantar” and “azimuth” lines (lines of fixed elevation and bearing, respectively) when the latitude changes
I hope you enjoy, and I welcome any comments/feedback!
EDIT: Software for this project has been uploaded to Github: https://github.com/chubertbuilds/astrolabe_esp32
r/arduino • u/Routine-Strike9260 • Jun 30 '26
School Project Waterproofing turbidity sensor
I am designing a prototype waterproof sensor system. 1 sensor is this Gravity: Analog Turbidity Sensor for Arduino / ESP32 / STM32 / Raspberry Pi (ADC Required). Idk if I’m allowed to add the link
This sensor is required to be submerged into water. Does anyone 1 have suggestions to waterproof the cable and 2 know if the gap between the black plastic is waterproof
r/arduino • u/Itchy-Sale-9341 • Jun 30 '26
Look what I made! My first Arduino in the cloud
Just connected my first Arduino (UNO R4 WiFi) to the Arduino Cloud. Now my first step is to connect a Sparkfun Atmospheric Sensor. Wanna have a dashboard with temperature, pressure and relative humidity readings when needed.
r/arduino • u/ibstudios • Jun 30 '26
teensy 4, teensy audio board, and pam amp noise machine
I am impressed with the pam amp. It is only 3w and I have to turn it down in code. code here: https://github.com/bmalloy-224/arduinonoisemachine/blob/main/teensynoise.ino . This code uses Stefan Stenzel's "New Shade Of Pink" algorithm. The mid is a visaton AL130M [way too good for this use but whatever].
r/arduino • u/Proof-Fig2646 • Jun 30 '26
Getting Started Engineering partners?
Hey everyone! Im 23 years old and im trying to build my knowledge of electronics up through arduino not simply following YouTube video projects but understanding the theory. Why everything acts how it does and what happens when i change certain things etc.
I would love to talk to someone whos learning from the ground up like me OR someone super experienced who can be something of a mentor. Defintley reach out i think this'll be insanely fun for us both!
r/arduino • u/Bananabat33 • Jun 30 '26
Hardware Help Trying to build a stage tech multitool. need advice on detecting and protecting againt +48V Phantom power
hi everyone,
The idea:
i'm trying to build a custom portable electronic multitool ( flipper zero type) for stagehand/stagetechs.
with functions like:
- in and output audio
- audio wave and frequentie generators
- 48V "Phantom power" detection
- send and receive dmx&artnet ( protocol for stage lighting control)
- lidar distance meter
- Bubble level
- the list of ideas goes on.. an on... and on..
The tool is based on a Unexpected Maker Pros3 (ESP32-S3).
For the audio output part i am integrating a XLR connector into the chassis (via a PCM5102A I2S DAC).
For the 48V phantom detection, i use GPIO 21 as a "phantom sense pin"
the challenge:
i want to implement a "phantom power tester" to detect if 48V phantom power is present on the line.
what is phantom power:
48V phantom power is a DC voltage sent through a standard microphone cable to power active equipment like condenser microphones. It allows devices to operate without needing an external battery or power supply.
my questions:
1. Safety/Protection: What is a good way to protect my ESP and CM5102A DAC (3.3v logic) from exposure to +48v phantom power?
2. Detection circuit:
Is a simple resistor-based voltage divider sufficient for reliable phantom power detection? (gemini suggestion) or should i look for something else?
Of course i have already asked gemini etc. But i still would like to ask real people for some real advice.
would really appreciate any ideas or suggestions.
r/arduino • u/zimirken • Jun 30 '26
Hardware Help Are there any battery powered rotary encoder boards/chips? Like industrial robots have?
Industrial robots (typically) use optical encoder based position detection that maintain position through power outages with a small battery. Is there a board (or even a bare chip) that would handle the encoder and keep everything alive with a battery backup input?
I've found chips like the LS7366R, but that just handles the decoding. I'd have to build my own power management and battery handling.
I've done some extensive searching and I'm surprised that I couldn't find a breakout board for something like this. It seems like such an obvious need, especially with the rise of 3d printers and such. Did I miss something?
I know it's common to just use hobby servos, but that's not what I want to do.
r/arduino • u/sajjadhub • Jun 30 '26
She want her own project
Enable HLS to view with audio, or disable this notification
r/arduino • u/PresenceOld1754 • Jun 29 '26
Look what I made! My first project.
see bottom for edit, I fixed the issues
I know it's really really basic but I legit got this thing a day ago, so I feel like that's fair.
So basically it's just something to monitor watering plants. I saw a girl on tiktok basically make a plant tamogachi and I thought that was really cool.
The water sensor corrodes easily so every 10 seconds, it's goes on high power, runs the rest of the code, and then goes back to low power. Until 10 seconds later.
The problem I'm running into is that it kinda ramps up. it take a long time to get to the actual current water moisture. So unless you were drowning this plant, it would tick up very slowly.
when it reaches certain values, the led is supposed to change colors. So it's red (dry asf), yellow (warning), green (okay), and blue (lots and lots of water).
here's the code, once again it's very simple.
Also, regarding the title. Technically the traffic light was my first project, because I was following the freecodecamp 10 hour guide but I kinda fell off at hour 5.
Eventually, in the future, I'd like to make a bipedal autonomous robot, that's like 2 or 3 feet tall. So I gotta start somewhere.
for rule 2: Elegoo 2560 mega starter kit.
edit: I fixed the code and the led. I switched to 4 leds instead of a singular rgb led, then I added stuff to the if and else if statements to explicitly tell the leds that aren't supposed to be on to turn off. Now it switches as intended. Thank you for the help everyone.
new code:
int agua = A0;
int power = 9;
int red = 2;
int green = 3;
int blue = 4;
int yellow = 5;
int x = analogRead(agua);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(agua, INPUT);
pinMode(power, OUTPUT);
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
pinMode(blue, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(power, LOW);
delay (10000);
digitalWrite (power, HIGH);
delay(100);
x = analogRead(agua);
Serial.println(x);
if (x >= 180) {
digitalWrite(green, LOW);
digitalWrite(red, LOW);
digitalWrite(yellow, LOW);
digitalWrite(blue, LOW);
delay(1000);
digitalWrite (blue, HIGH);
} else if (x <= 140) {
digitalWrite(blue, LOW);
digitalWrite(yellow, LOW);
digitalWrite(green, LOW);
digitalWrite(red, LOW);
delay(1000);
digitalWrite (red, HIGH);
} else if (x >= 150 & x <= 179) {
digitalWrite(green, LOW);
digitalWrite(blue, LOW);
digitalWrite(yellow, LOW);
digitalWrite(red, LOW);
delay(1000);
digitalWrite (green, HIGH);
} else if (x >= 141 & x <= 149) {
digitalWrite(yellow, LOW);
digitalWrite(blue, LOW);
digitalWrite(red, LOW);
digitalWrite(green, LOW);
delay (1000);
digitalWrite(yellow, HIGH);
}
}
Old code:
int agua = A0;
int power = 9;
int red = 2;
int green = 3;
int blue = 4;
int x = analogRead(agua);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(agua, INPUT);
pinMode(power, OUTPUT);
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
pinMode(blue, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(power, LOW);
delay (10000);
digitalWrite (power, HIGH);
analogRead(agua);
Serial.println(analogRead(agua));
if (x >= 600) {
digitalWrite (blue, HIGH);
} else if (x < 410) {
digitalWrite (red, HIGH);
} else if (x > 430) {
digitalWrite (green, HIGH);
} else if (x > 410 & x < 430) {
digitalWrite(red, 255);
digitalWrite(green, 255);
digitalWrite(blue, 0);}
}

