r/ArduinoProjects • u/TheBlackDon • Jan 08 '19
r/ArduinoProjects • u/BaneofRovaan101 • Jan 01 '19
Need help with arduino teensy 2.0++ joystick
I don't know how to code for arduino and can't find anywhere to learn so I'm asking here. I have 12 buttons soldered on and planning on soldering 2 analog sticks on when I get the breakout boards (they are the adafruit PSP 3000's). I have tried lots of example and premade code and none of it works and all the while I have no idea what's wrong.
r/ArduinoProjects • u/randomquestions113 • Sep 02 '24
Please!
hey! i would like to run a 1kw,2kw,3kw or 4kw 3 phase uvw BLDC motor on arduino, could someone tell me which microcontroller i need for that and what i need to pay attention to in order to connect a motor driver to it
r/ArduinoProjects • u/EnvironmentalMap5 • Feb 20 '22
Using HC-05 Arduino Bluetooth module to control LED Brightness
r/ArduinoProjects • u/GhostGamerSL • Jan 25 '22
ARDUINO DIY HOME AUTOMATION | SMART HOUSE PROJECT
r/ArduinoProjects • u/dsmedium • Oct 18 '20
On the third second the car's collapses and its length increases, does anyone know what part is used to achieve this feature?
r/ArduinoProjects • u/3ugeene • Jul 16 '23
I did a thing with ESP32, FastLED and midi over ble
r/ArduinoProjects • u/krakelen • May 12 '19
Heating system - Melt snow
I'm a teacher (10 - 16 year olds) and I'm trying to make a greenhouse project with my students. The aim is, other than to inspire programming and creativity, to have a self sufficient school (fruit/veggie based) and an environmentally friendly solution where our plants are watered with rain water. This will make our ecological footprint smaller and my students will see that even they can contribute to saving the planet.
Our weapon of choice will be the BBC Micro:bit. Unless it falls short. Then an Arduino may come to the rescue, but a key element in this project is that the students will do the coding themselves. The microbit's block coding is a bit easier to relate to than the Arduino language.
One main problem is snow, so here is my question for you:
I want to gather rain water for use in a greenhouse, but I live way up on the northern hemisphere so a few months of the year we have more snow than rain. How can I use the microbit to melt the snow and thereby continue gathering water also in the winter time?
Is this even doable with the microbit, or do I need an Arduino?
r/ArduinoProjects • u/UnusualNarwhal6388 • Dec 30 '23
Arduino code
I need help with a arduino code, i wanted to make a "Lie detektor" but it only makes the red led glow can some one help please.
// Include the necessary libraries
#include <LiquidCrystal.h>
// Define the pins used for the LCD, LED, and buzzer
const int lcd_rs = 12, lcd_en = 11, lcd_d4 = 5, lcd_d5 = 4, lcd_d6 = 3, lcd_d7 = 2;
const int red_led = 6;
const int green_led = 7;
const int buzzer = 8;
// Create an instance of the LCD
LiquidCrystal lcd(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7);
// Create a random number
int randomNumber = random(1, 2);
void setup() {
// Initialize the LCD
lcd.begin(16, 2);
// Initialize the pins
pinMode(red_led, OUTPUT);
pinMode(green_led, OUTPUT);
pinMode(buzzer, OUTPUT);
}
void loop() {
// Check the random number
if (randomNumber == 1) {
// Turn on the red LED and buzzer
digitalWrite(red_led, HIGH);
digitalWrite(buzzer, HIGH);
delay(2000);
digitalWrite(buzzer, LOW);
// Display the message on the LCD
lcd.clear();
lcd.print("Du lugst");
} else {
// Turn on the green LED
digitalWrite(green_led, HIGH);
// Display the message on the LCD
lcd.clear();
lcd.print("Du lugst nicht");
}
delay(1000);
}
r/ArduinoProjects • u/Unable-Paramedic-875 • Dec 28 '23
Need advice !
Hey everybody! Can you tell me Arduino users, how did you learn to program on arduino and what tools you used?
r/ArduinoProjects • u/MorliPro • Dec 31 '23
Control motordriver SX3R
Hello, I try to control the motordriver SX3R over an ATmega2650 on an custom PCB.
I use the Servo library and Servo.write.
My problem is, that i can do max front and max reverse, but i can't do less throttle.
How can I do half throttle, when I write half values its also max throttle.
There are extra features see the picture on the driver, but I don't know how to use them.
Maybe someone can help me
Moritz
r/ArduinoProjects • u/NA_18108 • Jan 11 '24
Motor doesnt reverse?
Hi Guys this is my current code, i have the motor running in 3 stages with the last stage the motor needs to run in reverese, im not sure what to change with my code to make this work, or if it is regarding my hardware. im using a cnc sheild v3 and the power is connected to a power supply with 12v.
This is the code:
const int StepX = 2;
bool initialRun = false;
bool mainRun = false;
bool reverseRun = false;
void setup() {
pinMode(StepX, OUTPUT);
}
void loop() {
// If the initial run is not completed
if (!initialRun) {
// Move the motor for a short distance
for (int i = 0; i < 200; i++) {
digitalWrite(StepX, HIGH);
delayMicroseconds(500);
digitalWrite(StepX, LOW);
delayMicroseconds(1000);
}
// Stop the motor (optional)
digitalWrite(StepX, LOW);
initialRun = true;
// Introduce a delay before starting the main run
delay(2000); // Adjust this delay as needed
}
// If the initial run is completed and the main run hasn't started
else if (!mainRun && initialRun) {
// Move the motor for a short distance in the opposite direction
for (int i = 0; i < 200; i++) {
digitalWrite(StepX, LOW); // Change direction to LOW for reverse
delayMicroseconds(500);
digitalWrite(StepX, HIGH); // Change direction to HIGH for reverse
delayMicroseconds(1000);
}
// Stop the motor (optional)
digitalWrite(StepX, LOW);
mainRun = true;
// Introduce a delay before starting the reverse run
delay(2000); // Adjust this delay as needed
}
// If the main run is completed and the reverse run hasn't started
else if (!reverseRun && mainRun) {
// Move the motor for a short distance in the opposite direction (reverse)
for (int i = 0; i < 200; i++) {
digitalWrite(StepX, LOW);
delayMicroseconds(500);
digitalWrite(StepX, HIGH);
delayMicroseconds(1000);
}
digitalWrite(StepX, LOW);
reverseRun = true;
}
}
This is the hardware:

r/ArduinoProjects • u/Active_Coconut7444 • Jan 25 '24
How to make a Arduino base anti tsunami shield?
All I know is how to make an earthquake sensor. What I want to know is how the earthquake sensor detects some large amount of magnitude and how it trigger the shield, so that it can block the upcoming tsunami.
r/ArduinoProjects • u/PsychologicalMix7435 • Apr 20 '24
Made Gas Detector using nodemcu
A gas detector using a Nodemcu module typically involves connecting a gas sensor to the Nodemcu board, which is programmed to monitor gas levels. The Nodemcu collects data from the sensor and can send alerts or notifications if gas levels exceed safe limits. This setup can be used for various applications such as detecting carbon monoxide, methane, or other hazardous gases in homes, industrial settings, or laboratories. The Nodemcu Wi-Fi capabilities may also enable remote monitoring and control of the gas detection system. A gas detector using a Nodemcu module has a wide range of uses, including: Home Safety: Detecting carbon monoxide (CO) or natural gas leaks to ensure the safety of residents. Industrial Safety: Monitoring gas levels in factories, warehouses, or industrial facilities to prevent accidents and ensure worker safety .Environmental Monitoring: Detecting pollutants or harmful gases in the environment to assess air quality. Laboratory Applications: Monitoring gas levels in laboratories to ensure a safe working environment for researchers. HVAC Systems: Integrating gas detection into heating, ventilation, and air conditioning systems to ensure proper ventilation and prevent gas buildup. Smart Buildings: Incorporating gas detection into smart building systems for automated alerts and responses to gas leaks or unsafe conditions. Fire Prevention: Early detection of flammable gases to prevent fires or explosions in both residential and commercial settings. For more information click here
r/ArduinoProjects • u/SamBandara • Dec 10 '19
I made my own Mailbox!!! Now I know when to open my mailbox.
r/ArduinoProjects • u/allaboutHans • Jan 12 '21
I made an LED bot that users can program by using the twitch chat. You can also publish your painting on instagram. Come try it out. Feedback appreciated :)
r/ArduinoProjects • u/QuietRing5299 • May 05 '24
SSH Into Raspberry Pi from Your Cell Phone
Hello everyone!
I'm excited to share my latest tutorial where I demonstrate how to easily control your Raspberry Pi using your cellphone. This step-by-step guide covers everything from the initial setup to achieving full remote control by the end of the tutorial. Whether you're a beginner or an experienced Pi user, this guide will provide valuable insights on enhancing your Raspberry Pi projects with mobile connectivity. Check it out and gain the convenience of managing your Raspberry Pi remotely!
https://www.youtube.com/watch?v=d2Kz67x4Eww
Also, be sure to subscribe if you have not! Would be awesome to have your support.
Thanks Reddit
r/ArduinoProjects • u/nanami00000 • Dec 26 '25
Gostaria de tirar algumas dúvidas
Eu NUNCA mexi com arduino 🥹, e estava querendo fazer o meu primeiro projeto utilizando ele, para fazer um BB-8(eu assisti vários vídeos de como fazer, e sempre utilizavam uma estrutura semelhante de roda que pudesse durar pra todas as direções para poder fazer os movimentos dele), poderiam me dar algumas dicas ou me aconselhar quarto programa utilizar ???
r/ArduinoProjects • u/Key-Process1496 • Jan 30 '26
PROBLEMA CON IL PROGETTO
PROGETTO: dispositivo laser per il tracciamento della mano, funziona combinando codice py(opencv2, mediapipe) e arduino per realizzare servocomandi con un laser collegato che traccia la mia mano. Il problema è che non appena la mia mano entra nel frame, i servocomandi iniziano a impazzire e a girare in modo casuale, aggrovigliando i fili. A proposito, i servocomandi non partono dalla posizione predefinita, ma da una che ho impostato.
CODICE PY:
importa cv2 come cv
importa mediapipe come mp
importa seriale
importa ora
# Configurazione Arduino
arduino = serial.Serial('COM5', 9600, timeout=0.1)
time.sleep(3) # attendi il reset di Arduino
# Configurazione telecamera
cap = cv.VideoCapture(0)
mpHands = mp.solutions.hands
hands = mpHands.Hands(max_num_hands=1, min_detection_confidence=0.7, min_tracking_confidence=0.7)
mpDraw = mp.solutions.drawing_utils
prevX, prevY = None, None
alpha = 0.2
while True:
success, img = cap.read()
if not success:
continue
img = cv.flip(img, 1)
h, w, _ = img.shape
imgRGB = cv.cvtColor(img, cv.COLOR_BGR2RGB)
results = hands.process(imgRGB)
if results.multi_hand_landmarks:
lm = results.multi_hand_landmarks[0].landmark[9]
pixelX = int(lm.x * w)
pixelY = int(lm.y * h)
if prevX è None: prevX = pixelX
if prevY è None: prevY = pixelY
smoothedX = int(prevX + alpha * (pixelX - prevX))
smoothedY = int(prevY + alpha * (pixelY - prevY))
prevX, prevY = smoothedX, smoothedY
smoothedX = max(0, min(w-1, smoothedX))
smoothedY = max(0, min(h-1, smoothedY))
try:
arduino.write(f"{smoothedX},{smoothedY}\n".encode())
arduino.flush() # Assicura che i dati vengano inviati immediatamente
except Exception as e:
print(f"Errore seriale: {e}")
cv.circle(img, (smoothedX, smoothedY), 10, (0, 255, 0), -1)
mpDraw.draw_landmarks(img, results.multi_hand_landmarks[0], mpHands.HAND_CONNECTIONS)
cv.putText(img, f"Invia: {smoothedX},{smoothedY}" if results.multi_hand_landmarks else "Nessuna mano",
(10, 30), cv.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)
cv.imshow("Controllo manuale", img)
if cv.waitKey(1) & 0xFF == 27: # ESC per uscire
break
cap.release()
cv.destroyAllWindows()
try:
arduino.close()
except:
pass
CODICE ARDUINO:
#include <Servo.h>
Servo sx, sy;
const int CAM_WIDTH = 1280;
const int CAM_HEIGHT = 720;
int currentX = 90;
int currentY = 90;
int targetX = 90;
int targetY = 90;
const int maxDelta = 1;
const int deadZone = 5;
const int moveDelay = 50;
unsigned long lastMove = 0;
float smoothX = 90.0;
float smoothY = 90.0;
const float smoothing = 0.2;
bool firstData = false;
unsigned long lastDataTime = 0;
const long dataTimeout = 1000; // Ritorna al centro dopo 1 secondo senza dati
void setup() {
Serial.begin(9600);
sx.attach(4);
sy.attach(6);
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
sx.write(currentX);
sy.write(currentY);
delay(1000); // Lascia che i servocomandi si stabilizzino
}
void loop() {
if (Serial.available() > 0) {
String data = Serial.readStringUntil('\n');
data.trim();
int comma = data.indexOf(',');
se (virgola > 0) {
int rawX = data.substring(0, virgola).toInt();
int rawY = dati.sottostringa(virgola + 1).toInt();
if (rawX >= 0 && rawX <= CAM_WIDTH && rawY >= 0 && rawY <= CAM_HEIGHT) {
targetX = map(rawX, 0, CAM_WIDTH, 0, 180);
targetY = map(rawY, 0, CAM_HEIGHT, 180, 0); // INVERTI Y!
targetX = constrain(targetX, 0, 180);
targetY = constrain(targetY, 0, 180);
firstData = true;
lastDataTime = millis();
}
}
}
if (firstData && (millis() - lastDataTime > dataTimeout)) {
targetX = 90;
targetY = 90;
}
if (millis() - lastMove >= moveDelay) {
lastMove = millis();
smoothX = smoothX + smoothing * (targetX - smoothX);
smoothY = smoothY + smoothing * (targetY - smoothY);
int diffX = (int)smoothX - currentX;
int diffY = (int)smoothY - currentY;
if (abs(diffX) > deadZone) {
int stepX = constrain(diffX, -maxDelta, maxDelta);
currentX += stepX;
currentX = constrain(currentX, 0, 180);
sx.write(currentX);
}
if (abs(diffY) > deadZone) {
int stepY = constrain(diffY, -maxDelta, maxDelta);
currentY += stepY;
currentY = constrain(currentY, 0, 180);
sy.write(currentY);
}
}
}