Catia Diaz
MEXICO • + Follow
Edit Project
Components
|
AC0603FR-0710K2LYageo
|
x 2 | |
|
ESP32-C3-Supermini |
x 1 |
Tools, APP Software Used etc.
|
Soldering Iron Kit |
|
|
Solder Wire, Lead Free |
Description
Numeros aleatorios matriz-
Se trata de una PCB con esp32 que permite controlar una matriz de leds ws2812b
Lista de materiales completa:
2 resistencias 10K (1206)
5 borneras de 2 terminales
1 buzzer SMD ()
2 portapilas para pila 18650
1 regulador a 5 V LM1117
2 Capacitores 100n ()
1 tira de 5 pines
1 ESP32 C3 Super mini
Video completo aqui:
Code
Programing CODE
Arduino
#include <Adafruit_NeoPixel.h>
// Definir el pin de datos y el tamaño de la matriz
#define PIN 7
#define NUM_PIXELS 64 // 8x8 matriz
#define BUTTON_PIN1 9 // Botón 1
#define BUTTON_PIN2 5 // Botón 2
// Configurar el objeto NeoPixel
Adafruit_NeoPixel matrix = Adafruit_NeoPixel(NUM_PIXELS, PIN, NEO_GRB + NEO_KHZ800);
// Colores para las flechas
#define VERDE matrix.Color(0, 255, 0)
#define BLANCO matrix.Color(255, 255, 255)
#define AZUL matrix.Color(0, 0, 255)
#define ROJO matrix.Color(255, 0, 0)
// Definir los frames para la flecha en movimiento de izquierda a derecha
const uint8_t frames[10][8][8] = {
// Frame 1 - Flecha en la columna 1
{
{1, 0, 0, 0, 0, 0, 0, 0},
{1, 1, 0, 0, 0, 0, 0, 0},
{1, 1, 1, 0, 0, 0, 0, 0},
{1, 1, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
},
// Frame 2 - Flecha en la columna 2
{
{0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
},
// Frame 3 - Flecha en la columna 3
{
{0, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0},
{0, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
},
// Frame 4 - Flecha en la columna 4
{
{0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 0},
{0, 0, 0, 0, 0, 1, 1, 1},
{0, 0, 0, 0, 0, 1, 1, 0},
{0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
},
// Frame 5 - Flecha en la columna 5
{
{0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
},
// Frame 6 - Flecha en la columna 6 (se reduce)
{
{0, 0, 0, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
},
// Frame 7 - Flecha en la columna 7 (más reducida)
{
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
},
// Frame 8 - Flecha desaparece en el borde
{
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
},
// Frame 9 y 10 - Vacío
{
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
},
};
// Función para configurar el color del LED en función de su posición
void setPixelColor(int x, int y, uint32_t color) {
int index = y * 8 + x; // Calcular el índice del LED en la matriz
matrix.setPixelColor(index, color);
}
// Función para mostrar un frame de la animación
void mostrarFrame(int frame, uint32_t color, bool reversed = false) {
// Apagar todos los LEDs primero
for (int i = 0; i < NUM_PIXELS; i++) {
matrix.setPixelColor(i, matrix.Color(0, 0, 0)); // Apagar LED
}
// Encender los LEDs correspondientes al frame actual
for (int y = 0; y < 8; y++) {
for (int x = 0; x < 8; x++) {
int posX = reversed ? 7 - x : x;
if (frames[frame][y][x] == 1) {
setPixelColor(posX, y, color); // Configurar color de la flecha
}
}
}
matrix.show(); // Actualizar la matriz
}
void apagarMatriz() {
for (int i = 0; i < NUM_PIXELS; i++) {
matrix.setPixelColor(i, matrix.Color(0, 0, 0)); // Apagar LED
}
matrix.show();
}
void setup() {
matrix.begin(); // Inicializar la matriz
matrix.show(); // Apagar todos los LEDs
pinMode(BUTTON_PIN1, INPUT_PULLUP);
pinMode(BUTTON_PIN2, INPUT_PULLUP);
}
void loop() {
// Verificar si el botón 1 está presionado
if (digitalRead(BUTTON_PIN1) == LOW) {
for (int frame = 0; frame < 10; frame++) {
mostrarFrame(frame, VERDE);
delay(50);
}
for (int frame = 0; frame < 10; frame++) {
mostrarFrame(frame, ROJO);
delay(50);
}
}
// Verificar si el botón 2 está presionado
else if (digitalRead(BUTTON_PIN2) == LOW) {
for (int frame = 0; frame < 10; frame++) {
mostrarFrame(frame, VERDE, true);
delay(50);
}
for (int frame = 0; frame < 10; frame++) {
mostrarFrame(frame, ROJO, true);
delay(50);
}
}
// Si no se presiona ningún botón, apagar los LEDs
else {
apagarMatriz();
}
}
Schematic and Layout
Nov 12,2024
97 views
Numeros aleatorios matriz-
2 Layers PCB 72 x 81 mm FR-4, 1.6 mm, 1, HASL lead free, Green Solder Mask, White silkscreen
Con esta tarjeta podras controlar leds ws2812
Conecte una matriz de leds neopixel para hacer una direccional para bicicleta.
97
0
0
Published: Nov 12,2024
Download Gerber file 3
Purchase
Donation Received ($)
PCBWay Donate 10% cost To Author
*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(0)
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
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...
- 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...
- Led lamp replacement This is a replacement for lamps commonly used in the ceiling.These lamps, being cheap, break down ea...
- 2835 SMD led strip for students One application that I gave to this circular LED strip is to illuminate a beverage counter.Use only ...
- Cube to make infinite led cube This effect will be achieved thanks to the use of mirrors and light, I used mirror glass and an LED ...
- Card to control intensity of LED strips If you want more details of the plate and an example of use, in this tutorial you can see the result...
- Double H Bridge with L9110 Integrated Circuit With the help of this card with 2 H bridges, we can change the rotation of geared motors.In addition...
- charger for 6 AA batteries Here you can see a tutorial where it is explained how to use the Imax B6 charger together with the P...
- Micro led strip 2835 of 12 volts Use this strip to have its intensity controlled with an RF controlSo you can find the arduino code t...
You may also like
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
113 0 0 -
DIY Laser Power Meter with Arduino
163 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
156 0 2 -
-
A DIY Soldering Station Perfect for Learning (Floppy Soldering Station 3.0)
564 0 3