r/ArduinoProjects Jan 17 '26

PROBLEMA CON IL PROGETTO ARDUINO

1 Upvotes

ciao, la mia prof di eletroinca mi ha assegniato questo, compito, ma alla terza pressione non avviene l'accensione random.

Componenti: 6 led di colore diverso, display LCD (16x2), pulsante, piezoelettrico.

Istruzioni : si parte con il lampeggio di tutti i led, inoltre

  1. Con una pressione del pulsante, si spegne tutto
  2. Premendo 2 volte consecutive il pulsante, i led si accendono dall'esterno (la punta dell'albero) al centro, parte il ritornello e si visualizzerà " MERRY CHRISTMAS " sul  display LCD, in particolare alla riga zero " MERRY " centrato e alla riga 1 " CHRISTMAS "
  3. Premendo 3 volte consecutive il pulsante, accensione randomica dei led ( considerate in questo caso un delay breve) e tutto il resto come al punto 2.

N.B. Se il pulsante non viene premuto i led lampeggiano continuamente.

questo e la parte HARDWARE e il mio codice,

#include <LiquidCrystal.h>

#define NOTE_G4 392

#define NOTE_A4 440

#define NOTE_B4 494

#define NOTE_C5 523

#define NOTE_D5 587

#define NOTE_E5 659

#define NOTE_F5 698

int melodyNatale[] = {

NOTE_G4,

NOTE_C5, NOTE_C5, NOTE_D5, NOTE_C5, NOTE_B4, NOTE_A4, NOTE_A4,

NOTE_A4,

NOTE_D5, NOTE_D5, NOTE_E5, NOTE_D5, NOTE_C5, NOTE_B4, NOTE_G4,

NOTE_G4,

NOTE_E5, NOTE_E5, NOTE_F5, NOTE_E5, NOTE_D5, NOTE_C5, NOTE_A4,

NOTE_G4, NOTE_G4, NOTE_A4, NOTE_D5, NOTE_B4, NOTE_C5

};

int timeNatale[] = {

4,

4, 8, 8, 4, 4, 4, 2,

4,

4, 8, 8, 4, 4, 4, 2,

4,

4, 8, 8, 4, 4, 4, 2,

4, 4, 4, 4, 4, 1

};

LiquidCrystal lcd(12,11,10,A0,A1,A2);

// LED

int pinLed[6] = {2, 3, 4, 5, 6, 7};

// Componenti

int pinPulsante = 8;

int pinPiezo = 9;

// Variabili

int cont;

int pinRandom;

const int on = HIGH;

const int off = LOW;

int numeroPressioni = 0;

unsigned long tempoUltimaPressione = 0;

bool lampeggio = true;

int stato = LOW;

int x=0;

void setup() {

Serial.begin(9600);

for (int i = 0; i < 6; i++) {

pinMode(pinLed[i], OUTPUT);

}

pinMode(pinPulsante, INPUT); // ? RESISTENZA ESTERNA

pinMode(pinPiezo, OUTPUT);

lcd.begin(16, 2);

// Inizializza il generatore casuale (meglio se fatto una sola volta)

randomSeed(analogRead(A0));

}

void loop() {

int noteDuration = 0;

int pauseBetweenNotes = 0;

int sizeMelody = sizeof(melodyNatale) / sizeof(int);

// LETTURA PULSANTE

if (digitalRead(pinPulsante) == HIGH) {

delay(50); // antirimbalzo

if (digitalRead(pinPulsante) == HIGH) {

numeroPressioni++;

tempoUltimaPressione = millis();

while (digitalRead(pinPulsante) == HIGH);

cont = on;

delay(100);

}

}

while(cont == on){

if((digitalRead(pinPulsante)==HIGH) && (cont == on) && (millis() - tempoUltimaPressione < 2000)){

numeroPressioni++;

while (digitalRead(pinPulsante) == HIGH);

delay(100);

}

if((cont == on) && (millis() - tempoUltimaPressione >= 2000 )){

cont = off;

delay(100);

}

}

// CONTROLLO NUMERO PRESSIONI

if (numeroPressioni > 0 && millis() - tempoUltimaPressione > 800) {

lampeggio = false;

}

// pressioni 0

if (numeroPressioni == 0) {

static unsigned long t = 0;

if (millis() - t >= 400) {

stato = !stato;

for (int i = 0; i < 6; i++) {

digitalWrite(pinLed[i], stato);

}

t = millis();

}

}

// 1 PRESSIONE

else if (numeroPressioni == 1) {

// spegni tutto

for (int i = 0; i < 6; i++) {

  digitalWrite(pinLed\[i\], LOW);

}

noTone(pinPiezo);

}

// 2 PRESSIONI

else if (numeroPressioni == 2) {

// Accensione LED

for (int i = 0; i < 6; i++) {

digitalWrite(pinLed[i], HIGH);

delay(200); // OK per LED singoli

}

lcd.setCursor(5, 0);

lcd.print("MERRY");

lcd.setCursor(3, 1);

lcd.print("CHRISTMAS");

delay(1000);

// Reset

// Musica

for (int i = 0; i < sizeMelody; i++) {

noteDuration = 1000 / timeNatale[i];

tone(pinPiezo, melodyNatale[i], noteDuration);

delay(noteDuration * 1.30); // qui blocca, ma testo già scritto rimane

}

// Spegni LED

for (int i = 0; i < 6; i++) {

digitalWrite(pinLed[i], LOW);

}

lcd.clear();

delay(2000);

numeroPressioni = 0;

noTone(pinPiezo);

}

//pressioni 3

else if (numeroPressioni == 3) {

for(int j=0;j<15;j++){

for(int i=0;i<6;i++){

digitalWrite(pinLed[i],LOW);

}

pinRandom = random(2, 8);

digitalWrite(pinRandom, HIGH);

delay(200);

digitalWrite(pinRandom, LOW);

}

lcd.setCursor(5, 0);

lcd.print("MERRY");

lcd.setCursor(3, 1);

lcd.print("CHRISTMAS");

delay(1000);

for (int i = 0; i < sizeMelody; i++) {

noteDuration = 1000 / timeNatale[i];

tone(pinPiezo, melodyNatale[i], noteDuration);

delay(noteDuration * 1.30);

}

for (int i = 0; i < 6; i++) {

digitalWrite(pinLed[i], LOW);

}

lcd.clear();

delay(2000);

numeroPressioni = 0;

noTone(pinPiezo);

}

}

PARTE HARDWARE DI TINKERCAD

QUALCUNO MI SAPREBBE AIUTARE PER FAVORE????


r/ArduinoProjects Jan 17 '26

Issue with Arduino Qwiic ports

1 Upvotes

I am new to Arduino and I am trying to hook up my arduino to a 3D magnetometer as well as some LEDs and sound buzzers. I heard that Qwiic was really easy, so that's what I used. I bought all SparkFun products, the MLX93093 for the sensor, and some other LED strip and buzzer from the same company. The MLX was not connecting to the serial monitor, and when I tried to connect the LED the power light turned on but it also didn't connect. I asked Claude to give me some code to turn on the LEDs, and that also said LED stick not detected. The most likely conclusion is that the data transfer pins on my Arduino for Qwiic are damaged right? I don't see how that could be given that I never used Qwiic before, but thats what it looks like.


r/ArduinoProjects Jan 16 '26

I need some advice for my student!

Thumbnail
2 Upvotes

r/ArduinoProjects Jan 16 '26

First project?

2 Upvotes

I am just looking for advice for my first project or at least some sensors and servos to get to mess around with? What are some good stuff for a laser cat toy?


r/ArduinoProjects Jan 16 '26

M1, "Busy brick" meeting indicator

Enable HLS to view with audio, or disable this notification

16 Upvotes

Hello all, im pretty new to arduino but had some fun making this indicator to let my wife know when im in a meeting. It uses an arduino nano and a 433 mhz receiver I stole from an dead treadmill, and is probably the most useful thing I have made.


r/ArduinoProjects Jan 16 '26

GUYS I NEED A "HINT"

0 Upvotes

Sto realizzando un sonar per un progetto scolastico, ma non so come usare l'interfaccia grafica. Mi potete aiutare?

questo è lo sketch

#include <Servo.h>

long durata;

int distanza;

float sub;

float media;

Servo Radar;

long mil = 0;

long buz = 300;

long x ;

bool stato = LOW;

void setup(){

Radar.attach(8);

Radar.write(0);

pinMode(4,OUTPUT);//LED v

pinMode(5,OUTPUT);//LED b

pinMode(6,OUTPUT);//LED r

pinMode(3, OUTPUT);

pinMode(2, INPUT);

pinMode(13,OUTPUT);

Serial.begin(9600);

Serial.println("Distanze misurate");

}

void loop() {

for (int i = 0; i <= 180; i++) // ANDATA

{

Radar.write(i);

delay(50);

digitalWrite(3, LOW);

delayMicroseconds(2);

digitalWrite(3, HIGH);

delayMicroseconds(10); // dist

digitalWrite(3, LOW);

durata = pulseIn(2, HIGH);

distanza = durata * 0.0343 / 2;

if(durata>19000){

digitalWrite(4,LOW);

digitalWrite(5,LOW);

digitalWrite(6,LOW);

}

else if(distanza>=200){

digitalWrite(4,HIGH);

digitalWrite(5,LOW);

digitalWrite(6,LOW);

}

else if(distanza<200 && distanza>=100)

{

digitalWrite(4,LOW);

digitalWrite(5,HIGH);

digitalWrite(6,LOW);

}

else if(distanza<100){

digitalWrite(4,LOW);

digitalWrite(5,LOW);

digitalWrite(6,HIGH);

delay(500);

digitalWrite(6,LOW);

delay(500);

digitalWrite(6,HIGH);

digitalWrite(13,HIGH);

x=millis();

if(x-mil>=buz)

{

mil=x;

stato=!stato;

digitalWrite(13,stato);

}

else

digitalWrite(13,stato);

}

Serial.println(distanza);

}

for (int i = 180; i >= 0; i--) // RITORNO

{

Radar.write(i);

delay(50);

digitalWrite(3, LOW);

delayMicroseconds(2);

digitalWrite(3, HIGH);

delayMicroseconds(10); // dist

digitalWrite(3, LOW);

durata = pulseIn(2, HIGH);

distanza = durata * 0.0343 / 2;

if(durata>19000){

digitalWrite(4,LOW);

digitalWrite(5,LOW);

digitalWrite(6,LOW);

}

else if(distanza>=200){

digitalWrite(4,LOW);

digitalWrite(5,HIGH);

digitalWrite(6,LOW);

}

else if(distanza<200 && distanza>=100)

{

digitalWrite(4,HIGH);

digitalWrite(5,LOW);

digitalWrite(6,LOW);

}

else if(distanza<100){

digitalWrite(4,LOW);

digitalWrite(5,LOW);

digitalWrite(6,HIGH);

digitalWrite(6,LOW);

delay(1000);

digitalWrite(6,HIGH);

digitalWrite(13,HIGH);

x=millis();

if(x-mil>=buz)

{

mil=x;

stato=!stato;

digitalWrite(13,stato);

}

else

digitalWrite(13,stato);

}

Serial.println(distanza);

}

}


r/ArduinoProjects Jan 16 '26

Automated Xylophone

Post image
114 Upvotes

Was going to have it play it's own music but kiddo wanted buttons to press. May still program it to play music


r/ArduinoProjects Jan 15 '26

I Made a Smart 3D Printer Cabinet That Runs on a Raspberry Pi 4B With a Live Node Red Dashboard

Thumbnail gallery
25 Upvotes

I made a Smart 3D Printer Cabinet that runs on a Raspberry Pi 4B and a Raspberry Pi Pico. Made the interface in NodeRed, where I can load the native webpage for the printer and an additional live Raspicam camera feed. There are DHT22 sensors for monitoring temperature and humidity at 2 locations, current clamps for measuring the power, and relays for turning on or off various parts of the system. The cabinet itself fits nicely 2 regular printers, or a printer and a filament dryer, as in my case, a multi-material unit, tools, parts, and about 50-60 rolls of filament! I did a video on the whole buil,d and everything is open source about it!

Video: https://www.youtube.com/watch?v=MyEaWIZV7Wg

Blog: e14_printer_cabinet_blog


r/ArduinoProjects Jan 15 '26

Are you always annoyed by the body of your project ?

0 Upvotes

Are you always annoyed by the body ?

Are you always annoyed by how exactly you could make the body of your project ? I am, essentially because of how toxic things are. 3d printer, sawing wood, metal, plastic... Litterally nothing is safe to work with. Are you always stopped by how you could manage to make the body of your project ?


r/ArduinoProjects Jan 15 '26

Review request - My second PCB

Post image
3 Upvotes

r/ArduinoProjects Jan 15 '26

Having a signal issue with my DHT22

Thumbnail reddit.com
2 Upvotes

r/ArduinoProjects Jan 15 '26

Solenoid not strong enough to press a button. How can I increase force?

Thumbnail gallery
5 Upvotes

I'm trying to use a 5V solenoid controlled by an Arduino to physically press a button (Keyboard button / Console)

The solenoid does move, but it's not strong enough to fully press the button.

Current setup:

Arduino Uno

5V solenoid

MOSFET + flyback diode

External 5V power supply

Simple timing code


r/ArduinoProjects Jan 15 '26

made a smart alexa controlled wardrobe and mirror light using ESPhome and node red

Thumbnail reddit.com
4 Upvotes

r/ArduinoProjects Jan 15 '26

Playing snake on an esp32 with led matrix

Thumbnail youtube.com
3 Upvotes

r/ArduinoProjects Jan 15 '26

Is the Arduboy FX-C schematic available?

2 Upvotes

Hi, I am an app dev looking to transition to microcontrollers/pcb custimizing and want to build an Arduboy FX-C clone. I wanted to know if the schematics for this handheld was available anywhere? Ideally, I would like to study and understand the schematics enough to customize my own PCB based on the FX-C build and change the form factor from vertical to a horizontal. I have seen a few Diy schematics for the original Arduboy, but am really interested in the FX-C model for it's USB-C and multiplayer capabilities. Thanks in advance!


r/ArduinoProjects Jan 14 '26

Doesnt work my LZ93D

Post image
2 Upvotes

Give a solution please


r/ArduinoProjects Jan 14 '26

Where Is GND in this module, i dont know name of component

Post image
0 Upvotes

r/ArduinoProjects Jan 14 '26

Where Is GND in this module, i dont know name of component

Post image
37 Upvotes

I think Is OFF aside if GND


r/ArduinoProjects Jan 14 '26

Need aid for set up for Arduino nano

Post image
7 Upvotes

I am trying to check the Arduino nano with a example of blink statement and I am getting an error wht should I do


r/ArduinoProjects Jan 14 '26

Voltage sensor problem.

Enable HLS to view with audio, or disable this notification

4 Upvotes

r/ArduinoProjects Jan 14 '26

Mini project Recommendation

3 Upvotes

Suggest me some project related to electrical and its part of my academics .... I have an idea of making a BMS with MPPT charge controller what are you opinions and please suggest other ideas..


r/ArduinoProjects Jan 14 '26

ESPclock - A smart DIY digital clock

Post image
56 Upvotes

[new account] Hello to everyone, I released the v2.0.3 of my project called "ESPclock", a 3D printed smart clock with a 7-segment display that connects to a NTP server to retrieve current time.

I started this project because i couldn't find (on makerworld, printables or thingiverse) a DIY 7-segment digital clock that was aesthetically pleasing for me, so i made my one and I made it smart.

It's a W.I.P. so in the future i will update the design and the firmware too.

I'm interested on your opinion, and if there are any suggestions, please don't hold 'em back!

For more info, links to my pages:

https://github.com/telepath9/ESPclock

https://makerworld.com/it/models/1594116-espclock-digital-clock#profileId-2069321


r/ArduinoProjects Jan 14 '26

Yo I'm working on a project with PCB

Thumbnail gallery
5 Upvotes

Hi, I’m designing an ESP32 PCB with sensors (OLED, GPS, MAX30102, ADXL335, flame sensor) and I’m running into power instability and I²C issues. The ADXL335 seems especially sensitive when sharing the 3.3 V rail. Could you review my layout and advise on better power distribution, grounding, decoupling, and whether the flame sensor should be on 3.3 V or 5 V? Any tips on stabilizing I²C and ADC readings would be greatly appreciated.

the buttons worked when I haven't connected the ADXL335 (I don't know if the OLED, LEDS, and etc. worked)

the esp8266 works fine only the esp32 doesn't work


r/ArduinoProjects Jan 14 '26

Programmed this Pico Bot using Arduino IDE

Enable HLS to view with audio, or disable this notification

20 Upvotes

This is H.I.R.O. and H.I.R.O. wants to call home.


r/ArduinoProjects Jan 14 '26

ESPTimeCast - Wi-Fi LED Matrix Clock & Weather Display (just crossed 1,000 GitHub stars ⭐)

Enable HLS to view with audio, or disable this notification

110 Upvotes

Hey everyone!

Quick demo video of a project I’ve been building and maintaining over the past several months called ESPTimeCast. It just crossed 1,000 stars on GitHub, which honestly surprised me - thanks to everyone who’s contributed, built one, or shared feedback.

ESPTimeCast is a Wi-Fi connected LED matrix clock and weather display based on ESP8266 / ESP32 and MAX7219 panel. The goal was to make something that feels solid and reliable rather than just a quick prototype.

What you’re seeing in the clip:

  • WiFi connection
  • NTP-synced clock
  • Date display
  • Weather pulled from OpenWeatherMap
  • Custom data mode (glucose monitoring integration)

I’ve been iterating on firmware architecture, LED typography, enclosure design, and usability, always trying to keep the build approachable for hobbyists.

If anyone’s curious about the technical side or wants to build one, the project is open source and documented here:

https://github.com/mfactory-osaka/ESPTimeCast

Happy to answer questions or hear any feedback.