Cov txheej txheem:

Txaus ntshai Arduino Moos: 4 Kauj Ruam
Txaus ntshai Arduino Moos: 4 Kauj Ruam

Video: Txaus ntshai Arduino Moos: 4 Kauj Ruam

Video: Txaus ntshai Arduino Moos: 4 Kauj Ruam
Video: lam mloog zaj nkj no nb wb sib hlub g tau tsim nyog 2024, Kaum ib hlis
Anonim
Zoo heev Arduino Clock
Zoo heev Arduino Clock

Peb tau pom ntau txoj haujlwm nrog arduino. Tab sis Tam sim no, Kuv yuav qhia koj yuav tsim lub moos nrog arduino thiab 2 LCDs zaub. Nws yog qhov yooj yim tab sis lom zem heev. Txhua tus tuaj yeem sim nws. Yog li, Npaj Npaj !!!

Kauj Ruam 1: Sau Cov Khoom

Sau Cov Khoom
Sau Cov Khoom

Yog tias koj xav ua nws koj yuav xav tau qee yam khoom. Cov khoom no koj tuaj yeem yooj yim yuav los ntawm koj lub khw muag khoom ze dua.

Koj yuav xav tau dab tsi:

  1. Arduino UNO R3Neo
  2. Pixel Nplhaib 24
  3. Pawg Mov Ci
  4. LCD 16 x 2
  5. 100 Ohm Resistor (2)
  6. 120 Ohm Resistor (2)
  7. 10 K Ohm Resistor (2)
  8. Laub Khawm

Daim duab ntawm cov khoom no tau qhia saum toj no. Koj tuaj yeem siv txhua lub ncuav mov ci. Koj xav tau 6 Resistors lawv qhov txiaj ntsig tau sau saum toj no hauv cov npe. Koj tseem yuav xav tau cov xov hlau txuas. Cov LCDs no koj yuav tso saib. Txoj hauv kev thaiv kab hluav taws xob koj tuaj yeem pom hauv kauj ruam tom ntej.

Kauj Ruam 2: Txuas Txhua Yam Khoom

Txuas Txhua Yam
Txuas Txhua Yam
Txuas Txhua Yam
Txuas Txhua Yam
Txuas Txhua Yam
Txuas Txhua Yam

Yam uas koj xav tau. Kuv tau qhia hauv cov kauj ruam dhau los yog li coj koj lub rooj noj mov lub rooj xaim hluav taws xob nrog kuv.

Cov kauj ruam txuas:

  1. Muab 100 Ohm resistor rau sab saud ntawm lub rooj noj mov ntawm Kab Tsis Zoo.
  2. Tso 120 Ohm resistor rau sab saud ntawm lub rooj noj mov ntawm Kab Zoo.
  3. Qhov Chaw Thawb Khawm (Daim duab qhia pom saum toj no)
  4. Tso 10 K Ohm resistor hauv qab Push Button
  5. Txuas 100 Ohm resistors (ob qho tib si) rau LCD zaub nrog 'LED Cathode'
  6. Txuas 120 Ohm resistors (ob qho tib si) rau LCD zaub nrog 'LED Anode'
  7. Txuas qhov tsis zoo ntawm lub rooj noj mov ntawm kab ntawv sab saud mus rau 'Nyeem/Sau'.
  8. Txuas qhov tsis zoo ntawm lub khob cij los ntawm kab sab saud mus rau 'Zoo ib yam'.
  9. Txuas Txuas Lub davhlau ya nyob twg ntawm lub rooj noj mov ntawm kab qis mus rau 'Vcc'.
  10. Txuas lwm qhov tsis zoo ntawm lub khob cij los ntawm kab sab saud ntawm lub rooj noj mov rau 'GND'.
  11. Ua tib yam ntawm 2nd LCD txuas txhua yam zoo li yav dhau los.
  12. Txuas cov neeg tawm tsam ntxiv rau cov kab tsis zoo ntawm lub rooj noj mov.
  13. Txuas cov nyees khawm mus rau kab zoo.
  14. Txuas Qhov Zoo & Qhov Tsis Zoo ntawm lub khob cij rau "Neo Pixel Ring 24".

Tam sim no, koj tau txuas tag nrho cov khoom siv. Tab sis arduino tseem tshuav. Daim duab ntawm qhov no qhia saum toj no.

Cov Hluav Taws Xob Cov kauj ruam ntawm arduino rau txhua ntu:

  1. Txuas cov laub khawm (Terminal22) rau A0 & A1 ntawm arduino.
  2. Txuas GND mus rau qhov tsis zoo ntawm lub rooj noj mov.
  3. Txuas 5V rau lub davhlau ya nyob twg zoo ntawm lub rooj noj mov.
  4. Txuas D13 ntawm arduino rau "Lub zog ntawm" "Neo Pixel Ring 24"
  5. Txuas D7 ntawm arduino rau "Sau Npe Xaiv" ntawm LCD1.
  6. Txuas D8 ntawm arduino mus rau "Enable" ntawm LCD 2.
  7. Txuas D9 ntawm arduino rau "DB4" ntawm LCD 2.
  8. Txuas D10 ntawm arduino rau "DB5" ntawm LCD 2.
  9. Txuas D11 ntawm arduino rau "DB6" ntawm LCD 2.
  10. Txuas D12 ntawm arduino mus rau "DB7" ntawm LCD 2.
  11. Txuas D1 ntawm arduino rau "Sau Npe Xaiv" ntawm LCD 1.
  12. Txuas D2 ntawm arduino mus rau "Enable" ntawm LCD 1.
  13. Txuas D3 ntawm arduino rau "DB4" ntawm LCD 2.
  14. Txuas D4 ntawm arduino rau "DB5" ntawm LCD 2.
  15. Txuas D5 ntawm arduino rau "DB6" ntawm LCD 2.
  16. Txuas D6 ntawm arduino rau "DB7" ntawm LCD 2.

Daim duab ntawm txhua qhov khoom siv tom qab thaiv tau qhia saum toj no.

Kauj ruam 3: Programming

Programming
Programming

Koj tau ua kom lub Circuit tiav. Tab sis nws tsis ua haujlwm txog thaum koj yuav program rau qhov haujlwm no. Yog tias koj yog tus kws tshaj lij thiab koj muaj kev paub dhau los koj yuav program nws yooj yim. Kuv vam tias koj yuav paub cov software uas tau siv rau lub hom phiaj no. Program nws raws li yog tias koj xav tsim kev hloov pauv hauv lub cajmeem koj tuaj yeem tab sis nco ntsoov nws yuav tsum raug. Txwv tsis pub nws yuav tsis ua haujlwm. Yog tias koj tsis tuaj yeem ua haujlwm nws koj tuaj yeem luam tawm ntawm no lossis nqa nws los ntawm lwm qhov chaw.

#suav nrog

// Sab laug LCD LiquidCrystal lcd1 (7, 8, 9, 10, 11, 12); // Txoj Cai LCD LiquidCrystal lcd2 (1, 2, 3, 4, 5, 6); #suav nrog #ifdef _AVR_ #suav nrog #endif/ / NeoPixel Ring 24 #define PIN 13 #txhais NUMPIXELS 24Adafruit_NeoPixel pixels = Adafruit_NeoPixel (NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int delayval = 50; ntev yav dhau losMillis = 0; ncua sij hawm ntev = 950; int vib nas this = 0; int teev = 0; int teevButtonState = 0; int minButtonState = 0; byte puv [8] = {B11111, 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,}; // teeb tsa niaj hnub khiav ib zaug thaum koj nias rov pib dua: tsis muaj teeb tsa () {// teeb tsa khawm pins pinMode (14, INPUT); // teem feeb pinMode (15, INPUT); // teev teev // ua cov cim kev cai lcd1.createChar (0, ib nrab R); lcd1.createChar (1, ib nrab L); lcd1.createChar (2, puv); lcd2.createChar (0, ib nrab R); lcd2.createChar (1, ib nrab L); lcd2.createChar (2, puv); // teeb tsa LCD1 loj lcd1.begin (16, 2); // teeb LCD2 loj lcd2.begin (16, 2); // pixel ntiv nplhaib pixels.begin (); // pib teeb lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); //pixels.setPixelColor(17, pixels. Color (0, 150, 0)); //pixels.setPixelColor(18, pixels. Color (0, 150, 0)); pixels.show (); } // lub voj kev niaj hnub sau ntau thiab ntau dua ib si: void loop () {hourButtonState = digitalRead (15); minButtonState = digitalRead (14); yog (hourButtonState == HIGH) {teev ++; runClock (); } yog (minButtonState == HIGH) {vib nas this ++; runClock (); } unsigned ntev currentMillis = millis (); yog (currentMillis - yav dhau losMillis> ncua) {yog (vib nas this == 59) {vib nas this = 0; yog (teev == 11) {teev = 0; } lwm {teev ++; }} lwm {vib nas this ++; } yav dhau losMillis = currentMillis; runClock (); } ncua (10); } tsis muaj dab tsi runClock () {yog (vib nas this == 0) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); } yog (vib nas this == 1 || vib nas this == 11 || vib nas this == 21 || vib nas this == 31 || vib nas this == 41 || vib nas this == 51) {lcd1.clear (); num1lcd1 (); } yog (vib nas this == 2 || vib nas this == 12 || vib nas this == 22 || vib nas this == 32 || vib nas this == 42 || vib nas this == 52) {lcd1.clear (); num2lcd1 (); } yog (vib nas this == 3 || vib nas this == 13 || vib nas this == 23 || vib nas this == 33 || vib nas this == 43 || vib nas this == 53) {lcd1.clear (); num3lcd1 (); } yog (vib nas this == 4 || vib nas this == 14 || vib nas this == 24 || vib nas this == 34 || vib nas this == 44 || vib nas this == 54) {lcd1.clear (); num4lcd1 (); } yog (vib nas this == 5 || vib nas this == 15 || vib nas this == 25 || vib nas this == 35 || vib nas this == 45 || vib nas this == 55) {lcd1.clear (); num5lcd1 (); } yog (vib nas this == 6 || vib nas this == 16 || vib nas this == 26 || vib nas this == 36 || vib nas this == 46 || vib nas this == 56) {lcd1.clear (); num6lcd1 (); } yog (vib nas this == 7 || vib nas this == 17 || vib nas this == 27 || vib nas this == 37 || vib nas this == 47 || vib nas this == 57) {lcd1.clear (); num7lcd1 (); } yog (vib nas this == 8 || vib nas this == 18 || vib nas this == 28 || vib nas this == 38 || vib nas this == 48 || vib nas this == 58) {lcd1.clear (); num8lcd1 (); } yog (vib nas this == 9 || vib nas this == 19 || vib nas this == 29 || vib nas this == 39 || vib nas this == 49 || vib nas this == 59) {lcd1.clear (); num9lcd1 (); } yog (vib nas this == 10) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num1lcd2 (); } yog (vib nas this == 20) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num2lcd2 (); } yog (vib nas this == 30) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num3lcd2 (); } yog (vib nas this == 40) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num4lcd2 (); } yog (vib nas this == 50) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num5lcd2 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); } yog (teev == 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 (); }} tsis muaj nuj nqis num0lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // puv lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // ib nrab txoj cai lcd1.setCursor (1, 0); lcd1.write (byte (1)); // ib nrab sab laug 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)); } tsis muaj nuj nqis 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)); } tsis muaj nuj nqis num2lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // puv lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1,0); lcd1.write (byte (1)); // ib nrab sab laug 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)); } tsis muaj nuj nqis num3lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // puv lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // ib nrab txoj cai 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)); } tsis muaj nuj nqis 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)); } tsis muaj nuj nqis num5lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // puv lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // ib nrab txoj cai 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)); } tsis muaj nuj nqis num6lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // puv lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // ib nrab txoj cai lcd1.setCursor (1, 0); lcd1.write (byte (1)); // ib nrab sab laug 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)); } tsis muaj nuj nqis 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)); } tsis muaj nuj nqis num8lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // puv lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // ib nrab txoj cai lcd1.setCursor (1, 0); lcd1.write (byte (1)); // ib nrab sab laug 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)); } tsis muaj nuj nqis 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)); } tsis muaj nuj nqis num0lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // puv lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); // ib nrab txoj cai lcd2.setCursor (1, 0); lcd2.write (byte (1)); // ib nrab sab laug 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)); } tsis muaj nuj nqis 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)); } tsis muaj nuj nqis num2lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // puv lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1,0); lcd2.write (byte (1)); // ib nrab sab laug 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)); } tsis muaj nuj nqis num3lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // puv lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); // ib nrab txoj cai 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)); } tsis muaj nuj nqis 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)); } tsis muaj nuj nqis num5lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // puv lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); // ib nrab txoj cai 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)); }

Kauj Ruam 4: Ua Haujlwm thiab Ua tiav Kov

Ua haujlwm thiab Ua tiav Kov
Ua haujlwm thiab Ua tiav Kov

Txuas koj lub arduino rau lub computer thiab cia nws ua haujlwm. Kuv vam tias koj lub moos yuav ua haujlwm. Nws ua haujlwm tab sis nws zoo li ntxhov siab. Yog li ntau tus resistor & xov hlau nws tsis zoo. Yog li, Muab txhua yam khoom siv rau hauv lub thawv thiab txiav ib lub qhov rau LCD pleev xim lub thawv thiab saib zoo ntawm Digital Clock.

Kuv tsis tau tsim nws tiag tab sis kuv tau tsim nws hauv AUTODESK CIRCUITS. Kuv yuav tsum tsim nws tiag tiag thiab tshaj tawm cov vis dis aus ntawm kev ua haujlwm. Kuv tsis yog ib tus neeg hais lus. Yog tias tau ua yuam kev qhia rau kuv hauv cov lus ntiag tug. Thiab kuv thov txim txog qhov yuam kev ntawd. Kuv kuj tau coj qee lub tswv yim los ntawm "Dan's arduino Clock". Ntsib koj nrog lwm qhov kev qhia.

Pom zoo: