Tabla de contenido:
- Paso 1: Recolección de materiales
- Paso 2: cableado de todos los componentes
- Paso 3: programación
- Paso 4: Toque de trabajo y acabado
Video: Impresionante reloj Arduino: 4 pasos
2024 Autor: John Day | [email protected]. Última modificación: 2024-01-30 08:42
Hemos visto muchos proyectos con arduino. Pero ahora, voy a mostrarte cómo construir un reloj con arduino y pantalla de 2 LCD. Es simple pero totalmente divertido. Todos pueden probarlo. ¡¡¡Entonces, alístate!!!
Paso 1: Recolección de materiales
Si quieres hacerlo, necesitarás algunos elementos. Estos artículos se pueden comprar fácilmente en la tienda minorista más cercana.
Que necesitarás:
- Arduino UNO R3Neo
- Anillo de píxeles 24
- Tabla de pan
- LCD 16x2
- Resistencia de 100 ohmios (2)
- Resistencia de 120 ohmios (2)
- Resistencia de 10 K ohmios (2)
- Presionar el botón
El diagrama de estas cosas se muestra arriba. Puede utilizar cualquier tabla de pan. Necesita 6 resistencias, sus valores están escritos arriba en la lista. También necesitará cables para la conexión. Estas pantallas LCD se mostrarán. El método de cableado del circuito se puede ver en el siguiente paso.
Paso 2: cableado de todos los componentes
Las cosas que necesitará. Lo he mostrado en el paso anterior, así que llévate conmigo el circuito de cables de la placa de pruebas.
Pasos de cableado:
- Coloque una resistencia de 100 ohmios en la parte superior de la placa de pan en la línea negativa.
- Coloque una resistencia de 120 ohmios en la parte superior de la placa de pruebas en la línea positiva.
- Coloque el botón pulsador (el diagrama se muestra arriba)
- Coloque una resistencia de 10 K ohmios debajo del botón pulsador
- Conecte resistencias de 100 ohmios (ambas) a la pantalla LCD con 'cátodo LED'
- Conecte resistencias de 120 ohmios (ambas) a la pantalla LCD con 'Ánodo LED'
- Conecte el terminal negativo de la placa de pruebas desde la línea superior a 'Lectura / Escritura'.
- Conecte el terminal negativo de la placa de pruebas desde la línea superior a 'Contraste'.
- Conecte el terminal positivo de la placa de pruebas desde la línea inferior a 'Vcc'.
- Conecte otro terminal negativo de la placa de pan de la línea superior de la placa de pan a "GND".
- Haga lo mismo en la segunda pantalla LCD, conecte todos estos como el anterior.
- Conecte las resistencias restantes a la línea negativa de la placa de pruebas.
- Conecte los pulsadores a la línea positiva.
- Conecte el terminal positivo y negativo de la placa de pruebas al "Neo Pixel Ring 24".
Ahora, ha conectado todos los componentes. Pero aún queda arduino. Diagrama de esto que se muestra arriba.
Pasos de cableado de arduino a todos los componentes:
- Conecte los botones pulsadores (Terminal22) a A0 y A1 de arduino.
- Conecte GND al terminal negativo de la placa de pruebas.
- Conecte 5 V al terminal positivo de la placa de pruebas.
- Conecte D13 de arduino a "Power" "Neo Pixel Ring 24"
- Conecte D7 de arduino a "Seleccionar registro" de LCD1.
- Conecte D8 de arduino a "Habilitar" de la pantalla LCD 2.
- Conecte D9 de arduino a "DB4" de LCD 2.
- Conecte D10 de arduino a "DB5" de LCD 2.
- Conecte D11 de arduino a "DB6" de LCD 2.
- Conecte D12 de arduino a "DB7" de LCD 2.
- Conecte D1 de arduino a "Seleccionar registro" de la pantalla LCD 1.
- Conecte D2 de arduino a "Habilitar" de la pantalla LCD 1.
- Conecte D3 de arduino a "DB4" de LCD 2.
- Conecte D4 de arduino a "DB5" de LCD 2.
- Conecte D5 de arduino a "DB6" de LCD 2.
- Conecte D6 de arduino a "DB7" de LCD 2.
El diagrama de todos los componentes después del cableado se muestra arriba.
Paso 3: programación
Has completado el circuito. Pero no funciona hasta que lo programes para este proyecto. Si eres experto y tienes experiencia lo programarás fácilmente. Espero que conozca el software que se utiliza para este propósito. Prográmelo en consecuencia si desea crear un cambio en la programación, pero recuerde que debe ser correcto. De lo contrario, no funcionará. Si no puede programarlo, puede copiarlo desde aquí o tomarlo de otra fuente.
#incluir
// LCD LiquidCrystal lcd1 izquierdo (7, 8, 9, 10, 11, 12); // LCD LiquidCrystal lcd2 derecho (1, 2, 3, 4, 5, 6); # include #ifdef _AVR_ #include # endif / / NeoPixel Ring 24 #define PIN 13 # define NUMPIXELS 24Adafruit_NeoPixel pixels = Adafruit_NeoPixel (NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int delayval = 50; long previousMillis = 0; intervalo largo = 950; int segundos = 0; int hora = 0; int horaButtonState = 0; int minButtonState = 0; byte completo [8] = {B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111,}; byte halfL [8] = {B11111, B11111, B11111, B11000111, B00000, B00000, B00000,}; byte halfR [8] = {B00000, B00000, B00000, B00000, B11111, B11111, B11111, B11111,}; // la rutina de configuración se ejecuta una vez al presionar reset: void setup () {// set alfileres de botón pinMode (14, ENTRADA); // establece el minuto pinMode (15, INPUT); // establecer la hora // crear caracteres personalizados lcd1.createChar (0, halfR); lcd1.createChar (1, mitad L); lcd1.createChar (2, completo); lcd2.createChar (0, halfR); lcd2.createChar (1, mitad L); lcd2.createChar (2, completo); // establece el tamaño de LCD1 lcd1.begin (16, 2); // establece el tamaño de LCD2 lcd2.begin (16, 2); // anillo de píxeles pixels.begin (); // configuración inicial lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); //pixels.setPixelColor(17, pixels. Color (0, 150, 0)); //pixels.setPixelColor(18, pixels. Color (0, 150, 0)); pixels.show (); } // la rutina del ciclo se repite una y otra vez para siempre: void loop () {hourButtonState = digitalRead (15); minButtonState = digitalRead (14); if (hourButtonState == HIGH) {hora ++; runClock (); } if (minButtonState == HIGH) {segundos ++; runClock (); } currentMillis largo sin firmar = millis (); if (currentMillis - previousMillis> intervalo) {if (segundos == 59) {segundos = 0; if (hora == 11) {hora = 0; } más {hora ++; }} else {segundos ++; } previousMillis = currentMillis; runClock (); } retraso (10); } void runClock () {if (segundos == 0) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); } if (segundos == 1 || segundos == 11 || segundos == 21 || segundos == 31 || segundos == 41 || segundos == 51) {lcd1.clear (); num1lcd1 (); } if (segundos == 2 || segundos == 12 || segundos == 22 || segundos == 32 || segundos == 42 || segundos == 52) {lcd1.clear (); num2lcd1 (); } if (segundos == 3 || segundos == 13 || segundos == 23 || segundos == 33 || segundos == 43 || segundos == 53) {lcd1.clear (); num3lcd1 (); } if (segundos == 4 || segundos == 14 || segundos == 24 || segundos == 34 || segundos == 44 || segundos == 54) {lcd1.clear (); num4lcd1 (); } if (segundos == 5 || segundos == 15 || segundos == 25 || segundos == 35 || segundos == 45 || segundos == 55) {lcd1.clear (); num5lcd1 (); } si (segundos == 6 || segundos == 16 || segundos == 26 || segundos == 36 || segundos == 46 || segundos == 56) {lcd1.clear (); num6lcd1 (); } if (segundos == 7 || segundos == 17 || segundos == 27 || segundos == 37 || segundos == 47 || segundos == 57) {lcd1.clear (); num7lcd1 (); } if (segundos == 8 || segundos == 18 || segundos == 28 || segundos == 38 || segundos == 48 || segundos == 58) {lcd1.clear (); num8lcd1 (); } if (segundos == 9 || segundos == 19 || segundos == 29 || segundos == 39 || segundos == 49 || segundos == 59) {lcd1.clear (); num9lcd1 (); } si (segundos == 10) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num1lcd2 (); } si (segundos == 20) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num2lcd2 (); } si (segundos == 30) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num3lcd2 (); } si (segundos == 40) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num4lcd2 (); } si (segundos == 50) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num5lcd2 (); } if (hora == 0) {píxeles.setPixelColor (15, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (16, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (17, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (18, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 1) {píxeles.setPixelColor (17, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (18, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (19, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (20, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 2) {píxeles.setPixelColor (19, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (20, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (21, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (22, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 3) {píxeles.setPixelColor (21, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (22, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (23, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (0, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 4) {píxeles.setPixelColor (23, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (0, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (1, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (2, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 5) {pixels.setPixelColor (1, pixels. Color (0, 0, 0)); píxeles.setPixelColor (2, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (3, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (4, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 6) {pixels.setPixelColor (3, pixels. Color (0, 0, 0)); píxeles.setPixelColor (4, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (5, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (6, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 7) {píxeles.setPixelColor (5, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (6, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (7, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (8, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 8) {píxeles.setPixelColor (7, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (8, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (9, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (10, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 9) {píxeles.setPixelColor (9, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (10, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (11, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (12, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 10) {píxeles.setPixelColor (11, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (12, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (13, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (14, píxeles. Color (0, 150, 0)); pixels.show (); } if (hora == 11) {píxeles.setPixelColor (13, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (14, píxeles. Color (0, 0, 0)); píxeles.setPixelColor (15, píxeles. Color (0, 150, 0)); píxeles.setPixelColor (16, píxeles. Color (0, 150, 0)); pixels.show (); }} void num0lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // lcd1.setCursor completo (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // mitad derecha lcd1.setCursor (1, 0); lcd1.write (byte (1)); // mitad izquierda lcd1.setCursor (2, 1); lcd1.write (byte (0)); lcd1.setCursor (2, 0); lcd1.write (byte (1)); lcd1.setCursor (3, 1); lcd1.write (byte (0)); lcd1.setCursor (3, 0); lcd1.write (byte (1)); lcd1.setCursor (4, 1); lcd1.write (byte (0)); lcd1.setCursor (4, 0); lcd1.write (byte (1)); lcd1.setCursor (5, 1); lcd1.write (byte (0)); lcd1.setCursor (5, 0); lcd1.write (byte (1)); lcd1.setCursor (6, 1); lcd1.write (byte (0)); lcd1.setCursor (6, 0); lcd1.write (byte (1)); lcd1.setCursor (7, 1); lcd1.write (byte (0)); lcd1.setCursor (7, 0); lcd1.write (byte (1)); lcd1.setCursor (8, 1); lcd1.write (byte (0)); lcd1.setCursor (8, 0); lcd1.write (byte (1)); lcd1.setCursor (9, 1); lcd1.write (byte (0)); lcd1.setCursor (9, 0); lcd1.write (byte (1)); lcd1.setCursor (10, 1); lcd1.write (byte (0)); lcd1.setCursor (10, 0); lcd1.write (byte (1)); lcd1.setCursor (11, 1); lcd1.write (byte (0)); lcd1.setCursor (11, 0); lcd1.write (byte (1)); lcd1.setCursor (12, 1); lcd1.write (byte (0)); lcd1.setCursor (12, 0); lcd1.write (byte (1)); lcd1.setCursor (13, 1); lcd1.write (byte (0)); lcd1.setCursor (13, 0); lcd1.write (byte (1)); lcd1.setCursor (14, 1); lcd1.write (byte (0)); lcd1.setCursor (14, 0); lcd1.write (byte (1)); lcd1.setCursor (15, 1); lcd1.write (byte (2)); lcd1.setCursor (15, 0); lcd1.write (byte (2)); } void num1lcd1 () {lcd1.setCursor (0, 1); lcd1.write (byte (0)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); lcd1.setCursor (2, 1); lcd1.write (byte (0)); lcd1.setCursor (3, 1); lcd1.write (byte (0)); lcd1.setCursor (4, 1); lcd1.write (byte (0)); lcd1.setCursor (5, 1); lcd1.write (byte (0)); lcd1.setCursor (6, 1); lcd1.write (byte (0)); lcd1.setCursor (7, 1); lcd1.write (byte (0)); lcd1.setCursor (8, 1); lcd1.write (byte (0)); lcd1.setCursor (9, 1); lcd1.write (byte (0)); lcd1.setCursor (10, 1); lcd1.write (byte (0)); lcd1.setCursor (11, 1); lcd1.write (byte (0)); lcd1.setCursor (12, 1); lcd1.write (byte (0)); lcd1.setCursor (13, 1); lcd1.write (byte (0)); lcd1.setCursor (14, 1); lcd1.write (byte (0)); lcd1.setCursor (15, 1); lcd1.write (byte (0)); } void num2lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // lcd1.setCursor completo (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 0); lcd1.write (byte (1)); // mitad izquierda lcd1.setCursor (2, 0); lcd1.write (byte (1)); lcd1.setCursor (3, 0); lcd1.write (byte (1)); lcd1.setCursor (4, 0); lcd1.write (byte (1)); lcd1.setCursor (5, 0); lcd1.write (byte (1)); lcd1.setCursor (6, 0); lcd1.write (byte (1)); lcd1.setCursor (7, 1); lcd1.write (byte (2)); lcd1.setCursor (7, 0); lcd1.write (byte (2)); lcd1.setCursor (8, 1); lcd1.write (byte (0)); lcd1.setCursor (9, 1); lcd1.write (byte (0)); lcd1.setCursor (10, 1); lcd1.write (byte (0)); lcd1.setCursor (11, 1); lcd1.write (byte (0)); lcd1.setCursor (12, 1); lcd1.write (byte (0)); lcd1.setCursor (13, 1); lcd1.write (byte (0)); lcd1.setCursor (14, 1); lcd1.write (byte (0)); lcd1.setCursor (15, 1); lcd1.write (byte (2)); lcd1.setCursor (15, 0); lcd1.write (byte (2)); } void num3lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // lcd1.setCursor completo (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // mitad derecha lcd1.setCursor (2, 1); lcd1.write (byte (0)); lcd1.setCursor (3, 1); lcd1.write (byte (0)); lcd1.setCursor (4, 1); lcd1.write (byte (0)); lcd1.setCursor (5, 1); lcd1.write (byte (0)); lcd1.setCursor (6, 1); lcd1.write (byte (0)); lcd1.setCursor (7, 1); lcd1.write (byte (2)); lcd1.setCursor (7, 0); lcd1.write (byte (2)); lcd1.setCursor (8, 1); lcd1.write (byte (0)); lcd1.setCursor (9, 1); lcd1.write (byte (0)); lcd1.setCursor (10, 1); lcd1.write (byte (0)); lcd1.setCursor (11, 1); lcd1.write (byte (0)); lcd1.setCursor (12, 1); lcd1.write (byte (0)); lcd1.setCursor (13, 1); lcd1.write (byte (0)); lcd1.setCursor (14, 1); lcd1.write (byte (0)); lcd1.setCursor (15, 1); lcd1.write (byte (2)); lcd1.setCursor (15, 0); lcd1.write (byte (2)); } void num4lcd1 () {lcd1.setCursor (0, 1); lcd1.write (byte (0)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); lcd1.setCursor (2, 1); lcd1.write (byte (0)); lcd1.setCursor (3, 1); lcd1.write (byte (0)); lcd1.setCursor (4, 1); lcd1.write (byte (0)); lcd1.setCursor (5, 1); lcd1.write (byte (0)); lcd1.setCursor (6, 1); lcd1.write (byte (0)); lcd1.setCursor (7, 1); lcd1.write (byte (2)); lcd1.setCursor (7, 0); lcd1.write (byte (2)); lcd1.setCursor (8, 0); lcd1.write (byte (1)); lcd1.setCursor (8, 1); lcd1.write (byte (0)); lcd1.setCursor (9, 0); lcd1.write (byte (1)); lcd1.setCursor (9, 1); lcd1.write (byte (0)); lcd1.setCursor (10, 0); lcd1.write (byte (1)); lcd1.setCursor (10, 1); lcd1.write (byte (0)); lcd1.setCursor (11, 0); lcd1.write (byte (1)); lcd1.setCursor (11, 1); lcd1.write (byte (0)); lcd1.setCursor (12, 0); lcd1.write (byte (1)); lcd1.setCursor (12, 1); lcd1.write (byte (0)); lcd1.setCursor (13, 0); lcd1.write (byte (1)); lcd1.setCursor (13, 1); lcd1.write (byte (0)); lcd1.setCursor (14, 0); lcd1.write (byte (1)); lcd1.setCursor (14, 1); lcd1.write (byte (0)); lcd1.setCursor (15, 0); lcd1.write (byte (1)); lcd1.setCursor (15, 1); lcd1.write (byte (0)); } void num5lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // lcd1.setCursor completo (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // mitad derecha lcd1.setCursor (2, 1); lcd1.write (byte (0)); lcd1.setCursor (3, 1); lcd1.write (byte (0)); lcd1.setCursor (4, 1); lcd1.write (byte (0)); lcd1.setCursor (5, 1); lcd1.write (byte (0)); lcd1.setCursor (6, 1); lcd1.write (byte (0)); lcd1.setCursor (7, 1); lcd1.write (byte (2)); lcd1.setCursor (7, 0); lcd1.write (byte (2)); lcd1.setCursor (8, 0); lcd1.write (byte (1)); lcd1.setCursor (9, 0); lcd1.write (byte (1)); lcd1.setCursor (10, 0); lcd1.write (byte (1)); lcd1.setCursor (11, 0); lcd1.write (byte (1)); lcd1.setCursor (12, 0); lcd1.write (byte (1)); lcd1.setCursor (13, 0); lcd1.write (byte (1)); lcd1.setCursor (14, 0); lcd1.write (byte (1)); lcd1.setCursor (15, 1); lcd1.write (byte (2)); lcd1.setCursor (15, 0); lcd1.write (byte (2)); } void num6lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // lcd1.setCursor completo (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // mitad derecha lcd1.setCursor (1, 0); lcd1.write (byte (1)); // mitad izquierda lcd1.setCursor (2, 1); lcd1.write (byte (0)); lcd1.setCursor (2, 0); lcd1.write (byte (1)); lcd1.setCursor (3, 1); lcd1.write (byte (0)); lcd1.setCursor (3, 0); lcd1.write (byte (1)); lcd1.setCursor (4, 1); lcd1.write (byte (0)); lcd1.setCursor (4, 0); lcd1.write (byte (1)); lcd1.setCursor (5, 1); lcd1.write (byte (0)); lcd1.setCursor (5, 0); lcd1.write (byte (1)); lcd1.setCursor (6, 1); lcd1.write (byte (0)); lcd1.setCursor (6, 0); lcd1.write (byte (1)); lcd1.setCursor (7, 1); lcd1.write (byte (2)); lcd1.setCursor (7, 0); lcd1.write (byte (2)); lcd1.setCursor (8, 0); lcd1.write (byte (1)); lcd1.setCursor (9, 0); lcd1.write (byte (1)); lcd1.setCursor (10, 0); lcd1.write (byte (1)); lcd1.setCursor (11, 0); lcd1.write (byte (1)); lcd1.setCursor (12, 0); lcd1.write (byte (1)); lcd1.setCursor (13, 0); lcd1.write (byte (1)); lcd1.setCursor (14, 0); lcd1.write (byte (1)); lcd1.setCursor (15, 1); lcd1.write (byte (2)); lcd1.setCursor (15, 0); lcd1.write (byte (2)); } void num7lcd1 () {lcd1.setCursor (0, 1); lcd1.write (byte (0)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); lcd1.setCursor (2, 1); lcd1.write (byte (0)); lcd1.setCursor (3, 1); lcd1.write (byte (0)); lcd1.setCursor (4, 1); lcd1.write (byte (0)); lcd1.setCursor (5, 1); lcd1.write (byte (0)); lcd1.setCursor (6, 1); lcd1.write (byte (0)); lcd1.setCursor (7, 1); lcd1.write (byte (0)); lcd1.setCursor (8, 1); lcd1.write (byte (0)); lcd1.setCursor (9, 1); lcd1.write (byte (0)); lcd1.setCursor (10,1); lcd1.write (byte (0)); lcd1.setCursor (11, 1); lcd1.write (byte (0)); lcd1.setCursor (12, 1); lcd1.write (byte (0)); lcd1.setCursor (13, 1); lcd1.write (byte (0)); lcd1.setCursor (14, 1); lcd1.write (byte (0)); lcd1.setCursor (15, 1); lcd1.write (byte (2)); lcd1.setCursor (15, 0); lcd1.write (byte (2)); } void num8lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // lcd1.setCursor completo (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // mitad derecha lcd1.setCursor (1, 0); lcd1.write (byte (1)); // mitad izquierda lcd1.setCursor (2, 1); lcd1.write (byte (0)); lcd1.setCursor (2, 0); lcd1.write (byte (1)); lcd1.setCursor (3, 1); lcd1.write (byte (0)); lcd1.setCursor (3, 0); lcd1.write (byte (1)); lcd1.setCursor (4, 1); lcd1.write (byte (0)); lcd1.setCursor (4, 0); lcd1.write (byte (1)); lcd1.setCursor (5, 1); lcd1.write (byte (0)); lcd1.setCursor (5, 0); lcd1.write (byte (1)); lcd1.setCursor (6, 1); lcd1.write (byte (0)); lcd1.setCursor (6, 0); lcd1.write (byte (1)); lcd1.setCursor (7, 1); lcd1.write (byte (2)); lcd1.setCursor (7, 0); lcd1.write (byte (2)); lcd1.setCursor (8, 1); lcd1.write (byte (0)); lcd1.setCursor (8, 0); lcd1.write (byte (1)); lcd1.setCursor (9, 1); lcd1.write (byte (0)); lcd1.setCursor (9, 0); lcd1.write (byte (1)); lcd1.setCursor (10, 1); lcd1.write (byte (0)); lcd1.setCursor (10, 0); lcd1.write (byte (1)); lcd1.setCursor (11, 1); lcd1.write (byte (0)); lcd1.setCursor (11, 0); lcd1.write (byte (1)); lcd1.setCursor (12, 1); lcd1.write (byte (0)); lcd1.setCursor (12, 0); lcd1.write (byte (1)); lcd1.setCursor (13, 1); lcd1.write (byte (0)); lcd1.setCursor (13, 0); lcd1.write (byte (1)); lcd1.setCursor (14, 1); lcd1.write (byte (0)); lcd1.setCursor (14, 0); lcd1.write (byte (1)); lcd1.setCursor (15, 1); lcd1.write (byte (2)); lcd1.setCursor (15, 0); lcd1.write (byte (2)); } void num9lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); lcd1.setCursor (2, 1); lcd1.write (byte (0)); lcd1.setCursor (3, 1); lcd1.write (byte (0)); lcd1.setCursor (4, 1); lcd1.write (byte (0)); lcd1.setCursor (5, 1); lcd1.write (byte (0)); lcd1.setCursor (6, 1); lcd1.write (byte (0)); lcd1.setCursor (7, 1); lcd1.write (byte (2)); lcd1.setCursor (7, 0); lcd1.write (byte (2)); lcd1.setCursor (8, 0); lcd1.write (byte (1)); lcd1.setCursor (8, 1); lcd1.write (byte (0)); lcd1.setCursor (9, 0); lcd1.write (byte (1)); lcd1.setCursor (9, 1); lcd1.write (byte (0)); lcd1.setCursor (10, 0); lcd1.write (byte (1)); lcd1.setCursor (10, 1); lcd1.write (byte (0)); lcd1.setCursor (11, 0); lcd1.write (byte (1)); lcd1.setCursor (11, 1); lcd1.write (byte (0)); lcd1.setCursor (12, 0); lcd1.write (byte (1)); lcd1.setCursor (12, 1); lcd1.write (byte (0)); lcd1.setCursor (13, 0); lcd1.write (byte (1)); lcd1.setCursor (13, 1); lcd1.write (byte (0)); lcd1.setCursor (14, 0); lcd1.write (byte (1)); lcd1.setCursor (14, 1); lcd1.write (byte (0)); lcd1.setCursor (15, 0); lcd1.write (byte (2)); lcd1.setCursor (15, 1); lcd1.write (byte (2)); } void num0lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // lcd2.setCursor completo (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); // mitad derecha lcd2.setCursor (1, 0); lcd2.write (byte (1)); // mitad izquierda lcd2.setCursor (2, 1); lcd2.write (byte (0)); lcd2.setCursor (2, 0); lcd2.write (byte (1)); lcd2.setCursor (3, 1); lcd2.write (byte (0)); lcd2.setCursor (3, 0); lcd2.write (byte (1)); lcd2.setCursor (4, 1); lcd2.write (byte (0)); lcd2.setCursor (4, 0); lcd2.write (byte (1)); lcd2.setCursor (5, 1); lcd2.write (byte (0)); lcd2.setCursor (5, 0); lcd2.write (byte (1)); lcd2.setCursor (6, 1); lcd2.write (byte (0)); lcd2.setCursor (6, 0); lcd2.write (byte (1)); lcd2.setCursor (7, 1); lcd2.write (byte (0)); lcd2.setCursor (7, 0); lcd2.write (byte (1)); lcd2.setCursor (8, 1); lcd2.write (byte (0)); lcd2.setCursor (8, 0); lcd2.write (byte (1)); lcd2.setCursor (9, 1); lcd2.write (byte (0)); lcd2.setCursor (9, 0); lcd2.write (byte (1)); lcd2.setCursor (10, 1); lcd2.write (byte (0)); lcd2.setCursor (10, 0); lcd2.write (byte (1)); lcd2.setCursor (11, 1); lcd2.write (byte (0)); lcd2.setCursor (11, 0); lcd2.write (byte (1)); lcd2.setCursor (12, 1); lcd2.write (byte (0)); lcd2.setCursor (12, 0); lcd2.write (byte (1)); lcd2.setCursor (13, 1); lcd2.write (byte (0)); lcd2.setCursor (13, 0); lcd2.write (byte (1)); lcd2.setCursor (14, 1); lcd2.write (byte (0)); lcd2.setCursor (14, 0); lcd2.write (byte (1)); lcd2.setCursor (15, 1); lcd2.write (byte (2)); lcd2.setCursor (15, 0); lcd2.write (byte (2)); } void num1lcd2 () {lcd2.setCursor (0, 1); lcd2.write (byte (0)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); lcd2.setCursor (2, 1); lcd2.write (byte (0)); lcd2.setCursor (3, 1); lcd2.write (byte (0)); lcd2.setCursor (4, 1); lcd2.write (byte (0)); lcd2.setCursor (5, 1); lcd2.write (byte (0)); lcd2.setCursor (6, 1); lcd2.write (byte (0)); lcd2.setCursor (7, 1); lcd2.write (byte (0)); lcd2.setCursor (8, 1); lcd2.write (byte (0)); lcd2.setCursor (9, 1); lcd2.write (byte (0)); lcd2.setCursor (10, 1); lcd2.write (byte (0)); lcd2.setCursor (11, 1); lcd2.write (byte (0)); lcd2.setCursor (12, 1); lcd2.write (byte (0)); lcd2.setCursor (13, 1); lcd2.write (byte (0)); lcd2.setCursor (14, 1); lcd2.write (byte (0)); lcd2.setCursor (15, 1); lcd2.write (byte (0)); } void num2lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // lcd2.setCursor completo (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 0); lcd2.write (byte (1)); // mitad izquierda lcd2.setCursor (2, 0); lcd2.write (byte (1)); lcd2.setCursor (3, 0); lcd2.write (byte (1)); lcd2.setCursor (4, 0); lcd2.write (byte (1)); lcd2.setCursor (5, 0); lcd2.write (byte (1)); lcd2.setCursor (6, 0); lcd2.write (byte (1)); lcd2.setCursor (7, 1); lcd2.write (byte (2)); lcd2.setCursor (7, 0); lcd2.write (byte (2)); lcd2.setCursor (8, 1); lcd2.write (byte (0)); lcd2.setCursor (9, 1); lcd2.write (byte (0)); lcd2.setCursor (10, 1); lcd2.write (byte (0)); lcd2.setCursor (11, 1); lcd2.write (byte (0)); lcd2.setCursor (12, 1); lcd2.write (byte (0)); lcd2.setCursor (13, 1); lcd2.write (byte (0)); lcd2.setCursor (14, 1); lcd2.write (byte (0)); lcd2.setCursor (15, 1); lcd2.write (byte (2)); lcd2.setCursor (15, 0); lcd2.write (byte (2)); } void num3lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // lcd2.setCursor completo (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); // mitad derecha lcd2.setCursor (2, 1); lcd2.write (byte (0)); lcd2.setCursor (3, 1); lcd2.write (byte (0)); lcd2.setCursor (4, 1); lcd2.write (byte (0)); lcd2.setCursor (5, 1); lcd2.write (byte (0)); lcd2.setCursor (6, 1); lcd2.write (byte (0)); lcd2.setCursor (7, 1); lcd2.write (byte (2)); lcd2.setCursor (7, 0); lcd2.write (byte (2)); lcd2.setCursor (8, 1); lcd2.write (byte (0)); lcd2.setCursor (9, 1); lcd2.write (byte (0)); lcd2.setCursor (10, 1); lcd2.write (byte (0)); lcd2.setCursor (11, 1); lcd2.write (byte (0)); lcd2.setCursor (12, 1); lcd2.write (byte (0)); lcd2.setCursor (13, 1); lcd2.write (byte (0)); lcd2.setCursor (14, 1); lcd2.write (byte (0)); lcd2.setCursor (15, 1); lcd2.write (byte (2)); lcd2.setCursor (15, 0); lcd2.write (byte (2)); } void num4lcd2 () {lcd2.setCursor (0, 1); lcd2.write (byte (0)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); lcd2.setCursor (2, 1); lcd2.write (byte (0)); lcd2.setCursor (3, 1); lcd2.write (byte (0)); lcd2.setCursor (4, 1); lcd2.write (byte (0)); lcd2.setCursor (5, 1); lcd2.write (byte (0)); lcd2.setCursor (6, 1); lcd2.write (byte (0)); lcd2.setCursor (7, 1); lcd2.write (byte (2)); lcd2.setCursor (7, 0); lcd2.write (byte (2)); lcd2.setCursor (8, 0); lcd2.write (byte (1)); lcd2.setCursor (8, 1); lcd2.write (byte (0)); lcd2.setCursor (9, 0); lcd2.write (byte (1)); lcd2.setCursor (9, 1); lcd2.write (byte (0)); lcd2.setCursor (10, 0); lcd2.write (byte (1)); lcd2.setCursor (10, 1); lcd2.write (byte (0)); lcd2.setCursor (11, 0); lcd2.write (byte (1)); lcd2.setCursor (11, 1); lcd2.write (byte (0)); lcd2.setCursor (12, 0); lcd2.write (byte (1)); lcd2.setCursor (12, 1); lcd2.write (byte (0)); lcd2.setCursor (13, 0); lcd2.write (byte (1)); lcd2.setCursor (13, 1); lcd2.write (byte (0)); lcd2.setCursor (14, 0); lcd2.write (byte (1)); lcd2.setCursor (14, 1); lcd2.write (byte (0)); lcd2.setCursor (15, 0); lcd2.write (byte (1)); lcd2.setCursor (15, 1); lcd2.write (byte (0)); } void num5lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // lcd2.setCursor completo (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); // mitad derecha lcd2.setCursor (2, 1); lcd2.write (byte (0)); lcd2.setCursor (3, 1); lcd2.write (byte (0)); lcd2.setCursor (4, 1); lcd2.write (byte (0)); lcd2.setCursor (5, 1); lcd2.write (byte (0)); lcd2.setCursor (6, 1); lcd2.write (byte (0)); lcd2.setCursor (7, 1); lcd2.write (byte (2)); lcd2.setCursor (7, 0); lcd2.write (byte (2)); lcd2.setCursor (8, 0); lcd2.write (byte (1)); lcd2.setCursor (9, 0); lcd2.write (byte (1)); lcd2.setCursor (10, 0); lcd2.write (byte (1)); lcd2.setCursor (11, 0); lcd2.write (byte (1)); lcd2.setCursor (12, 0); lcd2.write (byte (1)); lcd2.setCursor (13, 0); lcd2.write (byte (1)); lcd2.setCursor (14, 0); lcd2.write (byte (1)); lcd2.setCursor (15, 1); lcd2.write (byte (2)); lcd2.setCursor (15, 0); lcd2.write (byte (2)); }
Paso 4: Toque de trabajo y acabado
Conecte su arduino a la computadora y déjelo funcionar. Espero que su reloj funcione. Está funcionando pero parece tan desordenado. Tantas resistencias y cables que no es bueno. Por lo tanto, coloque todos los componentes en la caja y corte un orificio para pintar la caja con pantalla LCD y darle un aspecto de reloj digital.
No lo he creado en real pero lo he diseñado en AUTODESK CIRCUITS. Lo diseñaré en real y publicaré el video de trabajo. No soy un hablante nativo. Si ha cometido algún error infórmeme en mensajes privados. Y lamento ese error. También he tomado alguna idea de "Dan's arduino Clock". Nos vemos con otro instructable.
Recomendado:
Cómo hacer un reloj analógico y un reloj digital con una tira de LED usando Arduino: 3 pasos
Cómo hacer un reloj analógico y un reloj digital con una tira de LED usando Arduino: Hoy haremos un reloj analógico & Reloj digital con Led Strip y módulo MAX7219 Dot con Arduino, corregirá la hora con la zona horaria local. El reloj analógico puede usar una tira de LED más larga, por lo que se puede colgar en la pared para convertirse en una obra de arte
Reloj de jubilación / Cuenta ascendente / Reloj Dn: 4 pasos (con imágenes)
Reloj de jubilación / Count Up / Dn Clock: Tenía algunas de estas pantallas de matriz de puntos LED de 8x8 en el cajón y estaba pensando qué hacer con ellas. Inspirado por otros instructables, tuve la idea de construir una pantalla de cuenta regresiva / ascendente para contar regresivamente hasta una fecha / hora futura y si el tiempo objetivo p
Proyecto impresionante con reloj de pared: 11 pasos
Proyecto impresionante con reloj de pared: Hola amigo, este blog será increíble porque en este blog haré un circuito de efectos LED increíble usando el reloj de pared antiguo
Reloj de red ESP8266 sin ningún RTC - Reloj Nodemcu NTP Sin RTC - PROYECTO RELOJ DE INTERNET: 4 Pasos
Reloj de red ESP8266 sin ningún RTC | Reloj Nodemcu NTP Sin RTC | PROYECTO DE RELOJ DE INTERNET: En el proyecto se realizará un proyecto de reloj sin RTC, se tomará tiempo de Internet usando wifi y lo mostrará en la pantalla st7735
Hacer un reloj con M5stick C usando Arduino IDE - Reloj de tiempo real RTC con M5stack M5stick-C: 4 pasos
Hacer un reloj con M5stick C usando Arduino IDE | Reloj en tiempo real RTC con M5stack M5stick-C: Hola chicos, en este instructables aprenderemos cómo hacer un reloj con la placa de desarrollo m5stick-C de m5stack usando Arduino IDE. Entonces m5stick mostrará la fecha, hora y amp; semana del mes en la pantalla