Inhaltsverzeichnis:

Fantastische Arduino-Uhr - Gunook
Fantastische Arduino-Uhr - Gunook

Video: Fantastische Arduino-Uhr - Gunook

Video: Fantastische Arduino-Uhr - Gunook
Video: Arduino Projekt: Echtzeituhr DS1307 am Arduino 2024, November
Anonim
Fantastische Arduino-Uhr
Fantastische Arduino-Uhr

Wir haben viele Projekte mit arduino gesehen. Aber jetzt zeige ich Ihnen, wie Sie eine Uhr mit Arduino und 2 LCD-Displays bauen. Es ist einfach, aber total lustig. Jeder kann es versuchen. Also mach dich fertig!!!

Schritt 1: Materialien sammeln

Sammeln von Materialien
Sammeln von Materialien

Wenn Sie es machen möchten, benötigen Sie einige Gegenstände. Diese Artikel können Sie ganz einfach in Ihrem nächstgelegenen Einzelhandelsgeschäft kaufen.

Was wirst du brauchen:

  1. Arduino UNO R3Neo
  2. Pixelring 24
  3. Brotbrett
  4. LCD 16x2
  5. 100 Ohm Widerstand (2)
  6. 120-Ohm-Widerstand (2)
  7. 10 K Ohm Widerstand (2)
  8. Druckknopf

Diagramm dieser Dinge ist oben gezeigt. Sie können jedes Brotbrett verwenden. Sie benötigen 6 Widerstände, deren Werte oben in der Liste aufgeführt sind. Sie benötigen auch Drähte für den Anschluss. Diese LCDs werden Sie zur Anzeige verwenden. Die Methode der Verdrahtungsschaltung können Sie im nächsten Schritt sehen.

Schritt 2: Alle Komponenten verdrahten

Verdrahtung aller Komponenten
Verdrahtung aller Komponenten
Verdrahtung aller Komponenten
Verdrahtung aller Komponenten
Verdrahtung aller Komponenten
Verdrahtung aller Komponenten

Die Dinge, die Sie brauchen werden. Ich habe im vorherigen Schritt gezeigt, also nehmen Sie Ihre Brotplatinen-Drahtschaltung mit.

Verdrahtungsschritte:

  1. Platzieren Sie den 100-Ohm-Widerstand auf der Oberseite der Brotplatine auf der negativen Leitung.
  2. Platzieren Sie den 120-Ohm-Widerstand auf der Oberseite der Steckplatine auf der Plusleitung.
  3. Druckknopf platzieren (Das Diagramm ist oben gezeigt)
  4. Platzieren Sie einen 10 K Ohm Widerstand unter dem Druckknopf
  5. Verbinden Sie 100 Ohm Widerstände (beide) mit dem LCD-Display mit 'LED Cathode'
  6. Verbinden Sie 120 Ohm Widerstände (beide) mit dem LCD-Display mit 'LED Anode'
  7. Verbinden Sie den Minuspol der Steckplatine von der oberen Leitung mit 'Read/Write'.
  8. Verbinden Sie den Minuspol des Steckbretts von der oberen Leitung mit 'Kontrast'.
  9. Verbinden Sie den Pluspol der Steckplatine von der unteren Leitung mit 'Vcc'.
  10. Verbinden Sie einen weiteren Minuspol des Steckbretts von der oberen Linie des Steckbretts mit "GND".
  11. Machen Sie dasselbe auf dem 2. LCD, verbinden Sie alle diese wie zuvor.
  12. Verbinden Sie die restlichen Widerstände mit der negativen Leitung der Steckplatine.
  13. Schließen Sie die Drucktasten an die Plusleitung an.
  14. Verbinden Sie den positiven und negativen Anschluss des Steckbretts mit "Neo Pixel Ring 24".

Jetzt haben Sie alle Komponenten angeschlossen. Aber Arduino bleibt noch übrig. Diagramm davon oben gezeigt.

Verdrahtungsschritte von arduino zu allen Komponenten:

  1. Schließen Sie die Drucktasten (Klemme 22) an A0 und A1 von Arduino an.
  2. Verbinden Sie GND mit dem Minuspol der Steckplatine.
  3. Schließen Sie 5V an den Pluspol der Brotplatine an.
  4. Verbinden Sie D13 von Arduino mit "Power of" "Neo Pixel Ring 24"
  5. Verbinden Sie D7 von Arduino mit "Register Select" von LCD1.
  6. Verbinden Sie D8 von Arduino mit "Enable" von LCD 2.
  7. Verbinden Sie D9 von Arduino mit "DB4" von LCD 2.
  8. Verbinden Sie D10 von Arduino mit "DB5" von LCD 2.
  9. Verbinden Sie D11 von Arduino mit "DB6" von LCD 2.
  10. Verbinden Sie D12 von Arduino mit "DB7" von LCD 2.
  11. Verbinden Sie D1 von Arduino mit "Register Select" von LCD 1.
  12. Verbinden Sie D2 von Arduino mit "Enable" von LCD 1.
  13. Verbinden Sie D3 von Arduino mit "DB4" von LCD 2.
  14. Verbinden Sie D4 von Arduino mit "DB5" von LCD 2.
  15. Verbinden Sie D5 von Arduino mit "DB6" von LCD 2.
  16. Verbinden Sie D6 von Arduino mit "DB7" von LCD 2.

Das Diagramm aller Komponenten nach der Verdrahtung ist oben gezeigt.

Schritt 3: Programmierung

Programmierung
Programmierung

Sie haben die Schaltung abgeschlossen. Aber es funktioniert nicht, bis Sie es für dieses Projekt programmieren. Wenn Sie Experte sind und Erfahrung haben, werden Sie es leicht programmieren. Ich hoffe, Sie kennen die Software, die zu diesem Zweck verwendet wird. Programmieren Sie es entsprechend, wenn Sie Änderungen in der Programmierung vornehmen möchten, aber denken Sie daran, dass es richtig sein muss. Sonst wird es nicht funktionieren. Wenn Sie es nicht programmieren können, können Sie es von hier kopieren oder von einer anderen Quelle nehmen.

#enthalten

// Linkes LCD LiquidCrystal lcd1(7, 8, 9, 10, 11, 12); // Rechtes LCD 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; langes Intervall = 950; int Sekunden = 0; int Stunde = 0;int StundeButtonState = 0; int minButtonState = 0;Byte voll[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111, };Byte halbL[8] = { B11111, B11111, B11111, B11111, B00000, B00000, B00000, B00000, };Byte halfR[8] = { B00000, B00000, B00000, B00000, B11111, B11111, B11111, B11111, }; // die Setup-Routine wird einmal ausgeführt, wenn Sie Reset drücken: void setup () { // set Tastenstifte PinMode (14, INPUT); // Minuten-PinMode (15, INPUT) einstellen; // Stunde einstellen // benutzerdefinierte Zeichen erstellen lcd1.createChar(0, halfR); lcd1.createChar(1, halfL); lcd1.createChar(2, voll); lcd2.createChar(0, halfR); lcd2.createChar(1, halfL); lcd2.createChar(2, voll); // LCD1-Größe einstellen lcd1.begin (16, 2); // LCD2-Größe einstellen lcd2.begin (16, 2); // Pixelring Pixel.begin(); // Ersteinrichtung lcd1.clear (); num0lcd1(); lcd2.clear(); num0lcd2(); //pixels.setPixelColor (17, Pixel. Color (0, 150, 0)); //pixels.setPixelColor (18, Pixel. Color (0, 150, 0)); Pixel.show(); } // die Schleifenroutine läuft immer und immer wieder: void loop () {hourButtonState = digitalRead (15); minButtonState = digitalRead(14); if (hourButtonState == HIGH) { Stunde++; runClock(); } if (minButtonState == HIGH) { Sekunden++; runClock(); } unsigned long currentMillis = millis(); if (currentMillis - previousMillis > Intervall) { if (Sekunden == 59) { Sekunden = 0; wenn (Stunde == 11) {Stunde = 0; } sonst { Stunde ++; } } sonst { Sekunden ++; } previousMillis = currentMillis; runClock(); } Verzögerung(10); } ungültig runClock () { if (Sekunden == 0) { lcd1.clear (); num0lcd1(); lcd2.clear(); num0lcd2(); } if (Sekunden == 1 || Sekunden == 11 || Sekunden == 21 || Sekunden == 31 || Sekunden == 41 || Sekunden == 51) { lcd1.clear(); num1lcd1(); } if (Sekunden == 2 || Sekunden == 12 || Sekunden == 22 || Sekunden == 32 || Sekunden == 42 || Sekunden == 52) { lcd1.clear(); num2lcd1(); } if (Sekunden == 3 || Sekunden == 13 || Sekunden == 23 || Sekunden == 33 || Sekunden == 43 || Sekunden == 53) { lcd1.clear(); num3lcd1(); } if (Sekunden == 4 || Sekunden == 14 || Sekunden == 24 || Sekunden == 34 || Sekunden == 44 || Sekunden == 54) { lcd1.clear(); num4lcd1(); } if (Sekunden == 5 || Sekunden == 15 || Sekunden == 25 || Sekunden == 35 || Sekunden == 45 || Sekunden == 55) { lcd1.clear(); num5lcd1(); } if (Sekunden == 6 || Sekunden == 16 || Sekunden == 26 || Sekunden == 36 || Sekunden == 46 || Sekunden == 56) { lcd1.clear(); num6lcd1(); } if (Sekunden == 7 || Sekunden == 17 || Sekunden == 27 || Sekunden == 37 || Sekunden == 47 || Sekunden == 57) { lcd1.clear(); num7lcd1(); } if (Sekunden == 8 || Sekunden == 18 || Sekunden == 28 || Sekunden == 38 || Sekunden == 48 || Sekunden == 58) { lcd1.clear(); num8lcd1(); } if (Sekunden == 9 || Sekunden == 19 || Sekunden == 29 || Sekunden == 39 || Sekunden == 49 || Sekunden == 59) { lcd1.clear(); num9lcd1(); aufrechtzuerhalten. Wenn (Sekunden == 10) {lcd1.clear(); num0lcd1(); lcd2.clear(); num1lcd2(); aufrechtzuerhalten. Wenn (Sekunden == 20) {lcd1.clear(); num0lcd1(); lcd2.clear(); num2lcd2(); aufrechtzuerhalten. Wenn (Sekunden == 30) {lcd1.clear(); num0lcd1(); lcd2.clear(); num3lcd2(); aufrechtzuerhalten. Wenn (Sekunden == 40) {lcd1.clear(); num0lcd1(); lcd2.clear(); num4lcd2(); aufrechtzuerhalten. Wenn (Sekunden == 50) {lcd1.clear(); num0lcd1(); lcd2.clear(); num5lcd2(); aufrechtzuerhalten. Wenn (Stunde == 0) { Pixel.setPixelColor (15, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(16, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(17, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(18, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 1) {pixel.setPixelColor (17, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(18, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(19, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(20, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 2) { Pixel.setPixelColor (19, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(20, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(21, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(22, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 3) { Pixel.setPixelColor (21, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(22, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(23, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(0, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 4) { Pixel.setPixelColor (23, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(0, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(1, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(2, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 5) { Pixel.setPixelColor (1, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(2, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(3, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(4, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 6) { Pixel.setPixelColor (3, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(4, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(5, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(6, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 7) { Pixel.setPixelColor (5, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(6, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(7, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(8, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 8) { Pixel.setPixelColor (7, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(8, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(9, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(10, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 9) { Pixel.setPixelColor (9, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(10, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(11, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(12, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 10) { Pixel.setPixelColor (11, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(12, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(13, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(14, Pixel. Color(0, 150, 0)); Pixel.show(); aufrechtzuerhalten. Wenn (Stunde == 11) { Pixel.setPixelColor (13, Pixel. Color (0, 0, 0)); Pixel.setPixelColor(14, Pixel. Color(0, 0, 0)); Pixel.setPixelColor(15, Pixel. Color(0, 150, 0)); Pixel.setPixelColor(16, Pixel. Color(0, 150, 0)); Pixel.show(); }} ungültig num0lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // voll lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor(1, 1); lcd1.write (byte (0)); // halb rechts lcd1.setCursor (1, 0); lcd1.write(byte(1)); // halb links 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)); } ungültig 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)); } ungültig num2lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // voll lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor(1, 0); lcd1.write(byte(1)); // halb links 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)); } ungültig num3lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // voll lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor(1, 1); lcd1.write (byte (0)); // halb rechts 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)); } ungültig 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)); } ungültig num5lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // voll lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor(1, 1); lcd1.write (byte (0)); // halb rechts 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)); } ungültig num6lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // voll lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor(1, 1); lcd1.write (byte (0)); // halb rechts lcd1.setCursor (1, 0); lcd1.write(byte(1)); // halb links 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)); } ungültig 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)); } ungültig num8lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // voll lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor(1, 1); lcd1.write (byte (0)); // halb rechts lcd1.setCursor (1, 0); lcd1.write(byte(1)); // halb links 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)); } ungültig 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)); } ungültig num0lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // voll lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor(1, 1); lcd2.write (byte (0)); // halb rechts lcd2.setCursor (1, 0); lcd2.write(byte(1)); // halb links 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)); } ungültig 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)); } ungültig num2lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // voll lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor(1, 0); lcd2.write(byte(1)); // halb links 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)); } ungültig num3lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // voll lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor(1, 1); lcd2.write (byte (0)); // halb rechts 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)); } ungültig 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)); } ungültig num5lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // voll lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor(1, 1); lcd2.write (byte (0)); // halb rechts 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)); }

Schritt 4: Arbeiten und Finishing Touch

Arbeiten und Finishing Touch
Arbeiten und Finishing Touch

Verbinden Sie Ihr Arduino mit dem Computer und lassen Sie es arbeiten. Ich hoffe, deine Uhr funktioniert. Es funktioniert, aber es sieht so chaotisch aus. So viele Widerstände und Drähte sind nicht gut. Legen Sie also alle Komponenten in die Schachtel und schneiden Sie ein Loch für die LCD-Farbe der Schachtel und geben Sie das Aussehen der Digitaluhr.

Ich habe es nicht wirklich erstellt, aber ich habe es in AUTODESK CIRCUITS entworfen. Ich werde es in Echt entwerfen und das Video der Arbeit posten. Ich bin kein Muttersprachler. Wenn Sie einen Fehler gemacht haben, informieren Sie mich in privaten Nachrichten. Und dieser Fehler tut mir leid. Ich habe auch eine Idee von "Dan's Arduino Clock" übernommen. Treffen Sie sich mit einem anderen instructable.

Empfohlen: