Catia Diaz
MEXICO • + Follow
Edit Project
Tools, APP Software Used etc.
|
Soldering Iron Wire |
|
|
Soldering Iron Kit |
Description
Números aleatorios para dinámicas divertidas de participación
Lista de materiales completa:
5 Borneras de 2 terminales cada una
2 Cap 100n (SMD 1206)
2 Resistencias de 10k (SMD 1206)
2 Porta pilas para pila 18650
1 Regulador de voltaje SMD LM1117
1 tira de 5 pines
1 Buzzer (SMD 9650)
1 ESP32 C3 super mini
Mas detalles en el video tutorial
Code
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
// Configuración de la matriz
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 4 // Número de módulos en la matriz (4 módulos = 32 LEDs de ancho)
#define DIN_PIN 6
#define CS_PIN 7
#define CLK_PIN 4
MD_Parola matrix = MD_Parola(HARDWARE_TYPE, DIN_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
// Configuración del botón
#define BUTTON_PIN 5 // Boton 1
#define BUZZER_PIN 3 // Pin donde está conectado el buzzer
bool buttonState = false; // Estado actual del botón
bool lastButtonState = false; // Estado previo del botón
bool slowingDown = false; // Indica si está en modo de frenado
// Variables para el conteo
int currentNumber = 0; // Número actual mostrado en la matriz
unsigned long lastTime = 0; // Controla el tiempo para el conteo
unsigned long delayTime = 100; // Tiempo inicial entre números (100 ms)
int stopAfterCount = 6; // Números restantes antes de detenerse
int slowCount = 0; // Contador de números mostrados durante el frenado
void setup() {
pinMode(BUTTON_PIN, INPUT_PULLUP); // Configura el botón con resistencia interna
pinMode(BUZZER_PIN, OUTPUT); // Configura el pin del buzzer como salida
matrix.begin(); // Inicializa la matriz
matrix.setIntensity(4); // Configura el brillo (0 a 15)
matrix.displayClear(); // Limpia la matriz
matrix.setTextAlignment(PA_CENTER); // Alinea el texto al centro
}
void loop() {
// Leer el estado del botón
bool reading = !digitalRead(BUTTON_PIN); // Botón activo bajo
// Detectar flanco de presión del botón
if (reading && !lastButtonState) {
if (!buttonState) { // Si el conteo estaba detenido
buttonState = true; // Iniciar conteo rápido
delayTime = 100; // Restablecer velocidad rápida
// Emitir pitido por 350 ms
digitalWrite(BUZZER_PIN, HIGH); // Encender el buzzer (sonido)
delay(350);
digitalWrite(BUZZER_PIN, LOW); // Apagar el buzzer
} else { // Si el conteo estaba corriendo
slowingDown = true; // Iniciar frenado
stopAfterCount = 6; // Configurar los números restantes a 6
slowCount = 0; // Reiniciar contador del frenado
// Emitir un pitido corto
digitalWrite(BUZZER_PIN, HIGH); // Encender el buzzer
delay(100); // Esperar 100 ms
digitalWrite(BUZZER_PIN, LOW); // Apagar el buzzer
}
delay(350); // Evitar rebotes
}
lastButtonState = reading;
if (buttonState && !slowingDown) {
// Conteo rápido
if (millis() - lastTime >= delayTime) {
lastTime = millis();
displayNumber(currentNumber);
currentNumber++; // Avanzar al siguiente número
// Reiniciar si llegamos a 25
if (currentNumber > 24) currentNumber = 1;
}
} else if (slowingDown) {
// Frenado progresivo
if (millis() - lastTime >= delayTime) {
lastTime = millis();
displayNumber(currentNumber);
currentNumber++; // Avanzar al siguiente número
// Reiniciar si llegamos a 25
if (currentNumber > 24) currentNumber = 1;
slowCount++; // Incrementar el contador de números mostrados
delayTime += 150; // Incrementar más el tiempo entre números (ralentización)
// Detener después de mostrar 6 números
if (slowCount >= stopAfterCount) {
slowingDown = false; // Finalizar frenado
buttonState = false; // Detener conteo
// Emitir 5 pitidos cortos
for (int i = 0; i < 5; i++) {
digitalWrite(BUZZER_PIN, HIGH); // Encender el buzzer
delay(100); // Esperar 100 ms
digitalWrite(BUZZER_PIN, LOW); // Apagar el buzzer
delay(100); // Esperar 100 ms entre pitidos
}
}
}
}
}
// Función para mostrar un número en la matriz
void displayNumber(int number) {
char buf[3]; // Buffer para convertir número a texto
sprintf(buf, "%02d", number); // Formato 2 dígitos
matrix.displayClear(); // Limpia la matriz
matrix.print(buf); // Mostrar el número en la matriz
matrix.displayAnimate(); // Actualizar la animación
}
Schematic and Layout
Nov 29,2024
488 views
Números aleatorios para dinámicas divertidas de participación
2 Layers PCB 72 x 81 mm FR-4, 1.6 mm, 1, HASL lead free, Green Solder Mask, White silkscreen
Con esta tarjeta podrás conectar un buzzer, pilas 18650 y un Esp 32 C3 super mini para programar una matriz de 8 x 64 leds
488
1
0
Published: Nov 29,2024
Standard PCB
Download Gerber file 7
Purchase
Donation Received ($)
PCBWay Donate 10% cost To Author
Only PCB
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
Copy this HTML into your page to embed a link to order this shared project
Copy
Under the
Attribution-ShareAlike (CC BY-SA)
License.
- Comments(0)
- Likes(1)
Upload photo
You can only upload 5 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
0 / 10000
It looks like you have not written anything. Please add a comment and try again.
You can upload up to 5 images!
Image size should not exceed 2MB!
File format not supported!
View More
-
Raúl Celeita
Dec 05,2024
View More
VOTING
0 votes
- 0 USER VOTES
0.00
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Design
1/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Usability
2/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Creativity
3/4
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Content
4/4
More by Catia Diaz
-
Led strip 5630 SMD with screw terminal
This project is designed for 2 things. The first is so that people can practice soldering SMD compon...
-
Motion detector and notification on Telegram
Crea una alarma que te notifique en Telegram cuando alguien es detectado sin permiso en tu propiedad...
-
Level detector with ultrasonic sensor and telegram
Crea una alarma que te notifique cuando se le terminara la comida a tu perro en TelegramCon esta tar...
-
Bluetooth control for LED lights or motors with ESP32 C3
Con esta tarjeta puedes controlar vía Bluetooth motores o luces led con ayuda del ESP32 C3 (yo utili...
-
Control de luces led con servidor web y ESP32 C3
Te comparto todos los archivos que necesitas para realizar esta practica, encontraras 2 códigos de p...
-
CIRCUIT WITH ESP32 C3 TO CONTROL ELECTRIC LOCK
I will apply this circuit to build a safe to store the phone and thus not use it for a long time and...
-
Tarjeta para controlar un motor para Ruleta con ESP32 C3 Super Mini
Lista de materiales completa:2 Capacitores SMD 1206 100nF5 Borneras 3.5 mm de 2 terminales1 Buzzer S...
-
Tira led circular 2835 de 12V
Lista de materiales para la PCB:6 Leds 2835 (naranja)2 Resistencias 1206 100 Ohms1 Bornera 2 tornill...
-
Números aleatorios para dinámicas divertidas de participación
Lista de materiales completa:5 Borneras de 2 terminales cada una2 Cap 100n (SMD 1206)2 Resistencias ...
-
Numeros aleatorios matriz-
Se trata de una PCB con esp32 que permite controlar una matriz de leds ws2812bLista de materiales co...
-
Esp 32 wireless communication card
Here you can see more details of the programming process
-
Card for LED light sequence and memory game
Here you can find the complete tutorial to see how this game works.Characteristics of the assembly o...
-
Timer with 5-position selector and ESP 32 C3 super mini
Full tutorial in the following video
-
USB Charger
Its a charger with a 7 segments display to stop with the time the charge, its controlled with a esp3...
-
PCB for charging AA rechargeable batteries
With this card you can charge from 1 to 5 AA batteries independently. With the charger you can selec...
-
H bridge module to control crank
With the help of this H-bridge circuit we can control the rotation of a motor, and better yet, if we...
-
Design to control 7 segment display with switches
One way to connect a 7-segment display is using cables and switches.In order to form a number you wi...
-
Wireless control for motor dc
It is a pair of PCBs that allow transmitting a signal that is sent through 4 buttons and received by...
You may also like
-
-
AEL-2011 Power Supply Module
321 0 1 -
AEL-2011 50W Power Amplifier
295 0 1 -
-
-
Custom Mechanical Keyboard
564 0 0 -
Tester for Touch Screen Digitizer without using microcontroller
229 2 2 -
Audio reactive glow LED wristband/bracelet with NFC / RFID-Tags
235 0 1 -
-
-







