Sisukord:

Suurepärane Arduino kell: 4 sammu
Suurepärane Arduino kell: 4 sammu

Video: Suurepärane Arduino kell: 4 sammu

Video: Suurepärane Arduino kell: 4 sammu
Video: Сервомотор управления с нажимом 2 кнопки с Arduino 2024, November
Anonim
Suurepärane Arduino kell
Suurepärane Arduino kell

Oleme arduinoga näinud palju projekte. Kuid nüüd näitan teile, kuidas ehitada arduino ja kahe LCD -ekraaniga käekell. See on lihtne, kuid täiesti lõbus. Igaüks saab seda proovida. Niisiis, olge valmis !!!

Samm: materjalide kogumine

Materjalide kogumine
Materjalide kogumine

Kui soovite seda teha, vajate mõnda eset. Neid esemeid saate hõlpsalt oma lähimast jaemüügipoest osta.

Mida vajate:

  1. Arduino UNO R3Neo
  2. Pixel Ring 24
  3. Leivalaud
  4. LCD 16x2
  5. 100 oomi takisti (2)
  6. 120 oomi takisti (2)
  7. 10 K oomi takisti (2)
  8. Vajutage nuppu

Nende asjade skeem on näidatud ülal. Võite kasutada mis tahes leiba. Teil on vaja 6 takisti, nende väärtused on loetletud ülalpool. Ühendamiseks vajate ka juhtmeid. Neid LCD -sid saate kuvada. Juhtmestiku meetodit näete järgmises etapis.

Samm: kõigi komponentide ühendamine

Kõikide komponentide juhtmestik
Kõikide komponentide juhtmestik
Kõikide komponentide juhtmestik
Kõikide komponentide juhtmestik
Kõikide komponentide juhtmestik
Kõikide komponentide juhtmestik

Asjad, mida vajate. Olen näidanud eelmises etapis, nii et võtke oma leivaplaadi juhtmestik minuga kaasa.

Juhtmestiku sammud:

  1. Asetage 100 oomi takisti leivalaua ülemisele küljele negatiivsele joonele.
  2. Asetage 120 oomi takisti leivalaua ülemisele küljele positiivsele joonele.
  3. Asetage nupp (diagramm on näidatud ülal)
  4. Asetage 10 K oomi takisti vajutusnupu alla
  5. Ühendage 100 oomi takistid (mõlemad) LED -katoodiga LCD -ekraanile
  6. Ühendage 120 oomi takistid (mõlemad) LED -anoodiga LCD -ekraanile
  7. Ühendage leivaplaadi negatiivne klemm ülemisest reast „Loe/kirjuta”.
  8. Ühendage leivalaua negatiivne klemm ülemisest joonest kontrastiga.
  9. Ühendage leivalaua positiivne klemm alumisest liinist „Vcc” -ga.
  10. Ühendage teine leivaplaadi negatiivne klemm leivaplaadi ülemisest reast GND -ga.
  11. Tehke sama teise LCD -ga, ühendage need kõik nagu eelmine.
  12. Ühendage ülejäänud takistid leivaplaadi negatiivse joonega.
  13. Ühendage nupud positiivse joonega.
  14. Ühendage leivalaua positiivne ja negatiivne klemm "Neo Pixel Ring 24" -ga.

Nüüd olete kõik komponendid ühendanud. Kuid arduino jääb alles. Selle skeem on näidatud ülal.

Arduino ühendamine kõigi komponentidega:

  1. Ühendage nupud (terminal 22) arduino A0 ja A1 -ga.
  2. Ühendage GND leivaplaadi negatiivse klemmiga.
  3. Ühendage 5V leivaplaadi positiivse klemmiga.
  4. Ühendage arduino D13 Neo Pixel Ring 24 -ga
  5. Ühendage arduino D7 LCD1 "Register Select" -ga.
  6. Ühendage arduino D8 LCD 2 "Luba" -ga.
  7. Ühendage arduino D9 LCD 2 "DB4" -ga.
  8. Ühendage arduino D10 LCD 2 "DB5" -ga.
  9. Ühendage arduino D11 LCD 2 "DB6" -ga.
  10. Ühendage arduino D12 LCD 2 "DB7" -ga.
  11. Ühendage arduino D1 LCD 1 "Register Select" -ga.
  12. Ühendage arduino D2 LCD 1 "Luba" -ga.
  13. Ühendage arduino D3 LCD 2 "DB4" -ga.
  14. Ühendage arduino D4 LCD 2 "DB5" -ga.
  15. Ühendage arduino D5 LCD 2 "DB6" -ga.
  16. Ühendage arduino D6 LCD 2 "DB7" -ga.

Kõigi komponentide skeem pärast ühendamist on näidatud ülal.

3. samm: programmeerimine

Programmeerimine
Programmeerimine

Olete ahela lõpule viinud. Kuid see ei tööta enne, kui olete selle projekti jaoks programmeerinud. Kui olete ekspert ja teil on kogemusi, saate selle hõlpsalt programmeerida. Loodan, et teate tarkvara, mida sel eesmärgil kasutatakse. Programmeerige see vastavalt, kui soovite programmeerimises muudatusi teha, kuid pidage meeles, et see peab olema õige. Vastasel korral see ei toimi. Kui te ei saa seda programmeerida, saate selle siit kopeerida või teisest allikast võtta.

#kaasake

// Left LCD LiquidCrystal lcd1 (7, 8, 9, 10, 11, 12); // Parem 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; pikk vaheaeg = 950; int sekundit = 0; int tund = 0; int tundButtonState = 0; int minButtonState = 0; bait täis [8] = {B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111,}; bait pool L [8] = {B11111, B11111, B11111, B11111, B00000, B00000, B00000,}; bait poolR [8] = {B00000, B00000, B00000, B00000, B11111, B11111, B11111, B11111,}; // seadistusrutiin käivitatakse üks kord, kui vajutate lähtestamist: void setup () {// set nööpnõelad pinMode (14, INPUT); // määra minut pinMode (15, INPUT); // seada tund // teha kohandatud märke lcd1.createChar (0, halfR); lcd1.looChar (1, pool L); lcd1.createChar (2, täis); lcd2.createChar (0, poolR); lcd2.createChar (1, pool L); lcd2.createChar (2, täis); // määrake LCD1 suurus lcd1.begin (16, 2); // määrake LCD2 suurus lcd2.begin (16, 2); // pikslirõngas pixels.begin (); // algseadistus lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); //pixels.setPixelColor(17, pixels. Color (0, 150, 0)); //pixels.setPixelColor(18, pixels. Color (0, 150, 0)); pixels.show (); } // tsüklirutiin töötab igavesti ikka ja jälle: void loop () {hourButtonState = digitalRead (15); minButtonState = digitalRead (14); if (hourButtonState == HIGH) {tund ++; runClock (); } if (minButtonState == HIGH) {sekundit ++; runClock (); } allkirjastamata pikkvoolMillis = millis (); if (currentMillis - previousMillis> intervall) {if (sekundid == 59) {sekundid = 0; kui (tund == 11) {tund = 0; } muu {tund ++; }} muu {sekundit ++; } eelmineMillis = praeguneMillis; runClock (); } viivitus (10); } void runClock () {if (sekundid == 0) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); } kui (sekundid == 1 || sekundid == 11 || sekundid == 21 || sekundid == 31 || sekundid == 41 || sekundid == 51) {lcd1.clear (); num1lcd1 (); } kui (sekundid == 2 || sekundid == 12 || sekundid == 22 || sekundid == 32 || sekundid == 42 || sekundid == 52) {lcd1.clear (); num2lcd1 (); } kui (sekundid == 3 || sekundid == 13 || sekundid == 23 || sekundid == 33 || sekundid == 43 || sekundid == 53) {lcd1.clear (); num3lcd1 (); } kui (sekundid == 4 || sekundid == 14 || sekundid == 24 || sekundid == 34 || sekundid == 44 || sekundid == 54) {lcd1.clear (); num4lcd1 (); } kui (sekundid == 5 || sekundid == 15 || sekundid == 25 || sekundid == 35 || sekundid == 45 || sekundid == 55) {lcd1.clear (); num5lcd1 (); } kui (sekundid == 6 || sekundid == 16 || sekundid == 26 || sekundid == 36 || sekundid == 46 || sekundid == 56) {lcd1.clear (); num6lcd1 (); } kui (sekundid == 7 || sekundid == 17 || sekundid == 27 || sekundid == 37 || sekundid == 47 || sekundid == 57) {lcd1.clear (); num7lcd1 (); } kui (sekundid == 8 || sekundid == 18 || sekundid == 28 || sekundid == 38 || sekundid == 48 || sekundid == 58) {lcd1.clear (); num8lcd1 (); } kui (sekundid == 9 || sekundid == 19 || sekundid == 29 || sekundid == 39 || sekundid == 49 || sekundid == 59) {lcd1.clear (); num9lcd1 (); } if (sekundid == 10) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num1lcd2 (); } if (sekundid == 20) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num2lcd2 (); } if (sekundid == 30) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num3lcd2 (); } if (sekundid == 40) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num4lcd2 (); } if (sekundid == 50) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num5lcd2 (); } kui (tund == 0) {pixels.setPixelColor (15, pixels. Color (0, 0, 0)); pixels.setPixelColor (16, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (17, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (18, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 1) {pixels.setPixelColor (17, pixels. Color (0, 0, 0)); pixels.setPixelColor (18, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (19, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (20, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 2) {pixels.setPixelColor (19, pixels. Color (0, 0, 0)); pixels.setPixelColor (20, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (21, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (22, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 3) {pixels.setPixelColor (21, pixels. Color (0, 0, 0)); pixels.setPixelColor (22, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (23, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (0, pixels. Color (0, 150, 0)); pixels.show (); } kui (tund == 4) {pixels.setPixelColor (23, pixels. Color (0, 0, 0)); pixels.setPixelColor (0, pixels. Color (0, 0, 0)); pixels.setPixelColor (1, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (2, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 5) {pixels.setPixelColor (1, pixels. Color (0, 0, 0)); pixels.setPixelColor (2, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (3, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (4, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 6) {pixels.setPixelColor (3, pixels. Color (0, 0, 0)); pixels.setPixelColor (4, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (5, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (6, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 7) {pixels.setPixelColor (5, pixels. Color (0, 0, 0)); pixels.setPixelColor (6, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (7, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (8, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 8) {pixels.setPixelColor (7, pixels. Color (0, 0, 0)); pixels.setPixelColor (8, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (9, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (10, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 9) {pixels.setPixelColor (9, pixels. Color (0, 0, 0)); pixels.setPixelColor (10, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (11, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (12, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 10) {pixels.setPixelColor (11, pixels. Color (0, 0, 0)); pixels.setPixelColor (12, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (13, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (14, pikslit. Värv (0, 150, 0)); pixels.show (); } kui (tund == 11) {pixels.setPixelColor (13, pixels. Color (0, 0, 0)); pixels.setPixelColor (14, pikslit. Värv (0, 0, 0)); pixels.setPixelColor (15, pikslit. Värv (0, 150, 0)); pixels.setPixelColor (16, pikslit. Värv (0, 150, 0)); pixels.show (); }} tühine num0lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // täielik lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // pooleldi parem lcd1.setCursor (1, 0); lcd1.write (bait (1)); // pool vasakule lcd1.setCursor (2, 1); lcd1.write (bait (0)); lcd1.setCursor (2, 0); lcd1.write (bait (1)); lcd1.setCursor (3, 1); lcd1.write (bait (0)); lcd1.setCursor (3, 0); lcd1.write (bait (1)); lcd1.setCursor (4, 1); lcd1.write (bait (0)); lcd1.setCursor (4, 0); lcd1.write (bait (1)); lcd1.setCursor (5, 1); lcd1.write (bait (0)); lcd1.setCursor (5, 0); lcd1.write (bait (1)); lcd1.setCursor (6, 1); lcd1.write (bait (0)); lcd1.setCursor (6, 0); lcd1.write (bait (1)); lcd1.setCursor (7, 1); lcd1.write (bait (0)); lcd1.setCursor (7, 0); lcd1.write (bait (1)); lcd1.setCursor (8, 1); lcd1.write (bait (0)); lcd1.setCursor (8, 0); lcd1.write (bait (1)); lcd1.setCursor (9, 1); lcd1.write (bait (0)); lcd1.setCursor (9, 0); lcd1.write (bait (1)); lcd1.setCursor (10, 1); lcd1.write (bait (0)); lcd1.setCursor (10, 0); lcd1.write (bait (1)); lcd1.setCursor (11, 1); lcd1.write (bait (0)); lcd1.setCursor (11, 0); lcd1.write (bait (1)); lcd1.setCursor (12, 1); lcd1.write (bait (0)); lcd1.setCursor (12, 0); lcd1.write (bait (1)); lcd1.setCursor (13, 1); lcd1.write (bait (0)); lcd1.setCursor (13, 0); lcd1.write (bait (1)); lcd1.setCursor (14, 1); lcd1.write (bait (0)); lcd1.setCursor (14, 0); lcd1.write (bait (1)); lcd1.setCursor (15, 1); lcd1.write (bait (2)); lcd1.setCursor (15, 0); lcd1.write (bait (2)); } tühine num1lcd1 () {lcd1.setCursor (0, 1); lcd1.write (bait (0)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); lcd1.setCursor (2, 1); lcd1.write (bait (0)); lcd1.setCursor (3, 1); lcd1.write (bait (0)); lcd1.setCursor (4, 1); lcd1.write (bait (0)); lcd1.setCursor (5, 1); lcd1.write (bait (0)); lcd1.setCursor (6, 1); lcd1.write (bait (0)); lcd1.setCursor (7, 1); lcd1.write (bait (0)); lcd1.setCursor (8, 1); lcd1.write (bait (0)); lcd1.setCursor (9, 1); lcd1.write (bait (0)); lcd1.setCursor (10, 1); lcd1.write (bait (0)); lcd1.setCursor (11, 1); lcd1.write (bait (0)); lcd1.setCursor (12, 1); lcd1.write (bait (0)); lcd1.setCursor (13, 1); lcd1.write (bait (0)); lcd1.setCursor (14, 1); lcd1.write (bait (0)); lcd1.setCursor (15, 1); lcd1.write (bait (0)); } tühine num2lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // täielik lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 0); lcd1.write (bait (1)); // pool vasakule lcd1.setCursor (2, 0); lcd1.write (bait (1)); lcd1.setCursor (3, 0); lcd1.write (bait (1)); lcd1.setCursor (4, 0); lcd1.write (bait (1)); lcd1.setCursor (5, 0); lcd1.write (bait (1)); lcd1.setCursor (6, 0); lcd1.write (bait (1)); lcd1.setCursor (7, 1); lcd1.write (bait (2)); lcd1.setCursor (7, 0); lcd1.write (bait (2)); lcd1.setCursor (8, 1); lcd1.write (bait (0)); lcd1.setCursor (9, 1); lcd1.write (bait (0)); lcd1.setCursor (10, 1); lcd1.write (bait (0)); lcd1.setCursor (11, 1); lcd1.write (bait (0)); lcd1.setCursor (12, 1); lcd1.write (bait (0)); lcd1.setCursor (13, 1); lcd1.write (bait (0)); lcd1.setCursor (14, 1); lcd1.write (bait (0)); lcd1.setCursor (15, 1); lcd1.write (bait (2)); lcd1.setCursor (15, 0); lcd1.write (bait (2)); } tühine num3lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // täielik lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // pooleldi parem lcd1.setCursor (2, 1); lcd1.write (bait (0)); lcd1.setCursor (3, 1); lcd1.write (bait (0)); lcd1.setCursor (4, 1); lcd1.write (bait (0)); lcd1.setCursor (5, 1); lcd1.write (bait (0)); lcd1.setCursor (6, 1); lcd1.write (bait (0)); lcd1.setCursor (7, 1); lcd1.write (bait (2)); lcd1.setCursor (7, 0); lcd1.write (bait (2)); lcd1.setCursor (8, 1); lcd1.write (bait (0)); lcd1.setCursor (9, 1); lcd1.write (bait (0)); lcd1.setCursor (10, 1); lcd1.write (bait (0)); lcd1.setCursor (11, 1); lcd1.write (bait (0)); lcd1.setCursor (12, 1); lcd1.write (bait (0)); lcd1.setCursor (13, 1); lcd1.write (bait (0)); lcd1.setCursor (14, 1); lcd1.write (bait (0)); lcd1.setCursor (15, 1); lcd1.write (bait (2)); lcd1.setCursor (15, 0); lcd1.write (bait (2)); } tühine num4lcd1 () {lcd1.setCursor (0, 1); lcd1.write (bait (0)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); lcd1.setCursor (2, 1); lcd1.write (bait (0)); lcd1.setCursor (3, 1); lcd1.write (bait (0)); lcd1.setCursor (4, 1); lcd1.write (bait (0)); lcd1.setCursor (5, 1); lcd1.write (bait (0)); lcd1.setCursor (6, 1); lcd1.write (bait (0)); lcd1.setCursor (7, 1); lcd1.write (bait (2)); lcd1.setCursor (7, 0); lcd1.write (bait (2)); lcd1.setCursor (8, 0); lcd1.write (bait (1)); lcd1.setCursor (8, 1); lcd1.write (bait (0)); lcd1.setCursor (9, 0); lcd1.write (bait (1)); lcd1.setCursor (9, 1); lcd1.write (bait (0)); lcd1.setCursor (10, 0); lcd1.write (bait (1)); lcd1.setCursor (10, 1); lcd1.write (bait (0)); lcd1.setCursor (11, 0); lcd1.write (bait (1)); lcd1.setCursor (11, 1); lcd1.write (bait (0)); lcd1.setCursor (12, 0); lcd1.write (bait (1)); lcd1.setCursor (12, 1); lcd1.write (bait (0)); lcd1.setCursor (13, 0); lcd1.write (bait (1)); lcd1.setCursor (13, 1); lcd1.write (bait (0)); lcd1.setCursor (14, 0); lcd1.write (bait (1)); lcd1.setCursor (14, 1); lcd1.write (bait (0)); lcd1.setCursor (15, 0); lcd1.write (bait (1)); lcd1.setCursor (15, 1); lcd1.write (bait (0)); } tühine num5lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // täielik lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // pooleldi parem lcd1.setCursor (2, 1); lcd1.write (bait (0)); lcd1.setCursor (3, 1); lcd1.write (bait (0)); lcd1.setCursor (4, 1); lcd1.write (bait (0)); lcd1.setCursor (5, 1); lcd1.write (bait (0)); lcd1.setCursor (6, 1); lcd1.write (bait (0)); lcd1.setCursor (7, 1); lcd1.write (bait (2)); lcd1.setCursor (7, 0); lcd1.write (bait (2)); lcd1.setCursor (8, 0); lcd1.write (bait (1)); lcd1.setCursor (9, 0); lcd1.write (bait (1)); lcd1.setCursor (10, 0); lcd1.write (bait (1)); lcd1.setCursor (11, 0); lcd1.write (bait (1)); lcd1.setCursor (12, 0); lcd1.write (bait (1)); lcd1.setCursor (13, 0); lcd1.write (bait (1)); lcd1.setCursor (14, 0); lcd1.write (bait (1)); lcd1.setCursor (15, 1); lcd1.write (bait (2)); lcd1.setCursor (15, 0); lcd1.write (bait (2)); } tühine num6lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // täielik lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // pooleldi parem lcd1.setCursor (1, 0); lcd1.write (bait (1)); // pool vasakule lcd1.setCursor (2, 1); lcd1.write (bait (0)); lcd1.setCursor (2, 0); lcd1.write (bait (1)); lcd1.setCursor (3, 1); lcd1.write (bait (0)); lcd1.setCursor (3, 0); lcd1.write (bait (1)); lcd1.setCursor (4, 1); lcd1.write (bait (0)); lcd1.setCursor (4, 0); lcd1.write (bait (1)); lcd1.setCursor (5, 1); lcd1.write (bait (0)); lcd1.setCursor (5, 0); lcd1.write (bait (1)); lcd1.setCursor (6, 1); lcd1.write (bait (0)); lcd1.setCursor (6, 0); lcd1.write (bait (1)); lcd1.setCursor (7, 1); lcd1.write (bait (2)); lcd1.setCursor (7, 0); lcd1.write (bait (2)); lcd1.setCursor (8, 0); lcd1.write (bait (1)); lcd1.setCursor (9, 0); lcd1.write (bait (1)); lcd1.setCursor (10, 0); lcd1.write (bait (1)); lcd1.setCursor (11, 0); lcd1.write (bait (1)); lcd1.setCursor (12, 0); lcd1.write (bait (1)); lcd1.setCursor (13, 0); lcd1.write (bait (1)); lcd1.setCursor (14, 0); lcd1.write (bait (1)); lcd1.setCursor (15, 1); lcd1.write (bait (2)); lcd1.setCursor (15, 0); lcd1.write (bait (2)); } tühine num7lcd1 () {lcd1.setCursor (0, 1); lcd1.write (bait (0)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); lcd1.setCursor (2, 1); lcd1.write (bait (0)); lcd1.setCursor (3, 1); lcd1.write (bait (0)); lcd1.setCursor (4, 1); lcd1.write (bait (0)); lcd1.setCursor (5, 1); lcd1.write (bait (0)); lcd1.setCursor (6, 1); lcd1.write (bait (0)); lcd1.setCursor (7, 1); lcd1.write (bait (0)); lcd1.setCursor (8, 1); lcd1.write (bait (0)); lcd1.setCursor (9, 1); lcd1.write (bait (0)); lcd1.setCursor (10,1); lcd1.write (bait (0)); lcd1.setCursor (11, 1); lcd1.write (bait (0)); lcd1.setCursor (12, 1); lcd1.write (bait (0)); lcd1.setCursor (13, 1); lcd1.write (bait (0)); lcd1.setCursor (14, 1); lcd1.write (bait (0)); lcd1.setCursor (15, 1); lcd1.write (bait (2)); lcd1.setCursor (15, 0); lcd1.write (bait (2)); } tühine num8lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // täielik lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // pooleldi parem lcd1.setCursor (1, 0); lcd1.write (bait (1)); // pool vasakule lcd1.setCursor (2, 1); lcd1.write (bait (0)); lcd1.setCursor (2, 0); lcd1.write (bait (1)); lcd1.setCursor (3, 1); lcd1.write (bait (0)); lcd1.setCursor (3, 0); lcd1.write (bait (1)); lcd1.setCursor (4, 1); lcd1.write (bait (0)); lcd1.setCursor (4, 0); lcd1.write (bait (1)); lcd1.setCursor (5, 1); lcd1.write (bait (0)); lcd1.setCursor (5, 0); lcd1.write (bait (1)); lcd1.setCursor (6, 1); lcd1.write (bait (0)); lcd1.setCursor (6, 0); lcd1.write (bait (1)); lcd1.setCursor (7, 1); lcd1.write (bait (2)); lcd1.setCursor (7, 0); lcd1.write (bait (2)); lcd1.setCursor (8, 1); lcd1.write (bait (0)); lcd1.setCursor (8, 0); lcd1.write (bait (1)); lcd1.setCursor (9, 1); lcd1.write (bait (0)); lcd1.setCursor (9, 0); lcd1.write (bait (1)); lcd1.setCursor (10, 1); lcd1.write (bait (0)); lcd1.setCursor (10, 0); lcd1.write (bait (1)); lcd1.setCursor (11, 1); lcd1.write (bait (0)); lcd1.setCursor (11, 0); lcd1.write (bait (1)); lcd1.setCursor (12, 1); lcd1.write (bait (0)); lcd1.setCursor (12, 0); lcd1.write (bait (1)); lcd1.setCursor (13, 1); lcd1.write (bait (0)); lcd1.setCursor (13, 0); lcd1.write (bait (1)); lcd1.setCursor (14, 1); lcd1.write (bait (0)); lcd1.setCursor (14, 0); lcd1.write (bait (1)); lcd1.setCursor (15, 1); lcd1.write (bait (2)); lcd1.setCursor (15, 0); lcd1.write (bait (2)); } tühine num9lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); lcd1.setCursor (2, 1); lcd1.write (bait (0)); lcd1.setCursor (3, 1); lcd1.write (bait (0)); lcd1.setCursor (4, 1); lcd1.write (bait (0)); lcd1.setCursor (5, 1); lcd1.write (bait (0)); lcd1.setCursor (6, 1); lcd1.write (bait (0)); lcd1.setCursor (7, 1); lcd1.write (bait (2)); lcd1.setCursor (7, 0); lcd1.write (bait (2)); lcd1.setCursor (8, 0); lcd1.write (bait (1)); lcd1.setCursor (8, 1); lcd1.write (bait (0)); lcd1.setCursor (9, 0); lcd1.write (bait (1)); lcd1.setCursor (9, 1); lcd1.write (bait (0)); lcd1.setCursor (10, 0); lcd1.write (bait (1)); lcd1.setCursor (10, 1); lcd1.write (bait (0)); lcd1.setCursor (11, 0); lcd1.write (bait (1)); lcd1.setCursor (11, 1); lcd1.write (bait (0)); lcd1.setCursor (12, 0); lcd1.write (bait (1)); lcd1.setCursor (12, 1); lcd1.write (bait (0)); lcd1.setCursor (13, 0); lcd1.write (bait (1)); lcd1.setCursor (13, 1); lcd1.write (bait (0)); lcd1.setCursor (14, 0); lcd1.write (bait (1)); lcd1.setCursor (14, 1); lcd1.write (bait (0)); lcd1.setCursor (15, 0); lcd1.write (bait (2)); lcd1.setCursor (15, 1); lcd1.write (bait (2)); } tühine num0lcd2 () {lcd2.setCursor (0, 0); lcd2.write (bait (2)); // täielik lcd2.setCursor (0, 1); lcd2.write (bait (2)); lcd2.setCursor (1, 1); lcd2.write (bait (0)); // pooleldi parem lcd2.setCursor (1, 0); lcd2.write (bait (1)); // pool vasakule lcd2.setCursor (2, 1); lcd2.write (bait (0)); lcd2.setCursor (2, 0); lcd2.write (bait (1)); lcd2.setCursor (3, 1); lcd2.write (bait (0)); lcd2.setCursor (3, 0); lcd2.write (bait (1)); lcd2.setCursor (4, 1); lcd2.write (bait (0)); lcd2.setCursor (4, 0); lcd2.write (bait (1)); lcd2.setCursor (5, 1); lcd2.write (bait (0)); lcd2.setCursor (5, 0); lcd2.write (bait (1)); lcd2.setCursor (6, 1); lcd2.write (bait (0)); lcd2.setCursor (6, 0); lcd2.write (bait (1)); lcd2.setCursor (7, 1); lcd2.write (bait (0)); lcd2.setCursor (7, 0); lcd2.write (bait (1)); lcd2.setCursor (8, 1); lcd2.write (bait (0)); lcd2.setCursor (8, 0); lcd2.write (bait (1)); lcd2.setCursor (9, 1); lcd2.write (bait (0)); lcd2.setCursor (9, 0); lcd2.write (bait (1)); lcd2.setCursor (10, 1); lcd2.write (bait (0)); lcd2.setCursor (10, 0); lcd2.write (bait (1)); lcd2.setCursor (11, 1); lcd2.write (bait (0)); lcd2.setCursor (11, 0); lcd2.write (bait (1)); lcd2.setCursor (12, 1); lcd2.write (bait (0)); lcd2.setCursor (12, 0); lcd2.write (bait (1)); lcd2.setCursor (13, 1); lcd2.write (bait (0)); lcd2.setCursor (13, 0); lcd2.write (bait (1)); lcd2.setCursor (14, 1); lcd2.write (bait (0)); lcd2.setCursor (14, 0); lcd2.write (bait (1)); lcd2.setCursor (15, 1); lcd2.write (bait (2)); lcd2.setCursor (15, 0); lcd2.write (bait (2)); } tühine num1lcd2 () {lcd2.setCursor (0, 1); lcd2.write (bait (0)); lcd2.setCursor (1, 1); lcd2.write (bait (0)); lcd2.setCursor (2, 1); lcd2.write (bait (0)); lcd2.setCursor (3, 1); lcd2.write (bait (0)); lcd2.setCursor (4, 1); lcd2.write (bait (0)); lcd2.setCursor (5, 1); lcd2.write (bait (0)); lcd2.setCursor (6, 1); lcd2.write (bait (0)); lcd2.setCursor (7, 1); lcd2.write (bait (0)); lcd2.setCursor (8, 1); lcd2.write (bait (0)); lcd2.setCursor (9, 1); lcd2.write (bait (0)); lcd2.setCursor (10, 1); lcd2.write (bait (0)); lcd2.setCursor (11, 1); lcd2.write (bait (0)); lcd2.setCursor (12, 1); lcd2.write (bait (0)); lcd2.setCursor (13, 1); lcd2.write (bait (0)); lcd2.setCursor (14, 1); lcd2.write (bait (0)); lcd2.setCursor (15, 1); lcd2.write (bait (0)); } tühine num2lcd2 () {lcd2.setCursor (0, 0); lcd2.write (bait (2)); // täielik lcd2.setCursor (0, 1); lcd2.write (bait (2)); lcd2.setCursor (1, 0); lcd2.write (bait (1)); // pool vasakule lcd2.setCursor (2, 0); lcd2.write (bait (1)); lcd2.setCursor (3, 0); lcd2.write (bait (1)); lcd2.setCursor (4, 0); lcd2.write (bait (1)); lcd2.setCursor (5, 0); lcd2.write (bait (1)); lcd2.setCursor (6, 0); lcd2.write (bait (1)); lcd2.setCursor (7, 1); lcd2.write (bait (2)); lcd2.setCursor (7, 0); lcd2.write (bait (2)); lcd2.setCursor (8, 1); lcd2.write (bait (0)); lcd2.setCursor (9, 1); lcd2.write (bait (0)); lcd2.setCursor (10, 1); lcd2.write (bait (0)); lcd2.setCursor (11, 1); lcd2.write (bait (0)); lcd2.setCursor (12, 1); lcd2.write (bait (0)); lcd2.setCursor (13, 1); lcd2.write (bait (0)); lcd2.setCursor (14, 1); lcd2.write (bait (0)); lcd2.setCursor (15, 1); lcd2.write (bait (2)); lcd2.setCursor (15, 0); lcd2.write (bait (2)); } tühine num3lcd2 () {lcd2.setCursor (0, 0); lcd2.write (bait (2)); // täielik lcd2.setCursor (0, 1); lcd2.write (bait (2)); lcd2.setCursor (1, 1); lcd2.write (bait (0)); // pooleldi parem lcd2.setCursor (2, 1); lcd2.write (bait (0)); lcd2.setCursor (3, 1); lcd2.write (bait (0)); lcd2.setCursor (4, 1); lcd2.write (bait (0)); lcd2.setCursor (5, 1); lcd2.write (bait (0)); lcd2.setCursor (6, 1); lcd2.write (bait (0)); lcd2.setCursor (7, 1); lcd2.write (bait (2)); lcd2.setCursor (7, 0); lcd2.write (bait (2)); lcd2.setCursor (8, 1); lcd2.write (bait (0)); lcd2.setCursor (9, 1); lcd2.write (bait (0)); lcd2.setCursor (10, 1); lcd2.write (bait (0)); lcd2.setCursor (11, 1); lcd2.write (bait (0)); lcd2.setCursor (12, 1); lcd2.write (bait (0)); lcd2.setCursor (13, 1); lcd2.write (bait (0)); lcd2.setCursor (14, 1); lcd2.write (bait (0)); lcd2.setCursor (15, 1); lcd2.write (bait (2)); lcd2.setCursor (15, 0); lcd2.write (bait (2)); } tühine num4lcd2 () {lcd2.setCursor (0, 1); lcd2.write (bait (0)); lcd2.setCursor (1, 1); lcd2.write (bait (0)); lcd2.setCursor (2, 1); lcd2.write (bait (0)); lcd2.setCursor (3, 1); lcd2.write (bait (0)); lcd2.setCursor (4, 1); lcd2.write (bait (0)); lcd2.setCursor (5, 1); lcd2.write (bait (0)); lcd2.setCursor (6, 1); lcd2.write (bait (0)); lcd2.setCursor (7, 1); lcd2.write (bait (2)); lcd2.setCursor (7, 0); lcd2.write (bait (2)); lcd2.setCursor (8, 0); lcd2.write (bait (1)); lcd2.setCursor (8, 1); lcd2.write (bait (0)); lcd2.setCursor (9, 0); lcd2.write (bait (1)); lcd2.setCursor (9, 1); lcd2.write (bait (0)); lcd2.setCursor (10, 0); lcd2.write (bait (1)); lcd2.setCursor (10, 1); lcd2.write (bait (0)); lcd2.setCursor (11, 0); lcd2.write (bait (1)); lcd2.setCursor (11, 1); lcd2.write (bait (0)); lcd2.setCursor (12, 0); lcd2.write (bait (1)); lcd2.setCursor (12, 1); lcd2.write (bait (0)); lcd2.setCursor (13, 0); lcd2.write (bait (1)); lcd2.setCursor (13, 1); lcd2.write (bait (0)); lcd2.setCursor (14, 0); lcd2.write (bait (1)); lcd2.setCursor (14, 1); lcd2.write (bait (0)); lcd2.setCursor (15, 0); lcd2.write (bait (1)); lcd2.setCursor (15, 1); lcd2.write (bait (0)); } tühine num5lcd2 () {lcd2.setCursor (0, 0); lcd2.write (bait (2)); // täielik lcd2.setCursor (0, 1); lcd2.write (bait (2)); lcd2.setCursor (1, 1); lcd2.write (bait (0)); // pooleldi parem lcd2.setCursor (2, 1); lcd2.write (bait (0)); lcd2.setCursor (3, 1); lcd2.write (bait (0)); lcd2.setCursor (4, 1); lcd2.write (bait (0)); lcd2.setCursor (5, 1); lcd2.write (bait (0)); lcd2.setCursor (6, 1); lcd2.write (bait (0)); lcd2.setCursor (7, 1); lcd2.write (bait (2)); lcd2.setCursor (7, 0); lcd2.write (bait (2)); lcd2.setCursor (8, 0); lcd2.write (bait (1)); lcd2.setCursor (9, 0); lcd2.write (bait (1)); lcd2.setCursor (10, 0); lcd2.write (bait (1)); lcd2.setCursor (11, 0); lcd2.write (bait (1)); lcd2.setCursor (12, 0); lcd2.write (bait (1)); lcd2.setCursor (13, 0); lcd2.write (bait (1)); lcd2.setCursor (14, 0); lcd2.write (bait (1)); lcd2.setCursor (15, 1); lcd2.write (bait (2)); lcd2.setCursor (15, 0); lcd2.write (bait (2)); }

4. samm: töö ja viimistlus

Töö ja viimistlus
Töö ja viimistlus

Ühendage arduino arvutiga ja laske sellel töötada. Loodan, et teie kell töötab. See töötab, kuid tundub nii räpane. Nii palju takisteid ja juhtmeid pole hea. Niisiis, asetage kõik komponendid kasti ja lõigake üks auk karbi värvimiseks ja digitaalse kella väljanägemiseks.

Ma ei ole seda reaalselt loonud, kuid olen kujundanud selle AUTODESK AJAL. Kavandan selle reaalselt ja postitan töövideo. Ma ei ole emakeel. Kui olete eksinud, andke mulle sellest privaatsõnumites teada. Ja mul on selle vea pärast kahju. Olen mõne idee võtnud ka "Dan's arduino Clockist". Kohtume teise juhendatavaga.

Soovitan: