Tabla de contenido:

Impresionante reloj Arduino: 4 pasos
Impresionante reloj Arduino: 4 pasos

Video: Impresionante reloj Arduino: 4 pasos

Video: Impresionante reloj Arduino: 4 pasos
Video: TOP 15 Proyectos con Arduino 2022 2024, Noviembre
Anonim
Impresionante reloj Arduino
Impresionante reloj Arduino

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

Recolección de materiales
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:

  1. Arduino UNO R3Neo
  2. Anillo de píxeles 24
  3. Tabla de pan
  4. LCD 16x2
  5. Resistencia de 100 ohmios (2)
  6. Resistencia de 120 ohmios (2)
  7. Resistencia de 10 K ohmios (2)
  8. 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

Cableado de todos los componentes
Cableado de todos los componentes
Cableado de todos los componentes
Cableado de todos los componentes
Cableado de todos los componentes
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:

  1. Coloque una resistencia de 100 ohmios en la parte superior de la placa de pan en la línea negativa.
  2. Coloque una resistencia de 120 ohmios en la parte superior de la placa de pruebas en la línea positiva.
  3. Coloque el botón pulsador (el diagrama se muestra arriba)
  4. Coloque una resistencia de 10 K ohmios debajo del botón pulsador
  5. Conecte resistencias de 100 ohmios (ambas) a la pantalla LCD con 'cátodo LED'
  6. Conecte resistencias de 120 ohmios (ambas) a la pantalla LCD con 'Ánodo LED'
  7. Conecte el terminal negativo de la placa de pruebas desde la línea superior a 'Lectura / Escritura'.
  8. Conecte el terminal negativo de la placa de pruebas desde la línea superior a 'Contraste'.
  9. Conecte el terminal positivo de la placa de pruebas desde la línea inferior a 'Vcc'.
  10. Conecte otro terminal negativo de la placa de pan de la línea superior de la placa de pan a "GND".
  11. Haga lo mismo en la segunda pantalla LCD, conecte todos estos como el anterior.
  12. Conecte las resistencias restantes a la línea negativa de la placa de pruebas.
  13. Conecte los pulsadores a la línea positiva.
  14. 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:

  1. Conecte los botones pulsadores (Terminal22) a A0 y A1 de arduino.
  2. Conecte GND al terminal negativo de la placa de pruebas.
  3. Conecte 5 V al terminal positivo de la placa de pruebas.
  4. Conecte D13 de arduino a "Power" "Neo Pixel Ring 24"
  5. Conecte D7 de arduino a "Seleccionar registro" de LCD1.
  6. Conecte D8 de arduino a "Habilitar" de la pantalla LCD 2.
  7. Conecte D9 de arduino a "DB4" de LCD 2.
  8. Conecte D10 de arduino a "DB5" de LCD 2.
  9. Conecte D11 de arduino a "DB6" de LCD 2.
  10. Conecte D12 de arduino a "DB7" de LCD 2.
  11. Conecte D1 de arduino a "Seleccionar registro" de la pantalla LCD 1.
  12. Conecte D2 de arduino a "Habilitar" de la pantalla LCD 1.
  13. Conecte D3 de arduino a "DB4" de LCD 2.
  14. Conecte D4 de arduino a "DB5" de LCD 2.
  15. Conecte D5 de arduino a "DB6" de LCD 2.
  16. 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

Programación
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

Toque de trabajo y acabado
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: