Inhoudsopgave:

Geweldige Arduino-klok: 4 stappen
Geweldige Arduino-klok: 4 stappen

Video: Geweldige Arduino-klok: 4 stappen

Video: Geweldige Arduino-klok: 4 stappen
Video: 🇳🇱 DIGITALE ARDUINO KLOK MET ANIMATIE - Arduino project 2024, November
Anonim
Geweldige Arduino-klok
Geweldige Arduino-klok

We hebben veel projecten gezien met arduino. Maar nu ga ik je laten zien hoe je een horloge bouwt met arduino en 2 LCD's. Het is eenvoudig maar helemaal leuk. Iedereen kan het proberen. Dus, bereid je voor!!!

Stap 1: Materiaal verzamelen

Materiaal verzamelen
Materiaal verzamelen

Als je het wilt maken, heb je wat spullen nodig. Deze artikelen kunt u gemakkelijk bij uw dichtstbijzijnde winkel kopen.

Wat je nodig zult hebben:

  1. Arduino UNO R3Neo
  2. Pixelring 24
  3. Broodplank
  4. LCD 16x2
  5. 100 Ohm Weerstand (2)
  6. 120 Ohm Weerstand (2)
  7. 10 K Ohm Weerstand (2)
  8. Druk op de knop

Diagram van deze dingen is hierboven weergegeven. Je kunt elk Breadboard gebruiken. Je hebt 6 weerstanden nodig waarvan de waarden hierboven in de lijst staan. Voor de verbinding heb je ook draden nodig. Deze LCD's zul je voor weergave. De methode van bedradingscircuit kunt u in de volgende stap zien.

Stap 2: Bedrading van alle componenten

Bedrading van alle componenten
Bedrading van alle componenten
Bedrading van alle componenten
Bedrading van alle componenten
Bedrading van alle componenten
Bedrading van alle componenten

De dingen die je nodig hebt. Ik heb het in de vorige stap laten zien, dus neem je breadboard-draadcircuit mee.

Bedrading Stappen:

  1. Plaats een weerstand van 100 Ohm aan de bovenkant van het breadboard op de negatieve lijn.
  2. Plaats een weerstand van 120 Ohm aan de bovenkant van het breadboard op de positieve lijn.
  3. Plaats de drukknop (het diagram is hierboven weergegeven)
  4. Plaats een weerstand van 10 K Ohm onder de drukknop
  5. Sluit 100 Ohm weerstanden (beide) aan op LCD display met 'LED Cathode'
  6. Sluit 120 Ohm weerstanden (beide) aan op LCD display met 'LED Anode'
  7. Sluit de negatieve pool van de breadboard van de bovenste lijn aan op 'Read/Write'.
  8. Sluit de negatieve pool van de breadboard van de bovenste lijn aan op 'Contrast'.
  9. Sluit de pluspool van de breadboard van de onderste lijn aan op 'Vcc'.
  10. Sluit een andere negatieve pool van de breadboard van de bovenste lijn van de breadboard aan op 'GND'.
  11. Doe hetzelfde op het 2e LCD-scherm en sluit deze allemaal aan zoals eerder.
  12. Sluit de resterende weerstanden aan op de negatieve lijn van het breadboard.
  13. Sluit de drukknoppen aan op de positieve lijn.
  14. Sluit de positieve en negatieve pool van de breadboard aan op "Neo Pixel Ring 24".

Nu heb je alle componenten aangesloten. Maar arduino is nog steeds aanwezig. Schema hiervan is hierboven weergegeven.

Bedradingsstappen van arduino naar alle componenten:

  1. Sluit drukknoppen (Terminal22) aan op A0 & A1 van arduino.
  2. Sluit GND aan op de negatieve pool van de breadboard.
  3. Sluit 5V aan op de positieve pool van de breadboard.
  4. Sluit D13 van Arduino aan op "Power of" "Neo Pixel Ring 24"
  5. Verbind D7 van arduino met "Register Select" van LCD1.
  6. Sluit D8 van arduino aan op "Enable" van LCD 2.
  7. Sluit D9 van arduino aan op "DB4" van LCD 2.
  8. Sluit D10 van arduino aan op "DB5" van LCD 2.
  9. Sluit D11 van arduino aan op "DB6" van LCD 2.
  10. Sluit D12 van arduino aan op "DB7" van LCD 2.
  11. Sluit D1 van arduino aan op "Register Select" van LCD 1.
  12. Sluit D2 van arduino aan op "Enable" van LCD 1.
  13. Sluit D3 van arduino aan op "DB4" van LCD 2.
  14. Sluit D4 van arduino aan op "DB5" van LCD 2.
  15. Sluit D5 van arduino aan op "DB6" van LCD 2.
  16. Sluit D6 van arduino aan op "DB7" van LCD 2.

Schema van alle componenten na bedrading is hierboven weergegeven.

Stap 3: Programmeren

Programmeren
Programmeren

Je hebt het circuit compleet gemaakt. Maar het werkt pas als u het voor dit project programmeert. Als je een expert bent en ervaring hebt, programmeer je het gemakkelijk. Ik hoop dat u de software kent die voor dit doel wordt gebruikt. Programmeer het dienovereenkomstig als u wijzigingen in de programmering wilt aanbrengen, maar onthoud dat het correct moet zijn. Anders zal het niet werken. Als u het niet kunt programmeren, kunt u het hier kopiëren of van een andere bron halen.

#erbij betrekken

// Linker LCD LiquidCrystal lcd1(7, 8, 9, 10, 11, 12);// Rechter LCD LiquidCrystal lcd2(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; lange interval = 950; int seconden = 0; int hour = 0;int hourButtonState = 0; int minButtonState = 0;byte vol[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, };// de setup-routine wordt één keer uitgevoerd wanneer u op reset drukt: void setup() { // set knop pinnen pinMode (14, INPUT); // stel minuut pinMode in (15, INPUT); // stel het uur in // maak aangepaste tekens lcd1.createChar (0, halfR); lcd1.createChar(1, halfL); lcd1.createChar(2, vol); lcd2.createChar (0, halfR); lcd2.createChar(1, halfL); lcd2.createChar(2, vol); // stel LCD1-formaat lcd1.begin (16, 2) in; // stel LCD2-formaat lcd2.begin (16, 2) in; // pixelring pixels.begin(); // initiële installatie lcd1.clear(); num0lcd1(); lcd2.clear(); num0lcd2(); //pixels.setPixelColor (17, pixels. Color (0, 150, 0)); //pixels.setPixelColor (18, pixels. Color (0, 150, 0)); pixels.show(); }// de lusroutine wordt voor altijd herhaald: void loop() { hourButtonState = digitalRead(15); minButtonState = digitalRead (14); if (hourButtonState == HOOG) { hour++; runClock (); } if (minButtonState == HOOG) {seconden++; runClock (); } unsigned long currentMillis = millis(); if (currentMillis - previousMillis > interval) { if (seconds == 59) { seconds = 0; if (uur == 11) { uur = 0; } anders { uur ++; } } else { seconden ++; } vorigeMillis = huidigeMillis; runClock (); } vertraging(10); }void runClock () { if (seconds == 0) { lcd1.clear(); num0lcd1(); lcd2.clear(); num0lcd2(); } if (seconden == 1 || seconden == 11 || seconden == 21 || seconden == 31 || seconden == 41 || seconden == 51) { lcd1.clear(); aantal1lcd1(); } if (seconden == 2 || seconden == 12 || seconden == 22 || seconden == 32 || seconden == 42 || seconden == 52) { lcd1.clear(); aantal2lcd1(); } if (seconden == 3 || seconden == 13 || seconden == 23 || seconden == 33 || seconden == 43 || seconden == 53) { lcd1.clear(); aantal3lcd1(); } if (seconden == 4 || seconden == 14 || seconden == 24 || seconden == 34 || seconden == 44 || seconden == 54) { lcd1.clear(); aantal4lcd1(); } if (seconden == 5 || seconden == 15 || seconden == 25 || seconden == 35 || seconden == 45 || seconden == 55) { lcd1.clear(); aantal5lcd1(); } if (seconden == 6 || seconden == 16 || seconden == 26 || seconden == 36 || seconden == 46 || seconden == 56) { lcd1.clear(); aantal6lcd1(); } if (seconden == 7 || seconden == 17 || seconden == 27 || seconden == 37 || seconden == 47 || seconden == 57) { lcd1.clear(); aantal7lcd1(); } if (seconden == 8 || seconden == 18 || seconden == 28 || seconden == 38 || seconden == 48 || seconden == 58) { lcd1.clear(); aantal8lcd1(); } if (seconden == 9 || seconden == 19 || seconden == 29 || seconden == 39 || seconden == 49 || seconden == 59) { lcd1.clear(); num9lcd1(); } if (seconden == 10) { lcd1.clear(); num0lcd1(); lcd2.clear(); aantal1lcd2(); } if (seconden == 20) { lcd1.clear(); num0lcd1(); lcd2.clear(); aantal2lcd2(); } if (seconden == 30) { lcd1.clear(); num0lcd1(); lcd2.clear(); aantal3lcd2(); } if (seconden == 40) { lcd1.clear(); num0lcd1(); lcd2.clear(); aantal4lcd2(); } if (seconden == 50) { lcd1.clear(); num0lcd1(); lcd2.clear(); aantal5lcd2(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } if (uur == 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)); pixels.show(); } } ongeldig num0lcd1 () { lcd1.setCursor (0, 0); lcd1.write(byte(2)); // volledige lcd1.setCursor (0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // half rechts lcd1.setCursor (1, 0); lcd1.write(byte(1)); // half 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)); }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)); // volledige lcd1.setCursor (0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 0); lcd1.write(byte(1)); // half 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)); }void num3lcd1 () { lcd1.setCursor(0, 0); lcd1.write(byte(2)); // volledige lcd1.setCursor (0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // half 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)); }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)); // volledige lcd1.setCursor (0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // half 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)); }void num6lcd1 () { lcd1.setCursor(0, 0); lcd1.write(byte(2)); // volledige lcd1.setCursor (0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // half rechts lcd1.setCursor (1, 0); lcd1.write(byte(1)); // half 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)); }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)); // volledige lcd1.setCursor (0, 1); lcd1.write(byte(2)); lcd1.setCursor(1, 1); lcd1.write(byte(0)); // half rechts lcd1.setCursor (1, 0); lcd1.write(byte(1)); // half 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)); }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)); // volledige lcd2.setCursor (0, 1); lcd2.write(byte(2)); lcd2.setCursor(1, 1); lcd2.write(byte(0)); // half rechts lcd2.setCursor (1, 0); lcd2.write(byte(1)); // half 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)); }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)); // volledige lcd2.setCursor (0, 1); lcd2.write(byte(2)); lcd2.setCursor(1, 0); lcd2.write(byte(1)); // half 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)); }void num3lcd2 () { lcd2.setCursor(0, 0); lcd2.write(byte(2)); // volledige lcd2.setCursor (0, 1); lcd2.write(byte(2)); lcd2.setCursor(1, 1); lcd2.write(byte(0)); // half 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)); }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)); // volledige lcd2.setCursor (0, 1); lcd2.write(byte(2)); lcd2.setCursor(1, 1); lcd2.write(byte(0)); // half 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)); }

Stap 4: Werken en afwerking

Werken en afronden
Werken en afronden

Sluit je arduino aan op de computer en laat hem werken. Ik hoop dat je klok zal werken. Het werkt maar het ziet er zo rommelig uit. Zoveel weerstanden en draden is niet goed. Dus plaats alle componenten in de doos en snijd een gat voor LCD-verf de doos en geef het uiterlijk van een digitale klok.

Ik heb het niet in het echt gemaakt, maar ik heb het ontworpen in AUTODESK CIRCUITS. Ik zal het in het echt ontwerpen en de video van het werken posten. Ik ben geen moedertaalspreker. Als je een fout hebt gemaakt, laat het me dan weten in privéberichten. En het spijt me van die fout. Ik heb ook een idee van "Dan's arduino Clock". Ontmoet je met een andere instructable.

Aanbevolen: