INHOUDSOPGAWE:

Fantastiese Arduino -klok: 4 stappe
Fantastiese Arduino -klok: 4 stappe

Video: Fantastiese Arduino -klok: 4 stappe

Video: Fantastiese Arduino -klok: 4 stappe
Video: Раскрываю секрет вкусного шашлыка от А до Я. Шашлык из баранины 2024, November
Anonim
Fantastiese Arduino -horlosie
Fantastiese Arduino -horlosie

Ons het baie projekte met arduino gesien. Maar nou gaan ek jou wys hoe om 'n horlosie te bou met 'n arduino en 2 LCD's. Dit is eenvoudig, maar heeltemal pret. Elkeen kan dit probeer. So, maak gereed !!!

Stap 1: Versamel materiaal

Materiaal versamel
Materiaal versamel

As u dit wil maak, benodig u 'n paar items. Hierdie items kan u maklik by u nabygeleë winkel koop.

Wat u benodig:

  1. Arduino UNO R3Neo
  2. Pixel Ring 24
  3. Broodbord
  4. LCD 16x2
  5. 100 Ohm weerstand (2)
  6. 120 Ohm Weerstand (2)
  7. 10 K Ohm Weerstand (2)
  8. Druk knoppie

Diagram van hierdie dinge word hierbo getoon. U kan enige broodbord gebruik. U benodig 6 weerstande, hul waardes is hierbo in die lys geskryf. U benodig ook drade vir verbinding. Hierdie LCD's sal u vertoon. Die metode van bedradingskring kan u in die volgende stap sien.

Stap 2: Bedrading van alle komponente

Bedrading van alle komponente
Bedrading van alle komponente
Bedrading van alle komponente
Bedrading van alle komponente
Bedrading van alle komponente
Bedrading van alle komponente

Die dinge wat jy nodig het. Ek het in die vorige stap gewys, so neem u broodborddraad saam met my.

Bedradingstappe:

  1. Plaas 'n weerstand van 100 ohm aan die bokant van die broodbord op die negatiewe lyn.
  2. Plaas 'n weerstand van 120 Ohm aan die bokant van die broodbord op Positive Line.
  3. Plaas drukknop (die diagram word hierbo getoon)
  4. Plaas 'n weerstand van 10 K Ohm onder die drukknop
  5. Koppel 100 Ohm -weerstande (albei) aan die LCD -skerm met 'LED -katode'
  6. Koppel 120 Ohm -weerstande (albei) aan die LCD -skerm met 'LED -anode'
  7. Verbind die negatiewe terminaal van die broodbord van die boonste lyn met 'Lees/Skryf'.
  8. Koppel die negatiewe terminaal van die broodbord van die boonste lyn na 'Kontras'.
  9. Koppel die positiewe terminaal van die broodbord van die onderste lyn na 'Vcc'.
  10. Koppel nog 'n negatiewe terminaal van broodbord vanaf boonste lyn van broodbord na 'GND'.
  11. Doen dieselfde op die 2de LCD, verbind dit alles soos die vorige.
  12. Koppel die oorblywende weerstande aan die negatiewe lyn van die broodbord.
  13. Koppel drukknoppies aan die positiewe lyn.
  14. Koppel die positiewe en negatiewe terminaal van die broodbord aan die "Neo Pixel Ring 24".

Nou het u alle komponente verbind. Maar arduino bly nog oor. Diagram hierbo getoon.

Bedradingstappe van arduino na alle komponente:

  1. Koppel drukknoppies (Terminal22) aan op A0 en A1 van arduino.
  2. Koppel GND aan die negatiewe terminaal van die broodbord.
  3. Koppel 5V aan die positiewe terminaal van die broodbord.
  4. Koppel D13 van arduino aan "Power of" "Neo Pixel Ring 24"
  5. Koppel D7 van arduino aan "Register Select" van LCD1.
  6. Koppel D8 van arduino aan "Aktiveer" van LCD 2.
  7. Koppel D9 van arduino aan "DB4" van LCD 2.
  8. Koppel D10 van arduino aan "DB5" van LCD 2.
  9. Koppel D11 van arduino aan "DB6" van LCD 2.
  10. Koppel D12 van arduino aan "DB7" van LCD 2.
  11. Koppel D1 van arduino aan "Register Select" van LCD 1.
  12. Koppel D2 van arduino aan "Aktiveer" van LCD 1.
  13. Koppel D3 van arduino aan "DB4" van LCD 2.
  14. Koppel D4 van arduino aan "DB5" van LCD 2.
  15. Koppel D5 van arduino aan "DB6" van LCD 2.
  16. Koppel D6 van arduino aan "DB7" van LCD 2.

Diagram van alle komponente na bedrading word hierbo getoon.

Stap 3: Programmering

Programmering
Programmering

U het die kring voltooi. Maar dit werk nie totdat u dit vir hierdie projek gaan programmeer nie. As u kundig is en u ondervinding het, programmeer u dit maklik. Ek hoop dat u die sagteware wat hiervoor gebruik word, sal ken. Programeer dit dienooreenkomstig as u veranderinge in programmering wil aanbring, maar onthou dat dit korrek moet wees. Andersins sal dit nie werk nie. As u dit nie kan programmeer nie, kan u dit hier kopieer of uit 'n ander bron neem.

#insluit

// Links LCD LiquidCrystal lcd1 (7, 8, 9, 10, 11, 12); // Regter LCD LiquidCrystal lcd2 (1, 2, 3, 4, 5, 6); #sluit #ifdef _AVR_ #include #endif/ in / NeoPixel Ring 24 #define PIN 13 #definieer NUMPIXELS 24Adafruit_NeoPixel pixels = Adafruit_NeoPixel (NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int delayval = 50; long previousMillis = 0; lang interval = 950; int sekondes = 0; int uur = 0; int uurButtonState = 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,}; // die opstelroetine loop een keer as u op reset druk: ongeldige opstelling () {// stel knoppiespenne pinMode (14, INVOER); // stel minute pinMode (15, INVOER) in; // stel uur // maak persoonlike karakters 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 -grootte lcd1.begin (16, 2); // stel LCD2 -grootte lcd2.begin (16, 2); // pixel ring pixels.begin (); // aanvanklike opstelling lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); //pixels.setPixelColor(17, pixels. Color (0, 150, 0)); //pixels.setPixelColor(18, pixels. Color (0, 150, 0)); pixels.show (); } // die lusroetine loop vir altyd oor en oor: void lus () {hourButtonState = digitalRead (15); minButtonState = digitalRead (14); as (hourButtonState == HOOG) {uur ++; runClock (); } if (minButtonState == HOOG) {sekondes ++; runClock (); } ongetekende lang stroomMillis = millis (); if (currentMillis - previousMillis> interval) {if (sekondes == 59) {sekondes = 0; as (uur == 11) {uur = 0; } anders {uur ++; }} anders {sekondes ++; } vorigeMillis = huidigeMillis; runClock (); } vertraging (10); } ongeldig runClock () {if (sekondes == 0) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); } as (sekondes == 1 || sekondes == 11 || sekondes == 21 || sekondes == 31 || sekondes == 41 || sekondes == 51) {lcd1.clear (); num1lcd1 (); } as (sekondes == 2 || sekondes == 12 || sekondes == 22 || sekondes == 32 || sekondes == 42 || sekondes == 52) {lcd1.clear (); num2lcd1 (); } as (sekondes == 3 || sekondes == 13 || sekondes == 23 || sekondes == 33 || sekondes == 43 || sekondes == 53) {lcd1.clear (); num3lcd1 (); } as (sekondes == 4 || sekondes == 14 || sekondes == 24 || sekondes == 34 || sekondes == 44 || sekondes == 54) {lcd1.clear (); num4lcd1 (); } as (sekondes == 5 || sekondes == 15 || sekondes == 25 || sekondes == 35 || sekondes == 45 || sekondes == 55) {lcd1.clear (); num5lcd1 (); } as (sekondes == 6 || sekondes == 16 || sekondes == 26 || sekondes == 36 || sekondes == 46 || sekondes == 56) {lcd1.clear (); num6lcd1 (); } if (sekondes == 7 || sekondes == 17 || sekondes == 27 || sekondes == 37 || sekondes == 47 || sekondes == 57) {lcd1.clear (); num7lcd1 (); } as (sekondes == 8 || sekondes == 18 || sekondes == 28 || sekondes == 38 || sekondes == 48 || sekondes == 58) {lcd1.clear (); num8lcd1 (); } if (sekondes == 9 || sekondes == 19 || sekondes == 29 || sekondes == 39 || sekondes == 49 || sekondes == 59) {lcd1.clear (); num9lcd1 (); } as (sekondes == 10) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num1lcd2 (); } as (sekondes == 20) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num2lcd2 (); } as (sekondes == 30) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num3lcd2 (); } as (sekondes == 40) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num4lcd2 (); } as (sekondes == 50) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num5lcd2 (); } as (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 (); } as (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 (); } as (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 (); } as (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 (); } as (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 (); } as (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 (); } as (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 (); } as (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 (); } as (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 (); } as (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 (); } as (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 (); }} leegte num0lcd1 () {lcd1.setCursor (0, 0); lcd1.write (greep (2)); // volledige lcd1.setCursor (0, 1); lcd1.write (greep (2)); lcd1.setCursor (1, 1); lcd1.write (greep (0)); // half regs lcd1.setCursor (1, 0); lcd1.write (greep (1)); // half links lcd1.setCursor (2, 1); lcd1.write (greep (0)); lcd1.setCursor (2, 0); lcd1.write (greep (1)); lcd1.setCursor (3, 1); lcd1.write (greep (0)); lcd1.setCursor (3, 0); lcd1.write (greep (1)); lcd1.setCursor (4, 1); lcd1.write (greep (0)); lcd1.setCursor (4, 0); lcd1.write (greep (1)); lcd1.setCursor (5, 1); lcd1.write (greep (0)); lcd1.setCursor (5, 0); lcd1.write (greep (1)); lcd1.setCursor (6, 1); lcd1.write (greep (0)); lcd1.setCursor (6, 0); lcd1.write (greep (1)); lcd1.setCursor (7, 1); lcd1.write (greep (0)); lcd1.setCursor (7, 0); lcd1.write (greep (1)); lcd1.setCursor (8, 1); lcd1.write (greep (0)); lcd1.setCursor (8, 0); lcd1.write (greep (1)); lcd1.setCursor (9, 1); lcd1.write (greep (0)); lcd1.setCursor (9, 0); lcd1.write (greep (1)); lcd1.setCursor (10, 1); lcd1.write (greep (0)); lcd1.setCursor (10, 0); lcd1.write (greep (1)); lcd1.setCursor (11, 1); lcd1.write (greep (0)); lcd1.setCursor (11, 0); lcd1.write (greep (1)); lcd1.setCursor (12, 1); lcd1.write (greep (0)); lcd1.setCursor (12, 0); lcd1.write (greep (1)); lcd1.setCursor (13, 1); lcd1.write (greep (0)); lcd1.setCursor (13, 0); lcd1.write (greep (1)); lcd1.setCursor (14, 1); lcd1.write (greep (0)); lcd1.setCursor (14, 0); lcd1.write (greep (1)); lcd1.setCursor (15, 1); lcd1.write (greep (2)); lcd1.setCursor (15, 0); lcd1.write (greep (2)); } leemte num1lcd1 () {lcd1.setCursor (0, 1); lcd1.write (greep (0)); lcd1.setCursor (1, 1); lcd1.write (greep (0)); lcd1.setCursor (2, 1); lcd1.write (greep (0)); lcd1.setCursor (3, 1); lcd1.write (greep (0)); lcd1.setCursor (4, 1); lcd1.write (greep (0)); lcd1.setCursor (5, 1); lcd1.write (greep (0)); lcd1.setCursor (6, 1); lcd1.write (greep (0)); lcd1.setCursor (7, 1); lcd1.write (greep (0)); lcd1.setCursor (8, 1); lcd1.write (greep (0)); lcd1.setCursor (9, 1); lcd1.write (greep (0)); lcd1.setCursor (10, 1); lcd1.write (greep (0)); lcd1.setCursor (11, 1); lcd1.write (greep (0)); lcd1.setCursor (12, 1); lcd1.write (greep (0)); lcd1.setCursor (13, 1); lcd1.write (greep (0)); lcd1.setCursor (14, 1); lcd1.write (greep (0)); lcd1.setCursor (15, 1); lcd1.write (greep (0)); } leemte num2lcd1 () {lcd1.setCursor (0, 0); lcd1.write (greep (2)); // volledige lcd1.setCursor (0, 1); lcd1.write (greep (2)); lcd1.setCursor (1, 0); lcd1.write (greep (1)); // half links lcd1.setCursor (2, 0); lcd1.write (greep (1)); lcd1.setCursor (3, 0); lcd1.write (greep (1)); lcd1.setCursor (4, 0); lcd1.write (greep (1)); lcd1.setCursor (5, 0); lcd1.write (greep (1)); lcd1.setCursor (6, 0); lcd1.write (greep (1)); lcd1.setCursor (7, 1); lcd1.write (greep (2)); lcd1.setCursor (7, 0); lcd1.write (greep (2)); lcd1.setCursor (8, 1); lcd1.write (greep (0)); lcd1.setCursor (9, 1); lcd1.write (greep (0)); lcd1.setCursor (10, 1); lcd1.write (greep (0)); lcd1.setCursor (11, 1); lcd1.write (greep (0)); lcd1.setCursor (12, 1); lcd1.write (greep (0)); lcd1.setCursor (13, 1); lcd1.write (greep (0)); lcd1.setCursor (14, 1); lcd1.write (greep (0)); lcd1.setCursor (15, 1); lcd1.write (greep (2)); lcd1.setCursor (15, 0); lcd1.write (greep (2)); } leemte num3lcd1 () {lcd1.setCursor (0, 0); lcd1.write (greep (2)); // volledige lcd1.setCursor (0, 1); lcd1.write (greep (2)); lcd1.setCursor (1, 1); lcd1.write (greep (0)); // half regs lcd1.setCursor (2, 1); lcd1.write (greep (0)); lcd1.setCursor (3, 1); lcd1.write (greep (0)); lcd1.setCursor (4, 1); lcd1.write (greep (0)); lcd1.setCursor (5, 1); lcd1.write (greep (0)); lcd1.setCursor (6, 1); lcd1.write (greep (0)); lcd1.setCursor (7, 1); lcd1.write (greep (2)); lcd1.setCursor (7, 0); lcd1.write (greep (2)); lcd1.setCursor (8, 1); lcd1.write (greep (0)); lcd1.setCursor (9, 1); lcd1.write (greep (0)); lcd1.setCursor (10, 1); lcd1.write (greep (0)); lcd1.setCursor (11, 1); lcd1.write (greep (0)); lcd1.setCursor (12, 1); lcd1.write (greep (0)); lcd1.setCursor (13, 1); lcd1.write (greep (0)); lcd1.setCursor (14, 1); lcd1.write (greep (0)); lcd1.setCursor (15, 1); lcd1.write (greep (2)); lcd1.setCursor (15, 0); lcd1.write (greep (2)); } leemte num4lcd1 () {lcd1.setCursor (0, 1); lcd1.write (greep (0)); lcd1.setCursor (1, 1); lcd1.write (greep (0)); lcd1.setCursor (2, 1); lcd1.write (greep (0)); lcd1.setCursor (3, 1); lcd1.write (greep (0)); lcd1.setCursor (4, 1); lcd1.write (greep (0)); lcd1.setCursor (5, 1); lcd1.write (greep (0)); lcd1.setCursor (6, 1); lcd1.write (greep (0)); lcd1.setCursor (7, 1); lcd1.write (greep (2)); lcd1.setCursor (7, 0); lcd1.write (greep (2)); lcd1.setCursor (8, 0); lcd1.write (greep (1)); lcd1.setCursor (8, 1); lcd1.write (greep (0)); lcd1.setCursor (9, 0); lcd1.write (greep (1)); lcd1.setCursor (9, 1); lcd1.write (greep (0)); lcd1.setCursor (10, 0); lcd1.write (greep (1)); lcd1.setCursor (10, 1); lcd1.write (greep (0)); lcd1.setCursor (11, 0); lcd1.write (greep (1)); lcd1.setCursor (11, 1); lcd1.write (greep (0)); lcd1.setCursor (12, 0); lcd1.write (greep (1)); lcd1.setCursor (12, 1); lcd1.write (greep (0)); lcd1.setCursor (13, 0); lcd1.write (greep (1)); lcd1.setCursor (13, 1); lcd1.write (greep (0)); lcd1.setCursor (14, 0); lcd1.write (greep (1)); lcd1.setCursor (14, 1); lcd1.write (greep (0)); lcd1.setCursor (15, 0); lcd1.write (greep (1)); lcd1.setCursor (15, 1); lcd1.write (greep (0)); } leemte num5lcd1 () {lcd1.setCursor (0, 0); lcd1.write (greep (2)); // volledige lcd1.setCursor (0, 1); lcd1.write (greep (2)); lcd1.setCursor (1, 1); lcd1.write (greep (0)); // half regs lcd1.setCursor (2, 1); lcd1.write (greep (0)); lcd1.setCursor (3, 1); lcd1.write (greep (0)); lcd1.setCursor (4, 1); lcd1.write (greep (0)); lcd1.setCursor (5, 1); lcd1.write (greep (0)); lcd1.setCursor (6, 1); lcd1.write (greep (0)); lcd1.setCursor (7, 1); lcd1.write (greep (2)); lcd1.setCursor (7, 0); lcd1.write (greep (2)); lcd1.setCursor (8, 0); lcd1.write (greep (1)); lcd1.setCursor (9, 0); lcd1.write (greep (1)); lcd1.setCursor (10, 0); lcd1.write (greep (1)); lcd1.setCursor (11, 0); lcd1.write (greep (1)); lcd1.setCursor (12, 0); lcd1.write (greep (1)); lcd1.setCursor (13, 0); lcd1.write (greep (1)); lcd1.setCursor (14, 0); lcd1.write (greep (1)); lcd1.setCursor (15, 1); lcd1.write (greep (2)); lcd1.setCursor (15, 0); lcd1.write (greep (2)); } leemte num6lcd1 () {lcd1.setCursor (0, 0); lcd1.write (greep (2)); // volledige lcd1.setCursor (0, 1); lcd1.write (greep (2)); lcd1.setCursor (1, 1); lcd1.write (greep (0)); // half regs lcd1.setCursor (1, 0); lcd1.write (greep (1)); // half links lcd1.setCursor (2, 1); lcd1.write (greep (0)); lcd1.setCursor (2, 0); lcd1.write (greep (1)); lcd1.setCursor (3, 1); lcd1.write (greep (0)); lcd1.setCursor (3, 0); lcd1.write (greep (1)); lcd1.setCursor (4, 1); lcd1.write (greep (0)); lcd1.setCursor (4, 0); lcd1.write (greep (1)); lcd1.setCursor (5, 1); lcd1.write (greep (0)); lcd1.setCursor (5, 0); lcd1.write (greep (1)); lcd1.setCursor (6, 1); lcd1.write (greep (0)); lcd1.setCursor (6, 0); lcd1.write (greep (1)); lcd1.setCursor (7, 1); lcd1.write (greep (2)); lcd1.setCursor (7, 0); lcd1.write (greep (2)); lcd1.setCursor (8, 0); lcd1.write (greep (1)); lcd1.setCursor (9, 0); lcd1.write (greep (1)); lcd1.setCursor (10, 0); lcd1.write (greep (1)); lcd1.setCursor (11, 0); lcd1.write (greep (1)); lcd1.setCursor (12, 0); lcd1.write (greep (1)); lcd1.setCursor (13, 0); lcd1.write (greep (1)); lcd1.setCursor (14, 0); lcd1.write (greep (1)); lcd1.setCursor (15, 1); lcd1.write (greep (2)); lcd1.setCursor (15, 0); lcd1.write (greep (2)); } leemte num7lcd1 () {lcd1.setCursor (0, 1); lcd1.write (greep (0)); lcd1.setCursor (1, 1); lcd1.write (greep (0)); lcd1.setCursor (2, 1); lcd1.write (greep (0)); lcd1.setCursor (3, 1); lcd1.write (greep (0)); lcd1.setCursor (4, 1); lcd1.write (greep (0)); lcd1.setCursor (5, 1); lcd1.write (greep (0)); lcd1.setCursor (6, 1); lcd1.write (greep (0)); lcd1.setCursor (7, 1); lcd1.write (greep (0)); lcd1.setCursor (8, 1); lcd1.write (greep (0)); lcd1.setCursor (9, 1); lcd1.write (greep (0)); lcd1.setCursor (10,1); lcd1.write (greep (0)); lcd1.setCursor (11, 1); lcd1.write (greep (0)); lcd1.setCursor (12, 1); lcd1.write (greep (0)); lcd1.setCursor (13, 1); lcd1.write (greep (0)); lcd1.setCursor (14, 1); lcd1.write (greep (0)); lcd1.setCursor (15, 1); lcd1.write (greep (2)); lcd1.setCursor (15, 0); lcd1.write (greep (2)); } leemte num8lcd1 () {lcd1.setCursor (0, 0); lcd1.write (greep (2)); // volledige lcd1.setCursor (0, 1); lcd1.write (greep (2)); lcd1.setCursor (1, 1); lcd1.write (greep (0)); // half regs lcd1.setCursor (1, 0); lcd1.write (greep (1)); // half links lcd1.setCursor (2, 1); lcd1.write (greep (0)); lcd1.setCursor (2, 0); lcd1.write (greep (1)); lcd1.setCursor (3, 1); lcd1.write (greep (0)); lcd1.setCursor (3, 0); lcd1.write (greep (1)); lcd1.setCursor (4, 1); lcd1.write (greep (0)); lcd1.setCursor (4, 0); lcd1.write (greep (1)); lcd1.setCursor (5, 1); lcd1.write (greep (0)); lcd1.setCursor (5, 0); lcd1.write (greep (1)); lcd1.setCursor (6, 1); lcd1.write (greep (0)); lcd1.setCursor (6, 0); lcd1.write (greep (1)); lcd1.setCursor (7, 1); lcd1.write (greep (2)); lcd1.setCursor (7, 0); lcd1.write (greep (2)); lcd1.setCursor (8, 1); lcd1.write (greep (0)); lcd1.setCursor (8, 0); lcd1.write (greep (1)); lcd1.setCursor (9, 1); lcd1.write (greep (0)); lcd1.setCursor (9, 0); lcd1.write (greep (1)); lcd1.setCursor (10, 1); lcd1.write (greep (0)); lcd1.setCursor (10, 0); lcd1.write (greep (1)); lcd1.setCursor (11, 1); lcd1.write (greep (0)); lcd1.setCursor (11, 0); lcd1.write (greep (1)); lcd1.setCursor (12, 1); lcd1.write (greep (0)); lcd1.setCursor (12, 0); lcd1.write (greep (1)); lcd1.setCursor (13, 1); lcd1.write (greep (0)); lcd1.setCursor (13, 0); lcd1.write (greep (1)); lcd1.setCursor (14, 1); lcd1.write (greep (0)); lcd1.setCursor (14, 0); lcd1.write (greep (1)); lcd1.setCursor (15, 1); lcd1.write (greep (2)); lcd1.setCursor (15, 0); lcd1.write (greep (2)); } leemte num9lcd1 () {lcd1.setCursor (0, 0); lcd1.write (greep (2)); lcd1.setCursor (0, 1); lcd1.write (greep (2)); lcd1.setCursor (1, 1); lcd1.write (greep (0)); lcd1.setCursor (2, 1); lcd1.write (greep (0)); lcd1.setCursor (3, 1); lcd1.write (greep (0)); lcd1.setCursor (4, 1); lcd1.write (greep (0)); lcd1.setCursor (5, 1); lcd1.write (greep (0)); lcd1.setCursor (6, 1); lcd1.write (greep (0)); lcd1.setCursor (7, 1); lcd1.write (greep (2)); lcd1.setCursor (7, 0); lcd1.write (greep (2)); lcd1.setCursor (8, 0); lcd1.write (greep (1)); lcd1.setCursor (8, 1); lcd1.write (greep (0)); lcd1.setCursor (9, 0); lcd1.write (greep (1)); lcd1.setCursor (9, 1); lcd1.write (greep (0)); lcd1.setCursor (10, 0); lcd1.write (greep (1)); lcd1.setCursor (10, 1); lcd1.write (greep (0)); lcd1.setCursor (11, 0); lcd1.write (greep (1)); lcd1.setCursor (11, 1); lcd1.write (greep (0)); lcd1.setCursor (12, 0); lcd1.write (greep (1)); lcd1.setCursor (12, 1); lcd1.write (greep (0)); lcd1.setCursor (13, 0); lcd1.write (greep (1)); lcd1.setCursor (13, 1); lcd1.write (greep (0)); lcd1.setCursor (14, 0); lcd1.write (greep (1)); lcd1.setCursor (14, 1); lcd1.write (greep (0)); lcd1.setCursor (15, 0); lcd1.write (greep (2)); lcd1.setCursor (15, 1); lcd1.write (greep (2)); } leemte num0lcd2 () {lcd2.setCursor (0, 0); lcd2.write (greep (2)); // volledige lcd2.setCursor (0, 1); lcd2.write (greep (2)); lcd2.setCursor (1, 1); lcd2.write (greep (0)); // half regs lcd2.setCursor (1, 0); lcd2.write (greep (1)); // half links lcd2.setCursor (2, 1); lcd2.write (greep (0)); lcd2.setCursor (2, 0); lcd2.write (greep (1)); lcd2.setCursor (3, 1); lcd2.write (greep (0)); lcd2.setCursor (3, 0); lcd2.write (greep (1)); lcd2.setCursor (4, 1); lcd2.write (greep (0)); lcd2.setCursor (4, 0); lcd2.write (greep (1)); lcd2.setCursor (5, 1); lcd2.write (greep (0)); lcd2.setCursor (5, 0); lcd2.write (greep (1)); lcd2.setCursor (6, 1); lcd2.write (greep (0)); lcd2.setCursor (6, 0); lcd2.write (greep (1)); lcd2.setCursor (7, 1); lcd2.write (greep (0)); lcd2.setCursor (7, 0); lcd2.write (greep (1)); lcd2.setCursor (8, 1); lcd2.write (greep (0)); lcd2.setCursor (8, 0); lcd2.write (greep (1)); lcd2.setCursor (9, 1); lcd2.write (greep (0)); lcd2.setCursor (9, 0); lcd2.write (greep (1)); lcd2.setCursor (10, 1); lcd2.write (greep (0)); lcd2.setCursor (10, 0); lcd2.write (greep (1)); lcd2.setCursor (11, 1); lcd2.write (greep (0)); lcd2.setCursor (11, 0); lcd2.write (greep (1)); lcd2.setCursor (12, 1); lcd2.write (greep (0)); lcd2.setCursor (12, 0); lcd2.write (greep (1)); lcd2.setCursor (13, 1); lcd2.write (greep (0)); lcd2.setCursor (13, 0); lcd2.write (greep (1)); lcd2.setCursor (14, 1); lcd2.write (greep (0)); lcd2.setCursor (14, 0); lcd2.write (greep (1)); lcd2.setCursor (15, 1); lcd2.write (greep (2)); lcd2.setCursor (15, 0); lcd2.write (greep (2)); } leemte num1lcd2 () {lcd2.setCursor (0, 1); lcd2.write (greep (0)); lcd2.setCursor (1, 1); lcd2.write (greep (0)); lcd2.setCursor (2, 1); lcd2.write (greep (0)); lcd2.setCursor (3, 1); lcd2.write (greep (0)); lcd2.setCursor (4, 1); lcd2.write (greep (0)); lcd2.setCursor (5, 1); lcd2.write (greep (0)); lcd2.setCursor (6, 1); lcd2.write (greep (0)); lcd2.setCursor (7, 1); lcd2.write (greep (0)); lcd2.setCursor (8, 1); lcd2.write (greep (0)); lcd2.setCursor (9, 1); lcd2.write (greep (0)); lcd2.setCursor (10, 1); lcd2.write (greep (0)); lcd2.setCursor (11, 1); lcd2.write (greep (0)); lcd2.setCursor (12, 1); lcd2.write (greep (0)); lcd2.setCursor (13, 1); lcd2.write (greep (0)); lcd2.setCursor (14, 1); lcd2.write (greep (0)); lcd2.setCursor (15, 1); lcd2.write (greep (0)); } leemte num2lcd2 () {lcd2.setCursor (0, 0); lcd2.write (greep (2)); // volledige lcd2.setCursor (0, 1); lcd2.write (greep (2)); lcd2.setCursor (1, 0); lcd2.write (greep (1)); // half links lcd2.setCursor (2, 0); lcd2.write (greep (1)); lcd2.setCursor (3, 0); lcd2.write (greep (1)); lcd2.setCursor (4, 0); lcd2.write (greep (1)); lcd2.setCursor (5, 0); lcd2.write (greep (1)); lcd2.setCursor (6, 0); lcd2.write (greep (1)); lcd2.setCursor (7, 1); lcd2.write (greep (2)); lcd2.setCursor (7, 0); lcd2.write (greep (2)); lcd2.setCursor (8, 1); lcd2.write (greep (0)); lcd2.setCursor (9, 1); lcd2.write (greep (0)); lcd2.setCursor (10, 1); lcd2.write (greep (0)); lcd2.setCursor (11, 1); lcd2.write (greep (0)); lcd2.setCursor (12, 1); lcd2.write (greep (0)); lcd2.setCursor (13, 1); lcd2.write (greep (0)); lcd2.setCursor (14, 1); lcd2.write (greep (0)); lcd2.setCursor (15, 1); lcd2.write (greep (2)); lcd2.setCursor (15, 0); lcd2.write (greep (2)); } leemte num3lcd2 () {lcd2.setCursor (0, 0); lcd2.write (greep (2)); // volledige lcd2.setCursor (0, 1); lcd2.write (greep (2)); lcd2.setCursor (1, 1); lcd2.write (greep (0)); // half regs lcd2.setCursor (2, 1); lcd2.write (greep (0)); lcd2.setCursor (3, 1); lcd2.write (greep (0)); lcd2.setCursor (4, 1); lcd2.write (greep (0)); lcd2.setCursor (5, 1); lcd2.write (greep (0)); lcd2.setCursor (6, 1); lcd2.write (greep (0)); lcd2.setCursor (7, 1); lcd2.write (greep (2)); lcd2.setCursor (7, 0); lcd2.write (greep (2)); lcd2.setCursor (8, 1); lcd2.write (greep (0)); lcd2.setCursor (9, 1); lcd2.write (greep (0)); lcd2.setCursor (10, 1); lcd2.write (greep (0)); lcd2.setCursor (11, 1); lcd2.write (greep (0)); lcd2.setCursor (12, 1); lcd2.write (greep (0)); lcd2.setCursor (13, 1); lcd2.write (greep (0)); lcd2.setCursor (14, 1); lcd2.write (greep (0)); lcd2.setCursor (15, 1); lcd2.write (greep (2)); lcd2.setCursor (15, 0); lcd2.write (greep (2)); } leemte num4lcd2 () {lcd2.setCursor (0, 1); lcd2.write (greep (0)); lcd2.setCursor (1, 1); lcd2.write (greep (0)); lcd2.setCursor (2, 1); lcd2.write (greep (0)); lcd2.setCursor (3, 1); lcd2.write (greep (0)); lcd2.setCursor (4, 1); lcd2.write (greep (0)); lcd2.setCursor (5, 1); lcd2.write (greep (0)); lcd2.setCursor (6, 1); lcd2.write (greep (0)); lcd2.setCursor (7, 1); lcd2.write (greep (2)); lcd2.setCursor (7, 0); lcd2.write (greep (2)); lcd2.setCursor (8, 0); lcd2.write (greep (1)); lcd2.setCursor (8, 1); lcd2.write (greep (0)); lcd2.setCursor (9, 0); lcd2.write (greep (1)); lcd2.setCursor (9, 1); lcd2.write (greep (0)); lcd2.setCursor (10, 0); lcd2.write (greep (1)); lcd2.setCursor (10, 1); lcd2.write (greep (0)); lcd2.setCursor (11, 0); lcd2.write (greep (1)); lcd2.setCursor (11, 1); lcd2.write (greep (0)); lcd2.setCursor (12, 0); lcd2.write (greep (1)); lcd2.setCursor (12, 1); lcd2.write (greep (0)); lcd2.setCursor (13, 0); lcd2.write (greep (1)); lcd2.setCursor (13, 1); lcd2.write (greep (0)); lcd2.setCursor (14, 0); lcd2.write (greep (1)); lcd2.setCursor (14, 1); lcd2.write (greep (0)); lcd2.setCursor (15, 0); lcd2.write (greep (1)); lcd2.setCursor (15, 1); lcd2.write (greep (0)); } leemte num5lcd2 () {lcd2.setCursor (0, 0); lcd2.write (greep (2)); // volledige lcd2.setCursor (0, 1); lcd2.write (greep (2)); lcd2.setCursor (1, 1); lcd2.write (greep (0)); // half regs lcd2.setCursor (2, 1); lcd2.write (greep (0)); lcd2.setCursor (3, 1); lcd2.write (greep (0)); lcd2.setCursor (4, 1); lcd2.write (greep (0)); lcd2.setCursor (5, 1); lcd2.write (greep (0)); lcd2.setCursor (6, 1); lcd2.write (greep (0)); lcd2.setCursor (7, 1); lcd2.write (greep (2)); lcd2.setCursor (7, 0); lcd2.write (greep (2)); lcd2.setCursor (8, 0); lcd2.write (greep (1)); lcd2.setCursor (9, 0); lcd2.write (greep (1)); lcd2.setCursor (10, 0); lcd2.write (greep (1)); lcd2.setCursor (11, 0); lcd2.write (greep (1)); lcd2.setCursor (12, 0); lcd2.write (greep (1)); lcd2.setCursor (13, 0); lcd2.write (greep (1)); lcd2.setCursor (14, 0); lcd2.write (greep (1)); lcd2.setCursor (15, 1); lcd2.write (greep (2)); lcd2.setCursor (15, 0); lcd2.write (greep (2)); }

Stap 4: Werk en afwerking

Werk en afwerking
Werk en afwerking

Koppel jou arduino aan die rekenaar en laat dit werk. Ek hoop jou horlosie werk. Dit werk, maar dit lyk so morsig. Soveel weerstande en drade is nie goed nie. Plaas dus alle komponente in die boks en sny 'n gaatjie vir LCD, verf die boks en kyk na die digitale klok.

Ek het dit nie in werklikheid geskep nie, maar ek het dit in AUTODESK CIRCUITS ontwerp. Ek sal dit regtig ontwerp en die video van werk plaas. Ek is nie 'n moedertaalspreker nie. As u 'n fout gemaak het, laat weet my in privaat boodskappe. En ek is jammer oor die fout. Ek het ook 'n idee gekry van "Dan's arduino Clock". Ontmoet u met 'n ander instruksionele.

Aanbeveel: