Sommario:

Fantastico orologio Arduino: 4 passaggi
Fantastico orologio Arduino: 4 passaggi

Video: Fantastico orologio Arduino: 4 passaggi

Video: Fantastico orologio Arduino: 4 passaggi
Video: SH143 - Orologio Nixie Open Source 2024, Novembre
Anonim
Fantastico orologio Arduino
Fantastico orologio Arduino

Abbiamo visto molti progetti con arduino. Ma ora, ti mostrerò come costruire un orologio con arduino e 2 display LCD. È semplice ma totalmente divertente. Tutti possono provarlo. Quindi, preparati!!!

Passaggio 1: raccolta dei materiali

Materiali di raccolta
Materiali di raccolta

Se vuoi realizzarlo avrai bisogno di alcuni elementi. Questi articoli possono essere facilmente acquistati dal tuo negozio al dettaglio più vicino.

Di cosa avrai bisogno:

  1. Arduino UNO R3Neo
  2. Anello pixel 24
  3. Tagliere di pane
  4. LCD 16x2
  5. Resistenza da 100 Ohm (2)
  6. Resistenza da 120 Ohm (2)
  7. Resistenza da 10 KOhm (2)
  8. Premi il bottone

Il diagramma di queste cose è mostrato sopra. Puoi usare qualsiasi tagliere per pane. Hai bisogno di 6 resistori i loro valori sono scritti sopra nell'elenco. Avrai anche bisogno di cavi per la connessione. Questi LCD verranno visualizzati. Il metodo di cablaggio del circuito che puoi vedere nel passaggio successivo.

Passaggio 2: cablaggio di tutti i componenti

Cablaggio di tutti i componenti
Cablaggio di tutti i componenti
Cablaggio di tutti i componenti
Cablaggio di tutti i componenti
Cablaggio di tutti i componenti
Cablaggio di tutti i componenti

Le cose di cui avrai bisogno. Ho mostrato nel passaggio precedente, quindi porta con me il tuo circuito di filo della breadboard.

Passaggi di cablaggio:

  1. Posizionare la resistenza da 100 Ohm sul lato superiore della breadboard sulla linea negativa.
  2. Posizionare la resistenza da 120 Ohm sul lato superiore della breadboard sulla linea positiva.
  3. Posiziona il pulsante (il diagramma è mostrato sopra)
  4. Posizionare una resistenza da 10 K Ohm sotto il pulsante
  5. Collegare resistori da 100 Ohm (entrambi) al display LCD con 'LED Cathode'
  6. Collegare resistori da 120 Ohm (entrambi) al display LCD con 'LED Anode'
  7. Collegare il terminale negativo della breadboard dalla riga superiore a 'Lettura/Scrittura'.
  8. Collegare il terminale negativo della breadboard dalla riga superiore a "Contrasto".
  9. Collegare il terminale positivo della breadboard dalla linea inferiore a 'Vcc'.
  10. Collegare un altro terminale negativo della breadboard dalla linea superiore della breadboard a "GND".
  11. Fai lo stesso sul secondo LCD, collega tutti questi come in precedenza.
  12. Collegare le resistenze rimanenti alla linea negativa della breadboard.
  13. Collegare i pulsanti alla linea positiva.
  14. Collegare il terminale positivo e negativo della breadboard a "Neo Pixel Ring 24".

Ora hai collegato tutti i componenti. Ma arduino è ancora rimasto. Diagramma di questo mostrato sopra.

Passaggi di cablaggio di arduino a tutti i componenti:

  1. Collegare i pulsanti (morsetto22) a A0 e A1 di arduino.
  2. Collegare GND al terminale negativo della breadboard.
  3. Collegare 5V al terminale positivo della breadboard.
  4. Collega D13 di arduino a "Potenza di " "Neo Pixel Ring 24"
  5. Collega D7 di arduino a "Register Select" di LCD1.
  6. Collega D8 di arduino a "Abilita" di LCD 2.
  7. Collega D9 di arduino a "DB4" di LCD 2.
  8. Collega D10 di arduino a "DB5" di LCD 2.
  9. Collega D11 di arduino a "DB6" di LCD 2.
  10. Collega D12 di arduino a "DB7" di LCD 2.
  11. Collega D1 di arduino a "Register Select" di LCD 1.
  12. Collega D2 di arduino a "Abilita" di LCD 1.
  13. Collega D3 di arduino a "DB4" di LCD 2.
  14. Collega D4 di arduino a "DB5" di LCD 2.
  15. Collega D5 di arduino a "DB6" di LCD 2.
  16. Collega D6 di arduino a "DB7" di LCD 2.

Lo schema di tutti i componenti dopo il cablaggio è mostrato sopra.

Passaggio 3: programmazione

Programmazione
Programmazione

Hai completato il circuito. Ma non funziona finché non lo programmi per questo progetto. Se sei esperto e hai esperienza lo programmi facilmente. Spero che tu conosca il software che viene utilizzato per questo scopo. Programmalo di conseguenza se vuoi creare cambiamenti nella programmazione, ma ricorda che deve essere corretto. Altrimenti non funzionerà. Se non puoi programmarlo puoi copiarlo da qui o prenderlo da un'altra fonte.

