Orodha ya maudhui:

Saa ya kushangaza ya Arduino: Hatua 4
Saa ya kushangaza ya Arduino: Hatua 4

Video: Saa ya kushangaza ya Arduino: Hatua 4

Video: Saa ya kushangaza ya Arduino: Hatua 4
Video: Сервомотор управления с нажимом 2 кнопки с Arduino 2024, Novemba
Anonim
Saa ya kushangaza ya Arduino
Saa ya kushangaza ya Arduino

Tumeona miradi mingi na arduino. Lakini sasa, nitakuonyesha jinsi ya kuunda saa na onyesho la arduino na 2 LCD. Ni rahisi lakini ya kufurahisha kabisa. Kila mtu anaweza kujaribu. Kwa hivyo, Jiandae !!!

Hatua ya 1: Kukusanya Vifaa

Kukusanya Vifaa
Kukusanya Vifaa

Ikiwa unataka kuifanya utahitaji vitu kadhaa. Vitu hivi unaweza kununua kwa urahisi kutoka duka yako ya karibu ya rejareja.

Nini utahitaji:

  1. Arduino UNO R3Neo
  2. Pete ya Pixel 24
  3. Bodi ya mkate
  4. LCD 16x2
  5. Kizuizi cha 100 Ohm (2)
  6. Mpingaji wa 120 Ohm (2)
  7. Kizuizi cha 10 K Ohm (2)
  8. Kitufe cha kushinikiza

Mchoro wa mambo haya umeonyeshwa hapo juu. Unaweza kutumia bodi yoyote ya mkate. Unahitaji Resistors 6 maadili yao yameandikwa hapo juu kwenye orodha. Utahitaji pia waya kwa unganisho. Hizi LCD utazionesha. Njia ya mzunguko wa wiring unaweza kuona katika hatua inayofuata.

Hatua ya 2: Wiring Vipengele vyote

Wiring Vipengele vyote
Wiring Vipengele vyote
Wiring Vipengele vyote
Wiring Vipengele vyote
Wiring Vipengele vyote
Wiring Vipengele vyote

Vitu utakavyohitaji. Nimeonyesha katika hatua iliyopita kwa hivyo chukua mzunguko wako wa bodi ya mkate pamoja nami.

Hatua za Wiring:

  1. Weka kontena la 100 Ohm upande wa juu wa bodi ya mkate kwenye laini hasi.
  2. Weka kontena la 120 Ohm upande wa juu wa bodi ya mkate kwenye laini chanya.
  3. Weka kitufe cha kushinikiza (Mchoro umeonyeshwa hapo juu)
  4. Weka 10 K Ohm resistor chini ya Push Button
  5. Unganisha vipinga 100 Ohm (vyote) kwa onyesho la LCD na 'LED Cathode'
  6. Unganisha vipingao vya 120 Ohm (vyote) kwa onyesho la LCD na 'LED Anode'
  7. Unganisha terminal hasi ya bodi ya mkate kutoka mstari wa juu hadi 'Soma / Andika'.
  8. Unganisha terminal hasi ya bodi ya mkate kutoka mstari wa juu hadi 'Tofauti'.
  9. Unganisha terminal nzuri ya bodi ya mkate kutoka laini ya chini hadi 'Vcc'.
  10. Unganisha kituo kingine hasi cha bodi ya mkate kutoka mstari wa juu wa bodi ya mkate hadi 'GND ".
  11. Fanya vivyo hivyo kwenye LCD ya 2 unganisha hizi zote kama zilizopita.
  12. Unganisha vipinga vilivyobaki kwenye laini hasi ya bodi ya mkate.
  13. Unganisha vifungo vya kushinikiza kwa laini chanya.
  14. Unganisha kituo cha Chanya na Hasi cha bodi ya mkate na "Gonga la Neo Pixel 24".

Sasa, umeunganisha vifaa vyote. Lakini arduino bado imebaki. Mchoro wa hii iliyoonyeshwa hapo juu.

Wiring Hatua za arduino kwa vifaa vyote:

  1. Unganisha vifungo vya kushinikiza (Terminal22) kwa A0 & A1 ya arduino.
  2. Unganisha GND na kituo hasi cha bodi ya mkate.
  3. Unganisha 5V kwa terminal nzuri ya bodi ya mkate.
  4. Unganisha D13 ya arduino na "Power of" "Neo Pixel Ring 24"
  5. Unganisha D7 ya arduino na "Sajili Chagua" ya LCD1.
  6. Unganisha D8 ya arduino na "Wezesha" ya LCD 2.
  7. Unganisha D9 ya arduino na "DB4" ya LCD 2.
  8. Unganisha D10 ya arduino kwa "DB5" ya LCD 2.
  9. Unganisha D11 ya arduino na "DB6" ya LCD 2.
  10. Unganisha D12 ya arduino kwa "DB7" ya LCD 2.
  11. Unganisha D1 ya arduino na "Sajili Chagua" ya LCD 1.
  12. Unganisha D2 ya arduino kwenye "Wezesha" ya LCD 1.
  13. Unganisha D3 ya arduino na "DB4" ya LCD 2.
  14. Unganisha D4 ya arduino kwa "DB5" ya LCD 2.
  15. Unganisha D5 ya arduino na "DB6" ya LCD 2.
  16. Unganisha D6 ya arduino kwa "DB7" ya LCD 2.

Mchoro wa vifaa vyote baada ya wiring imeonyeshwa hapo juu.

Hatua ya 3: Programu

Kupanga programu
Kupanga programu

Umefanya mzunguko ukamilike. Lakini haifanyi kazi mpaka utaipanga kwa mradi huu. Ikiwa wewe ni mtaalam na una uzoefu utaipanga kwa urahisi. Natumai utajua programu ambayo hutumiwa kwa kusudi hili. Mpange ipasavyo ikiwa unataka kuunda mabadiliko katika programu unaweza lakini kumbuka lazima iwe sahihi. Vinginevyo haitafanya kazi. Ikiwa huwezi kuipanga unaweza kunakili kutoka hapa au kuichukua kutoka kwa chanzo kingine.

# pamoja

// Kioevu cha LCD cha kushotoCrystal lcd1 (7, 8, 9, 10, 11, 12); // Liquid ya LCD ya kuliaCrystal lcd2 (1, 2, 3, 4, 5, 6); / Gonga la NeoPixel 24 #fafanua PIN 13 # fafanua NUMPIXELS 24Adafruit_NeoPixel pixels = Adafruit_NeoPixel (NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); kucheleweshwa kwa muda = 50; muda mrefu uliopitaMillis = 0; muda mrefu = 950; sekunde int = 0; saa ya saa = 0; saa ya saaBodi ya Serikali = 0; dakika minButtonState = 0; baiti kamili [8] = {B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111,};, B00000,}; byte halfR [8] = {B00000, B00000, B00000, B00000, B11111, B11111, B11111, B11111,}; pini za kifungo pinMode (14, INPUT); // weka pinMode ya dakika (15, INPUT); // seti saa // fanya wahusika wa kawaida lcd1.createChar (0, halfR); lcd1.createChar (1, halfL); lcd1.createChar (2, kamili); lcd2.createChar (0, halfR); lcd2.createChar (1, nusuL); lcd2.createChar (2, kamili); // weka ukubwa wa LCD1 lcd1. anza (16, 2); // weka ukubwa wa LCD2 lcd2. anza (16, 2); saizi za pete // za pikseli. anza (); // usanidi wa awali lcd1. clear (); namba0lcd1 (); lcd2 wazi (); namba0lcd2 (); // pixels.setPixelColor (17, saizi Rangi (0, 150, 0)); // pixels.setPixelColor (18, saizi Rangi (0, 150, 0)); saizi. onyesha (); } // utaratibu wa kitanzi unaendelea tena na tena milele: kitanzi batili () {hourButtonState = digitalRead (15); minButtonState = kusoma kwa dijiti (14); ikiwa (hourButtonState == JUU) {hour ++; runClock (); } ikiwa (minButtonState == JUU) {sekunde ++; runClock (); } unsigned long longMillis = millis (); ikiwa (currentMillis - previousMillis> muda) {if (seconds == 59) {seconds = 0; ikiwa (saa == 11) {saa = 0; } mwingine {saa ++; }} mwingine {sekunde ++; } previousMillis = currentMillis; runClock (); } kuchelewa (10); } batili runClock () {if (sekunde == 0) {lcd1.clear (); namba0lcd1 (); lcd2 wazi (); namba0lcd2 (); } ikiwa (sekunde == 1 || sekunde == 11 || sekunde == 21 || sekunde == 31 || sekunde == 41 || sekunde == 51) {lcd1.clear (); namba1lcd1 (); } ikiwa (sekunde == 2 || sekunde == 12 || sekunde == sekunde 22 | namba2lcd1 (); } ikiwa (sekunde == 3 || sekunde == 13 || sekunde == 23 || sekunde == 33 || sekunde == 43 || sekunde == 53) {lcd1.clear (); namba3lcd1 (); } ikiwa (sekunde == 4 || sekunde == 14 || sekunde == sekunde 24 || == 34 || sekunde == 44 || sekunde == 54) {lcd1.clear (); idadi4lcd1 (); } ikiwa (sekunde == 5 || sekunde == 15 || sekunde == sekunde 25 || == 35 || sekunde == 45 || sekunde == 55) {lcd1.clear (); idadi5lcd1 (); } ikiwa (sekunde == 6 || sekunde == 16 || sekunde == 26 || sekunde == 36 || sekunde == 46 || sekunde == 56) {lcd1.clear (); namba6lcd1 (); } ikiwa (sekunde == 7 || sekunde == 17 || sekunde == 27 || sekunde == 37 || sekunde == 47 || sekunde == 57) {lcd1.clear (); idadi7lcd1 (); } ikiwa (sekunde == 8 || sekunde == 18 || sekunde == 28 || sekunde == 38 || sekunde == 48 || sekunde == 58) {lcd1.clear (); idadi8lcd1 (); } ikiwa (sekunde == 9 || sekunde == 19 || sekunde == sekunde 29 || == 39 || sekunde == 49 || sekunde == 59) {lcd1.clear (); idadi9lcd1 (); } ikiwa (sekunde == 10) {lcd1.clear (); namba0lcd1 (); lcd2 wazi (); namba1lcd2 (); } ikiwa (sekunde == 20) {lcd1.clear (); namba0lcd1 (); lcd2 wazi (); namba2lcd2 (); } ikiwa (sekunde == 30) {lcd1.clear (); namba0lcd1 (); lcd2 wazi (); namba3lcd2 (); } ikiwa (sekunde == 40) {lcd1.clear (); namba0lcd1 (); lcd2 wazi (); idadi4lcd2 (); } ikiwa (sekunde == 50) {lcd1.clear (); namba0lcd1 (); lcd2 wazi (); idadi5lcd2 (); } ikiwa (saa == 0) {pixels.setPixelColor (15, pixels. Color (0, 0, 0)); saizi.setPixelColor (16, saizi Rangi (0, 0, 0)); saizi.setPixelColor (17, saizi Rangi (0, 150, 0)); saizi.setPixelColor (18, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 1) {pixels.setPixelColor (17, pixels. Color (0, 0, 0)); saizi.setPixelColor (18, saizi Rangi (0, 0, 0)); saizi.setPixelColor (19, saizi Rangi (0, 150, 0)); saizi.setPixelColor (20, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 2) {pixels.setPixelColor (19, pixels. Color (0, 0, 0)); saizi.setPixelColor (20, saizi Rangi (0, 0, 0)); saizi.setPixelColor (21, saizi Rangi (0, 150, 0)); saizi.setPixelColor (22, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 3) {pixels.setPixelColor (21, pixels. Color (0, 0, 0)); saizi.setPixelColor (22, saizi Rangi (0, 0, 0)); saizi.setPixelColor (23, saizi Rangi (0, 150, 0)); saizi.setPixelColor (0, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 4) {pixels.setPixelColor (23, pixels. Color (0, 0, 0)); saizi.setPixelColor (0, saizi Rangi (0, 0, 0)); saizi.setPixelColor (1, saizi Rangi (0, 150, 0)); saizi.setPixelColor (2, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 5) {pixels.setPixelColor (1, pixels. Color (0, 0, 0)); saizi.setPixelColor (2, saizi Rangi (0, 0, 0)); saizi.setPixelColor (3, saizi Rangi (0, 150, 0)); saizi.setPixelColor (4, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 6) {pixels.setPixelColor (3, pixels. Color (0, 0, 0)); saizi.setPixelColor (4, saizi Rangi (0, 0, 0)); saizi.setPixelColor (5, saizi Rangi (0, 150, 0)); saizi.setPixelColor (6, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 7) {pixels.setPixelColor (5, pixels. Color (0, 0, 0)); saizi.setPixelColor (6, saizi Rangi (0, 0, 0)); saizi.setPixelColor (7, saizi Rangi (0, 150, 0)); saizi.setPixelColor (8, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 8) {pixels.setPixelColor (7, pixels. Color (0, 0, 0)); saizi.setPixelColor (8, saizi Rangi (0, 0, 0)); saizi.setPixelColor (9, saizi Rangi (0, 150, 0)); saizi.setPixelColor (10, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 9) {pixels.setPixelColor (9, pixels. Color (0, 0, 0)); saizi.setPixelColor (10, saizi Rangi (0, 0, 0)); saizi.setPixelColor (11, saizi Rangi (0, 150, 0)); saizi.setPixelColor (12, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 10) {pixels.setPixelColor (11, pixels. Color (0, 0, 0)); saizi.setPixelColor (12, saizi Rangi (0, 0, 0)); saizi.setPixelColor (13, saizi Rangi (0, 150, 0)); saizi.setPixelColor (14, saizi Rangi (0, 150, 0)); saizi. onyesha (); } ikiwa (saa == 11) {pixels.setPixelColor (13, pixels. Color (0, 0, 0)); saizi.setPixelColor (14, saizi Rangi (0, 0, 0)); saizi.setPixelColor (15, saizi Rangi (0, 150, 0)); saizi.setPixelColor (16, saizi Rangi (0, 150, 0)); saizi. onyesha (); }} batili num0lcd1 () {lcd1.setCursor (0, 0); lcd1.andika (byte (2)); // kamili lcd1.setCursor (0, 1); lcd1.andika (byte (2)); lcd1.setCursor (1, 1); lcd1.andika (byte (0)); // nusu kulia lcd1.setCursor (1, 0); lcd1.andika (byte (1)); // nusu kushoto lcd1.setCursor (2, 1); lcd1.andika (byte (0)); lcd1.setCursor (2, 0); lcd1.andika (byte (1)); lcd1.setCursor (3, 1); lcd1.andika (byte (0)); lcd1.setCursor (3, 0); lcd1.andika (byte (1)); lcd1.setCursor (4, 1); lcd1.andika (byte (0)); lcd1.setCursor (4, 0); lcd1.andika (byte (1)); lcd1.setCursor (5, 1); lcd1.andika (byte (0)); lcd1.setCursor (5, 0); lcd1.andika (byte (1)); lcd1.setCursor (6, 1); lcd1.andika (byte (0)); lcd1.setCursor (6, 0); lcd1.andika (byte (1)); lcd1.setCursor (7, 1); lcd1.andika (byte (0)); lcd1.setCursor (7, 0); lcd1.andika (byte (1)); lcd1.setCursor (8, 1); lcd1.andika (byte (0)); lcd1.setCursor (8, 0); lcd1.andika (byte (1)); lcd1.setCursor (9, 1); lcd1.andika (byte (0)); lcd1.setCursor (9, 0); lcd1.andika (byte (1)); lcd1.setCursor (10, 1); lcd1.andika (byte (0)); lcd1.setCursor (10, 0); lcd1.andika (byte (1)); lcd1.setCursor (11, 1); lcd1.andika (byte (0)); lcd1.setCursor (11, 0); lcd1.andika (byte (1)); lcd1.setCursor (12, 1); lcd1.andika (byte (0)); lcd1.setCursor (12, 0); lcd1.andika (byte (1)); lcd1.setCursor (13, 1); lcd1.andika (byte (0)); lcd1.setCursor (13, 0); lcd1.andika (byte (1)); lcd1.setCursor (14, 1); lcd1.andika (byte (0)); lcd1.setCursor (14, 0); lcd1.andika (byte (1)); lcd1.setCursor (15, 1); lcd1.andika (byte (2)); lcd1.setCursor (15, 0); lcd1.andika (byte (2)); } batili num1lcd1 () {lcd1.setCursor (0, 1); lcd1.andika (byte (0)); lcd1.setCursor (1, 1); lcd1.andika (byte (0)); lcd1.setCursor (2, 1); lcd1.andika (byte (0)); lcd1.setCursor (3, 1); lcd1.andika (byte (0)); lcd1.setCursor (4, 1); lcd1.andika (byte (0)); lcd1.setCursor (5, 1); lcd1.andika (byte (0)); lcd1.setCursor (6, 1); lcd1.andika (byte (0)); lcd1.setCursor (7, 1); lcd1.andika (byte (0)); lcd1.setCursor (8, 1); lcd1.andika (byte (0)); lcd1.setCursor (9, 1); lcd1.andika (byte (0)); lcd1.setCursor (10, 1); lcd1.andika (byte (0)); lcd1.setCursor (11, 1); lcd1.andika (byte (0)); lcd1.setCursor (12, 1); lcd1.andika (byte (0)); lcd1.setCursor (13, 1); lcd1.andika (byte (0)); lcd1.setCursor (14, 1); lcd1.andika (byte (0)); lcd1.setCursor (15, 1); lcd1.andika (byte (0)); } batili num2lcd1 () {lcd1.setCursor (0, 0); lcd1.andika (byte (2)); // kamili lcd1.setCursor (0, 1); lcd1.andika (byte (2)); lcd1.setCursor (1, 0); lcd1.andika (byte (1)); // nusu kushoto lcd1.setCursor (2, 0); lcd1.andika (byte (1)); lcd1.setCursor (3, 0); lcd1.andika (byte (1)); lcd1.setCursor (4, 0); lcd1.andika (byte (1)); lcd1.setCursor (5, 0); lcd1.andika (byte (1)); lcd1.setCursor (6, 0); lcd1.andika (byte (1)); lcd1.setCursor (7, 1); lcd1.andika (byte (2)); lcd1.setCursor (7, 0); lcd1.andika (byte (2)); lcd1.setCursor (8, 1); lcd1.andika (byte (0)); lcd1.setCursor (9, 1); lcd1.andika (byte (0)); lcd1.setCursor (10, 1); lcd1.andika (byte (0)); lcd1.setCursor (11, 1); lcd1.andika (byte (0)); lcd1.setCursor (12, 1); lcd1.andika (byte (0)); lcd1.setCursor (13, 1); lcd1.andika (byte (0)); lcd1.setCursor (14, 1); lcd1.andika (byte (0)); lcd1.setCursor (15, 1); lcd1.andika (byte (2)); lcd1.setCursor (15, 0); lcd1.andika (byte (2)); } batili num3lcd1 () {lcd1.setCursor (0, 0); lcd1.andika (byte (2)); // kamili lcd1.setCursor (0, 1); lcd1.andika (byte (2)); lcd1.setCursor (1, 1); lcd1.andika (byte (0)); // nusu kulia lcd1.setCursor (2, 1); lcd1.andika (byte (0)); lcd1.setCursor (3, 1); lcd1.andika (byte (0)); lcd1.setCursor (4, 1); lcd1.andika (byte (0)); lcd1.setCursor (5, 1); lcd1.andika (byte (0)); lcd1.setCursor (6, 1); lcd1.andika (byte (0)); lcd1.setCursor (7, 1); lcd1.andika (byte (2)); lcd1.setCursor (7, 0); lcd1.andika (byte (2)); lcd1.setCursor (8, 1); lcd1.andika (byte (0)); lcd1.setCursor (9, 1); lcd1.andika (byte (0)); lcd1.setCursor (10, 1); lcd1.andika (byte (0)); lcd1.setCursor (11, 1); lcd1.andika (byte (0)); lcd1.setCursor (12, 1); lcd1.andika (byte (0)); lcd1.setCursor (13, 1); lcd1.andika (byte (0)); lcd1.setCursor (14, 1); lcd1.andika (byte (0)); lcd1.setCursor (15, 1); lcd1.andika (byte (2)); lcd1.setCursor (15, 0); lcd1.andika (byte (2)); } batili num4lcd1 () {lcd1.setCursor (0, 1); lcd1.andika (byte (0)); lcd1.setCursor (1, 1); lcd1.andika (byte (0)); lcd1.setCursor (2, 1); lcd1.andika (byte (0)); lcd1.setCursor (3, 1); lcd1.andika (byte (0)); lcd1.setCursor (4, 1); lcd1.andika (byte (0)); lcd1.setCursor (5, 1); lcd1.andika (byte (0)); lcd1.setCursor (6, 1); lcd1.andika (byte (0)); lcd1.setCursor (7, 1); lcd1.andika (byte (2)); lcd1.setCursor (7, 0); lcd1.andika (byte (2)); lcd1.setCursor (8, 0); lcd1.andika (byte (1)); lcd1.setCursor (8, 1); lcd1.andika (byte (0)); lcd1.setCursor (9, 0); lcd1.andika (byte (1)); lcd1.setCursor (9, 1); lcd1.andika (byte (0)); lcd1.setCursor (10, 0); lcd1.andika (byte (1)); lcd1.setCursor (10, 1); lcd1.andika (byte (0)); lcd1.setCursor (11, 0); lcd1.andika (byte (1)); lcd1.setCursor (11, 1); lcd1.andika (byte (0)); lcd1.setCursor (12, 0); lcd1.andika (byte (1)); lcd1.setCursor (12, 1); lcd1.andika (byte (0)); lcd1.setCursor (13, 0); lcd1.andika (byte (1)); lcd1.setCursor (13, 1); lcd1.andika (byte (0)); lcd1.setCursor (14, 0); lcd1.andika (byte (1)); lcd1.setCursor (14, 1); lcd1.andika (byte (0)); lcd1.setCursor (15, 0); lcd1.andika (byte (1)); lcd1.setCursor (15, 1); lcd1.andika (byte (0)); } batili num5lcd1 () {lcd1.setCursor (0, 0); lcd1.andika (byte (2)); // kamili lcd1.setCursor (0, 1); lcd1.andika (byte (2)); lcd1.setCursor (1, 1); lcd1.andika (byte (0)); // nusu kulia lcd1.setCursor (2, 1); lcd1.andika (byte (0)); lcd1.setCursor (3, 1); lcd1.andika (byte (0)); lcd1.setCursor (4, 1); lcd1.andika (byte (0)); lcd1.setCursor (5, 1); lcd1.andika (byte (0)); lcd1.setCursor (6, 1); lcd1.andika (byte (0)); lcd1.setCursor (7, 1); lcd1.andika (byte (2)); lcd1.setCursor (7, 0); lcd1.andika (byte (2)); lcd1.setCursor (8, 0); lcd1.andika (byte (1)); lcd1.setCursor (9, 0); lcd1.andika (byte (1)); lcd1.setCursor (10, 0); lcd1.andika (byte (1)); lcd1.setCursor (11, 0); lcd1.andika (byte (1)); lcd1.setCursor (12, 0); lcd1.andika (byte (1)); lcd1.setCursor (13, 0); lcd1.andika (byte (1)); lcd1.setCursor (14, 0); lcd1.andika (byte (1)); lcd1.setCursor (15, 1); lcd1.andika (byte (2)); lcd1.setCursor (15, 0); lcd1.andika (byte (2)); } batili num6lcd1 () {lcd1.setCursor (0, 0); lcd1.andika (byte (2)); // kamili lcd1.setCursor (0, 1); lcd1.andika (byte (2)); lcd1.setCursor (1, 1); lcd1.andika (byte (0)); // nusu kulia lcd1.setCursor (1, 0); lcd1.andika (byte (1)); // nusu kushoto lcd1.setCursor (2, 1); lcd1.andika (byte (0)); lcd1.setCursor (2, 0); lcd1.andika (byte (1)); lcd1.setCursor (3, 1); lcd1.andika (byte (0)); lcd1.setCursor (3, 0); lcd1.andika (byte (1)); lcd1.setCursor (4, 1); lcd1.andika (byte (0)); lcd1.setCursor (4, 0); lcd1.andika (byte (1)); lcd1.setCursor (5, 1); lcd1.andika (byte (0)); lcd1.setCursor (5, 0); lcd1.andika (byte (1)); lcd1.setCursor (6, 1); lcd1.andika (byte (0)); lcd1.setCursor (6, 0); lcd1.andika (byte (1)); lcd1.setCursor (7, 1); lcd1.andika (byte (2)); lcd1.setCursor (7, 0); lcd1.andika (byte (2)); lcd1.setCursor (8, 0); lcd1.andika (byte (1)); lcd1.setCursor (9, 0); lcd1.andika (byte (1)); lcd1.setCursor (10, 0); lcd1.andika (byte (1)); lcd1.setCursor (11, 0); lcd1.andika (byte (1)); lcd1.setCursor (12, 0); lcd1.andika (byte (1)); lcd1.setCursor (13, 0); lcd1.andika (byte (1)); lcd1.setCursor (14, 0); lcd1.andika (byte (1)); lcd1.setCursor (15, 1); lcd1.andika (byte (2)); lcd1.setCursor (15, 0); lcd1.andika (byte (2)); } batili num7lcd1 () {lcd1.setCursor (0, 1); lcd1.andika (byte (0)); lcd1.setCursor (1, 1); lcd1.andika (byte (0)); lcd1.setCursor (2, 1); lcd1.andika (byte (0)); lcd1.setCursor (3, 1); lcd1.andika (byte (0)); lcd1.setCursor (4, 1); lcd1.andika (byte (0)); lcd1.setCursor (5, 1); lcd1.andika (byte (0)); lcd1.setCursor (6, 1); lcd1.andika (byte (0)); lcd1.setCursor (7, 1); lcd1.andika (byte (0)); lcd1.setCursor (8, 1); lcd1.andika (byte (0)); lcd1.setCursor (9, 1); lcd1.andika (byte (0)); lcd1.setCursor (10,1); lcd1.andika (byte (0)); lcd1.setCursor (11, 1); lcd1.andika (byte (0)); lcd1.setCursor (12, 1); lcd1.andika (byte (0)); lcd1.setCursor (13, 1); lcd1.andika (byte (0)); lcd1.setCursor (14, 1); lcd1.andika (byte (0)); lcd1.setCursor (15, 1); lcd1.andika (byte (2)); lcd1.setCursor (15, 0); lcd1.andika (byte (2)); } batili num8lcd1 () {lcd1.setCursor (0, 0); lcd1.andika (byte (2)); // kamili lcd1.setCursor (0, 1); lcd1.andika (byte (2)); lcd1.setCursor (1, 1); lcd1.andika (byte (0)); // nusu kulia lcd1.setCursor (1, 0); lcd1.andika (byte (1)); // nusu kushoto lcd1.setCursor (2, 1); lcd1.andika (byte (0)); lcd1.setCursor (2, 0); lcd1.andika (byte (1)); lcd1.setCursor (3, 1); lcd1.andika (byte (0)); lcd1.setCursor (3, 0); lcd1.andika (byte (1)); lcd1.setCursor (4, 1); lcd1.andika (byte (0)); lcd1.setCursor (4, 0); lcd1.andika (byte (1)); lcd1.setCursor (5, 1); lcd1.andika (byte (0)); lcd1.setCursor (5, 0); lcd1.andika (byte (1)); lcd1.setCursor (6, 1); lcd1.andika (byte (0)); lcd1.setCursor (6, 0); lcd1.andika (byte (1)); lcd1.setCursor (7, 1); lcd1.andika (byte (2)); lcd1.setCursor (7, 0); lcd1.andika (byte (2)); lcd1.setCursor (8, 1); lcd1.andika (byte (0)); lcd1.setCursor (8, 0); lcd1.andika (byte (1)); lcd1.setCursor (9, 1); lcd1.andika (byte (0)); lcd1.setCursor (9, 0); lcd1.andika (byte (1)); lcd1.setCursor (10, 1); lcd1.andika (byte (0)); lcd1.setCursor (10, 0); lcd1.andika (byte (1)); lcd1.setCursor (11, 1); lcd1.andika (byte (0)); lcd1.setCursor (11, 0); lcd1.andika (byte (1)); lcd1.setCursor (12, 1); lcd1.andika (byte (0)); lcd1.setCursor (12, 0); lcd1.andika (byte (1)); lcd1.setCursor (13, 1); lcd1.andika (byte (0)); lcd1.setCursor (13, 0); lcd1.andika (byte (1)); lcd1.setCursor (14, 1); lcd1.andika (byte (0)); lcd1.setCursor (14, 0); lcd1.andika (byte (1)); lcd1.setCursor (15, 1); lcd1.andika (byte (2)); lcd1.setCursor (15, 0); lcd1.andika (byte (2)); } batili num9lcd1 () {lcd1.setCursor (0, 0); lcd1.andika (byte (2)); lcd1.setCursor (0, 1); lcd1.andika (byte (2)); lcd1.setCursor (1, 1); lcd1.andika (byte (0)); lcd1.setCursor (2, 1); lcd1.andika (byte (0)); lcd1.setCursor (3, 1); lcd1.andika (byte (0)); lcd1.setCursor (4, 1); lcd1.andika (byte (0)); lcd1.setCursor (5, 1); lcd1.andika (byte (0)); lcd1.setCursor (6, 1); lcd1.andika (byte (0)); lcd1.setCursor (7, 1); lcd1.andika (byte (2)); lcd1.setCursor (7, 0); lcd1.andika (byte (2)); lcd1.setCursor (8, 0); lcd1.andika (byte (1)); lcd1.setCursor (8, 1); lcd1.andika (byte (0)); lcd1.setCursor (9, 0); lcd1.andika (byte (1)); lcd1.setCursor (9, 1); lcd1.andika (byte (0)); lcd1.setCursor (10, 0); lcd1.andika (byte (1)); lcd1.setCursor (10, 1); lcd1.andika (byte (0)); lcd1.setCursor (11, 0); lcd1.andika (byte (1)); lcd1.setCursor (11, 1); lcd1.andika (byte (0)); lcd1.setCursor (12, 0); lcd1.andika (byte (1)); lcd1.setCursor (12, 1); lcd1.andika (byte (0)); lcd1.setCursor (13, 0); lcd1.andika (byte (1)); lcd1.setCursor (13, 1); lcd1.andika (byte (0)); lcd1.setCursor (14, 0); lcd1.andika (byte (1)); lcd1.setCursor (14, 1); lcd1.andika (byte (0)); lcd1.setCursor (15, 0); lcd1.andika (byte (2)); lcd1.setCursor (15, 1); lcd1.andika (byte (2)); } batili num0lcd2 () {lcd2.setCursor (0, 0); lcd2. andika (byte (2)); // kamili lcd2.setCursor (0, 1); lcd2. andika (byte (2)); lcd2.setCursor (1, 1); lcd2.andika (byte (0)); // nusu kulia lcd2.setCursor (1, 0); lcd2.andika (byte (1)); // nusu kushoto lcd2.setCursor (2, 1); lcd2.andika (byte (0)); lcd2.setCursor (2, 0); lcd2.andika (byte (1)); lcd2.setCursor (3, 1); lcd2.andika (byte (0)); lcd2.setCursor (3, 0); lcd2.andika (byte (1)); lcd2.setCursor (4, 1); lcd2.andika (byte (0)); lcd2.setCursor (4, 0); lcd2.andika (byte (1)); lcd2.setCursor (5, 1); lcd2.andika (byte (0)); lcd2.setCursor (5, 0); lcd2.andika (byte (1)); lcd2.setCursor (6, 1); lcd2.andika (byte (0)); lcd2.setCursor (6, 0); lcd2.andika (byte (1)); lcd2.setCursor (7, 1); lcd2.andika (byte (0)); lcd2.setCursor (7, 0); lcd2.andika (byte (1)); lcd2.setCursor (8, 1); lcd2.andika (byte (0)); lcd2.setCursor (8, 0); lcd2.andika (byte (1)); lcd2.setCursor (9, 1); lcd2.andika (byte (0)); lcd2.setCursor (9, 0); lcd2.andika (byte (1)); lcd2.setCursor (10, 1); lcd2.andika (byte (0)); lcd2.setCursor (10, 0); lcd2.andika (byte (1)); lcd2.setCursor (11, 1); lcd2.andika (byte (0)); lcd2.setCursor (11, 0); lcd2.andika (byte (1)); lcd2.setCursor (12, 1); lcd2.andika (byte (0)); lcd2.setCursor (12, 0); lcd2.andika (byte (1)); lcd2.setCursor (13, 1); lcd2.andika (byte (0)); lcd2.setCursor (13, 0); lcd2.andika (byte (1)); lcd2.setCursor (14, 1); lcd2.andika (byte (0)); lcd2.setCursor (14, 0); lcd2.andika (byte (1)); lcd2.setCursor (15, 1); lcd2. andika (byte (2)); lcd2.setCursor (15, 0); lcd2. andika (byte (2)); } batili num1lcd2 () {lcd2.setCursor (0, 1); lcd2.andika (byte (0)); lcd2.setCursor (1, 1); lcd2.andika (byte (0)); lcd2.setCursor (2, 1); lcd2.andika (byte (0)); lcd2.setCursor (3, 1); lcd2.andika (byte (0)); lcd2.setCursor (4, 1); lcd2.andika (byte (0)); lcd2.setCursor (5, 1); lcd2.andika (byte (0)); lcd2.setCursor (6, 1); lcd2.andika (byte (0)); lcd2.setCursor (7, 1); lcd2.andika (byte (0)); lcd2.setCursor (8, 1); lcd2.andika (byte (0)); lcd2.setCursor (9, 1); lcd2.andika (byte (0)); lcd2.setCursor (10, 1); lcd2.andika (byte (0)); lcd2.setCursor (11, 1); lcd2.andika (byte (0)); lcd2.setCursor (12, 1); lcd2.andika (byte (0)); lcd2.setCursor (13, 1); lcd2.andika (byte (0)); lcd2.setCursor (14, 1); lcd2.andika (byte (0)); lcd2.setCursor (15, 1); lcd2.andika (byte (0)); } batili num2lcd2 () {lcd2.setCursor (0, 0); lcd2. andika (byte (2)); // kamili lcd2.setCursor (0, 1); lcd2. andika (byte (2)); lcd2.setCursor (1, 0); lcd2.andika (byte (1)); // nusu kushoto lcd2.setCursor (2, 0); lcd2.andika (byte (1)); lcd2.setCursor (3, 0); lcd2.andika (byte (1)); lcd2.setCursor (4, 0); lcd2.andika (byte (1)); lcd2.setCursor (5, 0); lcd2.andika (byte (1)); lcd2.setCursor (6, 0); lcd2.andika (byte (1)); lcd2.setCursor (7, 1); lcd2. andika (byte (2)); lcd2.setCursor (7, 0); lcd2. andika (byte (2)); lcd2.setCursor (8, 1); lcd2.andika (byte (0)); lcd2.setCursor (9, 1); lcd2.andika (byte (0)); lcd2.setCursor (10, 1); lcd2.andika (byte (0)); lcd2.setCursor (11, 1); lcd2.andika (byte (0)); lcd2.setCursor (12, 1); lcd2.andika (byte (0)); lcd2.setCursor (13, 1); lcd2.andika (byte (0)); lcd2.setCursor (14, 1); lcd2.andika (byte (0)); lcd2.setCursor (15, 1); lcd2. andika (byte (2)); lcd2.setCursor (15, 0); lcd2. andika (byte (2)); } batili num3lcd2 () {lcd2.setCursor (0, 0); lcd2. andika (byte (2)); // kamili lcd2.setCursor (0, 1); lcd2. andika (byte (2)); lcd2.setCursor (1, 1); lcd2.andika (byte (0)); // nusu kulia lcd2.setCursor (2, 1); lcd2.andika (byte (0)); lcd2.setCursor (3, 1); lcd2.andika (byte (0)); lcd2.setCursor (4, 1); lcd2.andika (byte (0)); lcd2.setCursor (5, 1); lcd2.andika (byte (0)); lcd2.setCursor (6, 1); lcd2.andika (byte (0)); lcd2.setCursor (7, 1); lcd2. andika (byte (2)); lcd2.setCursor (7, 0); lcd2. andika (byte (2)); lcd2.setCursor (8, 1); lcd2.andika (byte (0)); lcd2.setCursor (9, 1); lcd2.andika (byte (0)); lcd2.setCursor (10, 1); lcd2.andika (byte (0)); lcd2.setCursor (11, 1); lcd2.andika (byte (0)); lcd2.setCursor (12, 1); lcd2.andika (byte (0)); lcd2.setCursor (13, 1); lcd2.andika (byte (0)); lcd2.setCursor (14, 1); lcd2.andika (byte (0)); lcd2.setCursor (15, 1); lcd2. andika (byte (2)); lcd2.setCursor (15, 0); lcd2. andika (byte (2)); } batili num4lcd2 () {lcd2.setCursor (0, 1); lcd2.andika (byte (0)); lcd2.setCursor (1, 1); lcd2.andika (byte (0)); lcd2.setCursor (2, 1); lcd2.andika (byte (0)); lcd2.setCursor (3, 1); lcd2.andika (byte (0)); lcd2.setCursor (4, 1); lcd2.andika (byte (0)); lcd2.setCursor (5, 1); lcd2.andika (byte (0)); lcd2.setCursor (6, 1); lcd2.andika (byte (0)); lcd2.setCursor (7, 1); lcd2. andika (byte (2)); lcd2.setCursor (7, 0); lcd2. andika (byte (2)); lcd2.setCursor (8, 0); lcd2.andika (byte (1)); lcd2.setCursor (8, 1); lcd2.andika (byte (0)); lcd2.setCursor (9, 0); lcd2.andika (byte (1)); lcd2.setCursor (9, 1); lcd2.andika (byte (0)); lcd2.setCursor (10, 0); lcd2.andika (byte (1)); lcd2.setCursor (10, 1); lcd2.andika (byte (0)); lcd2.setCursor (11, 0); lcd2.andika (byte (1)); lcd2.setCursor (11, 1); lcd2.andika (byte (0)); lcd2.setCursor (12, 0); lcd2.andika (byte (1)); lcd2.setCursor (12, 1); lcd2.andika (byte (0)); lcd2.setCursor (13, 0); lcd2.andika (byte (1)); lcd2.setCursor (13, 1); lcd2.andika (byte (0)); lcd2.setCursor (14, 0); lcd2.andika (byte (1)); lcd2.setCursor (14, 1); lcd2.andika (byte (0)); lcd2.setCursor (15, 0); lcd2.andika (byte (1)); lcd2.setCursor (15, 1); lcd2.andika (byte (0)); } batili num5lcd2 () {lcd2.setCursor (0, 0); lcd2. andika (byte (2)); // kamili lcd2.setCursor (0, 1); lcd2. andika (byte (2)); lcd2.setCursor (1, 1); lcd2.andika (byte (0)); // nusu kulia lcd2.setCursor (2, 1); lcd2.andika (byte (0)); lcd2.setCursor (3, 1); lcd2.andika (byte (0)); lcd2.setCursor (4, 1); lcd2.andika (byte (0)); lcd2.setCursor (5, 1); lcd2.andika (byte (0)); lcd2.setCursor (6, 1); lcd2.andika (byte (0)); lcd2.setCursor (7, 1); lcd2. andika (byte (2)); lcd2.setCursor (7, 0); lcd2. andika (byte (2)); lcd2.setCursor (8, 0); lcd2.andika (byte (1)); lcd2.setCursor (9, 0); lcd2.andika (byte (1)); lcd2.setCursor (10, 0); lcd2.andika (byte (1)); lcd2.setCursor (11, 0); lcd2.andika (byte (1)); lcd2.setCursor (12, 0); lcd2.andika (byte (1)); lcd2.setCursor (13, 0); lcd2.andika (byte (1)); lcd2.setCursor (14, 0); lcd2.andika (byte (1)); lcd2.setCursor (15, 1); lcd2. andika (byte (2)); lcd2.setCursor (15, 0); lcd2. andika (byte (2)); }

Hatua ya 4: Kufanya kazi na Kumaliza Kugusa

Kufanya kazi na Kumaliza Kugusa
Kufanya kazi na Kumaliza Kugusa

Unganisha arduino yako kwenye kompyuta na uiruhusu ifanye kazi. Natumai saa yako itafanya kazi. Inafanya kazi lakini inaonekana kuwa mbaya sana. Vipinga vingi na waya sio nzuri. Kwa hivyo, Weka vifaa vyote kwenye sanduku na ukate shimo moja kwa rangi ya LCD kwenye sanduku na uangalie Saa ya Dijiti.

Sijaiunda kwa kweli lakini nimebuni katika MIWANGO YA AUTODESK. Nitaiunda kwa kweli na kuchapisha video ya kufanya kazi. Mimi sio mzungumzaji asili. Ikiwa umefanya kosa lolote nijulishe katika ujumbe wa kibinafsi. Na samahani juu ya kosa hilo. Nimechukua wazo kutoka kwa "saa ya Dan ya arduino". Kukutana na mwingine anayefundishwa.

Ilipendekeza: