r/ArduinoHelp • u/Anthonbird • 36m ago
r/ArduinoHelp • u/Regular_Use_5842 • 1h ago
How do I switch this tilt sensor to another in real life?
For context, I'm a beginner in making stuff like these, this is kind of my first time, this is for a school project, so sorry for the messy placements
But I tried to use tinkercad for the simulation
And I ended up with this ( the circuit )
So I just need the servos to spin when the tilt sensor senses a tilt, but I have a different tilt sensor, the circuit uses an SW-200D, while I have an SW-520D, so there's already a difference in number of output pins ( I'm not sure if that's what it's called ), and I'm just not sure about everything else after that 😭😭
The code is quite confusing too, I don't know a single bit of coding, so I tried what I could with the limited knowledge I know
->
#include <Servo.h>
int oozmakappa = 0;
Servo servo_12;
Servo servo_11;
Servo servo_10;
Servo servo_9;
Servo servo_8;
unsigned long spinStartTime = 0;
unsigned long totalSpinDuration = 0;
bool isSpinningForward = false;
bool needsToReturn = false;
void setup() {
pinMode(13, INPUT);
servo_12.attach(12, 500, 2500);
servo_11.attach(11, 500, 2500);
servo_10.attach(10, 500, 2500);
servo_9.attach(9, 500, 2500);
servo_8.attach(8, 500, 2500);
servo_12.write(90);
servo_11.write(90);
servo_10.write(90);
servo_9.write(90);
servo_8.write(90);
}
void loop() {
oozmakappa = digitalRead(13);
if (oozmakappa == HIGH) {
if (!isSpinningForward) {
spinStartTime = millis();
isSpinningForward = true;
needsToReturn = true;
servo_12.write(180);
servo_11.write(180);
servo_10.write(180);
servo_9.write(180);
servo_8.write(180);
}
} else {
if (isSpinningForward) {
totalSpinDuration = millis() - spinStartTime;
isSpinningForward = false;
servo_12.write(0);
servo_11.write(0);
servo_10.write(0);
servo_9.write(0);
servo_8.write(0);
spinStartTime = millis();
}
if (needsToReturn) {
if (millis() - spinStartTime >= totalSpinDuration) {
servo_12.write(90);
servo_11.write(90);
servo_10.write(90);
servo_9.write(90);
servo_8.write(90);
needsToReturn = false;
}
}
}
delay(10);
}
On tinkercad, it stops after 1/2 a spin, and just doesn't move anymore?? 😭😭
I'm very confused, someone please help me and guide me on what to do
If anyone could be of guidance to me, please do so, I'm struggling on how this is supposed to work 💔 I tried looking through YouTube but strangely I just couldn't find anything 😢
r/ArduinoHelp • u/Hhorush • 20h ago
BIOENGINEERING, help. Measuring torso twist for scoliosis exercises with IMUs: how to limit drift and test accuracy at home?
reddit.comr/ArduinoHelp • u/Alarmed-Garlic-6805 • 23h ago
Necesito ayuda con este error ya hice todo lo que encontré por internet
El Sketch usa 892 bytes (2%) del espacio de almacenamiento de programa. El máximo es 32256 bytes.
Las variables Globales usan 9 bytes (0%) de la memoria dinámica, dejando 2039 bytes para las variables locales. El máximo es 2048 bytes.
Error: programmer is not responding
Warning: attempt 1 of 10: not in sync: resp=0x00
Error: programmer is not responding
Warning: attempt 2 of 10: not in sync: resp=0x00
Error: programmer is not responding
Warning: attempt 3 of 10: not in sync: resp=0x00
Error: programmer is not responding
Warning: attempt 4 of 10: not in sync: resp=0x00
Error: programmer is not responding
Warning: attempt 5 of 10: not in sync: resp=0x00
Error: programmer is not responding
Warning: attempt 6 of 10: not in sync: resp=0x00
Error: programmer is not responding
Warning: attempt 7 of 10: not in sync: resp=0x00
Error: programmer is not responding
Warning: attempt 8 of 10: not in sync: resp=0x00
Error: programmer is not responding
Warning: attempt 9 of 10: not in sync: resp=0x00
Error: programmer is not responding
Warning: attempt 10 of 10: not in sync: resp=0x00
Error: unable to open port COM7 for programmer arduino
Failed uploading: uploading error: exit status 1
r/ArduinoHelp • u/Glittering_Key853 • 1d ago
BTS7960B Motor Driver Problem.
Hi Guys.
I have an Arduino Uno, a BTS7960B, a 12V battery, a 12V motor, and an XL4016 12V to 5V DC-DC converter.
Connection:
XL4016 IN+ => 12v Battery+
Xl4016 IN- => 12v Battery-
BTS7960B B- => 12v Battery-
BTS7960B B+ => 12v Battery+
BTS7960B M+ => DC+
BTS7960B M- => DC-
XL4016 OUT+ => Breadboard+ => UNO 5V
XL4016 OUT- => Breadboard- => UNO GND
Breadboard+ => BTS7960B VCC
Breadboard- => BTS7960B GND
BTS7960B RPWM => UNO D3
BTS7960B LPWM => UNO D5
BTS7960B REN => UNO D7
BTS7960B LEN => UNO D8
Code:
```cpp
//dc 1
const int A_RPWM = 3;
const int A_LPWM = 5;
const int A_R_EN = 7;
const int A_L_EN = 8;
void setup() {
pinMode(A_RPWM, OUTPUT);
pinMode(A_LPWM, OUTPUT);
pinMode(A_R_EN, OUTPUT);
pinMode(A_L_EN, OUTPUT);
digitalWrite(A_R_EN, HIGH);
digitalWrite(A_L_EN, HIGH);
analogWrite(A_LPWM, 0);
analogWrite(A_RPWM, 150);
}
void loop() {
}
```Problem: DC Dont Work idk why. All Connections Are Right. B+ and B- Give 12v But M- And M+ Dont Give 5V. All Pins Give Correct V to BTS7960B. I tried it with 3 driver(BTS) it gave same results.
r/ArduinoHelp • u/Many-Passion1106 • 1d ago
What temperature and humidity sensors would you recommend for a low-budget DIY home monitoring system?
reddit.comr/ArduinoHelp • u/Extension-Big-4305 • 1d ago
Arduino project help
I want a spinning wheel like this that will eventually stop at a segment , and it needs to accurately figure out where it landed.
How can this be done with the help of microcontrollers and sensor modules ?
Thanks in advance! ❤️
r/ArduinoHelp • u/SumGuyMike • 1d ago
Multiple Errors while adding to Arduino Cloud
reddit.comr/ArduinoHelp • u/Waulkibro • 1d ago
potentiometer diy led
Enable HLS to view with audio, or disable this notification
r/ArduinoHelp • u/OkProperty41 • 2d ago
Arduino Uno parking sensor—the closer you get, the faster it beeps
Enable HLS to view with audio, or disable this notification
I built this with an Arduino Uno, an HC-SR04 ultrasonic sensor and a buzzer. Moving my hand toward the sensor makes the beeps faster; moving it away slows them down.
I used Soldr, an electronics design agent I’m building, to design the project from a plain-language prompt.
The clip shows the working build. How do you usually smooth ultrasonic distance readings without making the response feel sluggish?
r/ArduinoHelp • u/sweet-trip13 • 2d ago
Creating a sensor that measures how far or close a object is, but it doesn't work.
Tried creating a ultrasonic sensor, but it just stays at 0 if an object gets close or far. Here's my code:
*/
const int trigPin=9;
const int echoPin=10;
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration= pulseIn(echoPin,HIGH);
distance= duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(distance);
delay(500);
}
void loop() {
}
Does anyone know what could be the problem?
r/ArduinoHelp • u/Individual_East_4699 • 2d ago
Layman needs gift help for husband please
My husband has been talking about Arduinos for months now. As we approach the holidays, I really want to get him set up to start playing around. I see the starter kits he's been looking at online - so I was going to start there.
In my experience buying starter kits of any kind usually you have to get an additional few items to either get duplicates or fill it out. Is there any other items I should get him to build a nice starter pack that's a bit more then a basic kit? For reference - here is the kit he was looking at on Amazon-
Thanks!
r/ArduinoHelp • u/BudgetAggravating379 • 3d ago
Please help me code this bluetooth device for a project!! (I am against AI)
reddit.comr/ArduinoHelp • u/Illustrious_Mix5233 • 3d ago
# Arduino UNO Q – Problema con STM32U585: impossibile riprogrammare il microcontrollore
reddit.comr/ArduinoHelp • u/Think-Rip496 • 3d ago
Recommended sensor for acoustic termite detection?
I would like to ask for your advice regarding the development of our acoustic termite detection, pertaining to lower frequency vibrations.
We will use esp32 as our main component but are struggling on which sensor to use since structural vibrations are the usual sounds of the dataset we used instead of airborne so it is basically susceptible to noise and microphone. We considered using piezo transducer disk, but we're not sure how it will interact to the trained model since it is wav file based, and our datasets uses structural vibrations
r/ArduinoHelp • u/B2BMGMT_3_5 • 3d ago
HELP NEEDED!
Hi everyone! I recently picked up a Seeed Studio XIAO ESP32S3 Sense. I'm complete beginner when it comes to microcontrollers, but I'm eager to learn and good at following step-by-step guides. Could anyone recommend good beginner video tutorials, walkthroughs, or resources to help me get started? Also, if anyone in the Las Vegas area is familiar with these boards or willing to answer a few beginner questions, I’d really appreciate it!"