#includere

// LCD sinistro LiquidCrystal lcd1(7, 8, 9, 10, 11, 12); // LCD destro LiquidCrystal lcd2(1, 2, 3, 4, 5, 6);#include #ifdef _AVR_ #include #endif/ / NeoPixel Ring 24 #define PIN 13#define NUMPIXELS 24Adafruit_NeoPixel pixel = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);int delayval = 50;long previousMillis = 0; intervallo lungo = 950; int secondi = 0; int ora = 0;int oraButtonState = 0; int minButtonState = 0;byte full[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111, };byte halfL[8] = { B11111, B11111, B11111, B11111, B00000, B00000, B00000, B00000, };byte halfR[8] = { B00000, B00000, B00000, B00000, B11111, B11111, B11111, B11111, };// la routine di installazione viene eseguita una volta quando si preme reset: void setup() { // set pin del pulsante pinMode(14, INPUT); // imposta minuti pinMode(15, INPUT); // imposta l'ora // crea caratteri personalizzati lcd1.createChar(0, halfR); lcd1.createChar(1, halfL); lcd1.createChar(2, completo); lcd2.createChar(0, metàR); lcd2.createChar(1, halfL); lcd2.createChar(2, completo); // imposta la dimensione di LCD1 lcd1.begin(16, 2); // imposta la dimensione di LCD2 lcd2.begin(16, 2); // anello di pixel pixels.begin(); // configurazione iniziale lcd1.clear(); numero0lcd1(); lcd2.clear(); numero0lcd2(); //pixels.setPixelColor(17, pixels. Color(0, 150, 0)); //pixels.setPixelColor(18, pixels. Color(0, 150, 0)); pixel.mostra(); }// la routine del ciclo viene eseguita più e più volte per sempre: void loop() { hourButtonState = digitalRead(15); minButtonState = digitalRead(14); if (hourButtonState == HIGH) { hour++; runClock (); } if (minButtonState == HIGH) { secondi++; runClock (); } unsigned long currentMillis = millis(); if (Milliscorrente -Millisprecedente > intervallo) { if (secondi == 59) { secondi = 0; if (ora == 11) { ora = 0; } else { ora ++; } } else { secondi ++; } precedenteMillis = CurrentMillis; runClock (); } ritardo(10); }void runClock() { if (secondi == 0) { lcd1.clear(); numero0lcd1(); lcd2.clear(); numero0lcd2(); } if (secondi == 1 || secondi == 11 || secondi == 21 || secondi == 31 || secondi == 41 || secondi == 51) { lcd1.clear(); num1lcd1(); } if (secondi == 2 || secondi == 12 || secondi == 22 || secondi == 32 || secondi == 42 || secondi == 52) { lcd1.clear(); num2lcd1(); } if (secondi == 3 || secondi == 13 || secondi == 23 || secondi == 33 || secondi == 43 || secondi == 53) { lcd1.clear(); num3lcd1(); } if (secondi == 4 || secondi == 14 || secondi == 24 || secondi == 34 || secondi == 44 || secondi == 54) { lcd1.clear(); num4lcd1(); } if (secondi == 5 || secondi == 15 || secondi == 25 || secondi == 35 || secondi == 45 || secondi == 55) { lcd1.clear(); num5lcd1(); } if (secondi == 6 || secondi == 16 || secondi == 26 || secondi == 36 || secondi == 46 || secondi == 56) { lcd1.clear(); num6lcd1(); } if (secondi == 7 || secondi == 17 || secondi == 27 || secondi == 37 || secondi == 47 || secondi == 57) { lcd1.clear(); num7lcd1(); } if (secondi == 8 || secondi == 18 || secondi == 28 || secondi == 38 || secondi == 48 || secondi == 58) { lcd1.clear(); num8lcd1(); } if (secondi == 9 || secondi == 19 || secondi == 29 || secondi == 39 || secondi == 49 || secondi == 59) { lcd1.clear(); numero9lcd1(); } if (secondi == 10) { lcd1.clear(); numero0lcd1(); lcd2.clear(); num1lcd2(); } if (secondi == 20) { lcd1.clear(); numero0lcd1(); lcd2.clear(); num2lcd2(); } if (secondi == 30) { lcd1.clear(); numero0lcd1(); lcd2.clear(); num3lcd2(); } if (secondi == 40) { lcd1.clear(); numero0lcd1(); lcd2.clear(); num4lcd2(); } if (secondi == 50) { lcd1.clear(); numero0lcd1(); lcd2.clear(); num5lcd2(); } if (ora == 0) { pixels.setPixelColor(15, pixels. Color(0, 0, 0)); pixels.setPixelColor(16, pixels. Color(0, 0, 0)); pixels.setPixelColor(17, pixels. Color(0, 150, 0)); pixels.setPixelColor(18, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 1) { pixels.setPixelColor(17, pixels. Color(0, 0, 0)); pixels.setPixelColor(18, pixels. Color(0, 0, 0)); pixels.setPixelColor(19, pixels. Color(0, 150, 0)); pixels.setPixelColor(20, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 2) { pixels.setPixelColor(19, pixels. Color(0, 0, 0)); pixels.setPixelColor(20, pixels. Color(0, 0, 0)); pixels.setPixelColor(21, pixels. Color(0, 150, 0)); pixels.setPixelColor(22, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 3) { pixels.setPixelColor(21, pixels. Color(0, 0, 0)); pixels.setPixelColor(22, pixels. Color(0, 0, 0)); pixels.setPixelColor(23, pixels. Color(0, 150, 0)); pixels.setPixelColor(0, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 4) { pixels.setPixelColor(23, pixels. Color(0, 0, 0)); pixels.setPixelColor(0, pixels. Color(0, 0, 0)); pixels.setPixelColor(1, pixels. Color(0, 150, 0)); pixels.setPixelColor(2, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 5) { pixels.setPixelColor(1, pixels. Color(0, 0, 0)); pixels.setPixelColor(2, pixels. Color(0, 0, 0)); pixels.setPixelColor(3, pixels. Color(0, 150, 0)); pixels.setPixelColor(4, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 6) { pixels.setPixelColor(3, pixels. Color(0, 0, 0)); pixels.setPixelColor(4, pixels. Color(0, 0, 0)); pixels.setPixelColor(5, pixels. Color(0, 150, 0)); pixels.setPixelColor(6, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 7) { pixels.setPixelColor(5, pixels. Color(0, 0, 0)); pixels.setPixelColor(6, pixels. Color(0, 0, 0)); pixels.setPixelColor(7, pixels. Color(0, 150, 0)); pixels.setPixelColor(8, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 8) { pixels.setPixelColor(7, pixels. Color(0, 0, 0)); pixels.setPixelColor(8, pixels. Color(0, 0, 0)); pixels.setPixelColor(9, pixels. Color(0, 150, 0)); pixels.setPixelColor(10, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 9) { pixels.setPixelColor(9, pixels. Color(0, 0, 0)); pixels.setPixelColor(10, pixels. Color(0, 0, 0)); pixels.setPixelColor(11, pixels. Color(0, 150, 0)); pixels.setPixelColor(12, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 10) { pixels.setPixelColor(11, pixels. Color(0, 0, 0)); pixels.setPixelColor(12, pixels. Color(0, 0, 0)); pixels.setPixelColor(13, pixels. Color(0, 150, 0)); pixels.setPixelColor(14, pixels. Color(0, 150, 0)); pixel.mostra(); } if (ora == 11) { pixels.setPixelColor(13, pixels. Color(0, 0, 0)); pixels.setPixelColor(14, pixels. Color(0, 0, 0)); pixels.setPixelColor(15, pixels. Color(0, 150, 0)); pixels.setPixelColor(16, pixels. Color(0, 150, 0)); pixel.mostra(); } }void num0lcd1 () { lcd1.setCursor(0, 0); lcd1.write(byte(2)); // full lcd1.setCursor(0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // metà destra lcd1.setCursor(1, 0); lcd1.write(byte(1)); // metà sinistra 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)); // full lcd1.setCursor(0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 0); lcd1.write(byte(1)); // metà sinistra 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)); // full lcd1.setCursor(0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // metà destra 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)); // full lcd1.setCursor(0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // metà destra 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)); // full lcd1.setCursor(0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // metà destra lcd1.setCursor(1, 0); lcd1.write(byte(1)); // metà sinistra 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.setCursore(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)); // full lcd1.setCursor(0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // metà destra lcd1.setCursor(1, 0); lcd1.write(byte(1)); // metà sinistra 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)); // full lcd2.setCursor(0, 1); lcd2.write(byte(2)); lcd2.setCursor(1, 1); lcd2.write(byte(0)); // metà destra lcd2.setCursor(1, 0); lcd2.write(byte(1)); // metà sinistra 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)); // full lcd2.setCursor(0, 1); lcd2.write(byte(2)); lcd2.setCursor(1, 0); lcd2.write(byte(1)); // metà sinistra 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)); // full lcd2.setCursor(0, 1); lcd2.write(byte(2)); lcd2.setCursor(1, 1); lcd2.write(byte(0)); // metà destra 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)); // full lcd2.setCursor(0, 1); lcd2.write(byte(2)); lcd2.setCursor(1, 1); lcd2.write(byte(0)); // metà destra 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)); }

Passaggio 4: lavorazione e tocco finale

Lavorazione e tocco finale
Lavorazione e tocco finale

Collega il tuo arduino al computer e lascialo funzionare. Spero che il tuo orologio funzioni. Funziona ma sembra così disordinato. Così tanti resistori e fili non va bene. Quindi, posiziona tutti i componenti nella scatola e taglia un foro per l'LCD, dipingi la scatola e dai l'aspetto dell'orologio digitale.

Non l'ho creato in realtà ma l'ho progettato in CIRCUITI AUTODESK. Lo progetterò in tempo reale e posterò il video del lavoro. Non sono madrelingua. Se avete fatto qualche errore informatemi in messaggi privati. E mi dispiace per quell'errore. Ho anche preso qualche idea da "Dan's arduino Clock". Ci vediamo con un altro istruibile.

Consigliato: