Talaan ng mga Nilalaman:

Kahanga-hanga Arduino Clock: 4 Hakbang
Kahanga-hanga Arduino Clock: 4 Hakbang

Video: Kahanga-hanga Arduino Clock: 4 Hakbang

Video: Kahanga-hanga Arduino Clock: 4 Hakbang
Video: Master a Tinkercad LCD in Minutes! Fun, Fast and Full of Sweet Skills! 2024, Hulyo
Anonim
Galing ng Arduino Clock
Galing ng Arduino Clock

Nakita namin ang maraming mga proyekto kasama ang arduino. Ngunit Ngayon, ipapakita ko sa iyo kung paano bumuo ng isang relo gamit ang arduino at 2 LCDs display. Ito ay simple ngunit lubos na masaya. Ang bawat isa ay maaaring subukan ito. Kaya, Maghanda !!!

Hakbang 1: Pagkolekta ng Mga Materyal

Mga Materyal sa Pagkolekta
Mga Materyal sa Pagkolekta

Kung nais mong gawin ito kakailanganin mo ng ilang mga item. Ang mga item na ito ay maaari mong madaling bilhin mula sa iyong malapit na tingiang tindahan.

Ano ang kakailanganin mo:

  1. Arduino UNO R3Neo
  2. Pixel Ring 24
  3. Lupon ng Tinapay
  4. LCD 16x2
  5. 100 Ohm Resistor (2)
  6. 120 Ohm Resistor (2)
  7. 10 K Ohm Resistor (2)
  8. Push Button

Ang diagram ng mga bagay na ito ay ipinapakita sa itaas. Maaari mong gamitin ang anumang Bread board. Kailangan mo ng 6 Mga Resistor ang kanilang mga halaga ay nakasulat sa itaas sa listahan. Kakailanganin mo rin ang mga wire para sa koneksyon. Ang mga LCD na ito ay ipapakita mo. Ang pamamaraan ng mga circuit ng kable na maaari mong makita sa susunod na hakbang.

Hakbang 2: Mga Kable sa Lahat ng Mga Bahagi

Mga Kable sa Lahat ng Mga Sangkap
Mga Kable sa Lahat ng Mga Sangkap
Mga Kable sa Lahat ng Mga Bahagi
Mga Kable sa Lahat ng Mga Bahagi
Mga Kable sa Lahat ng Mga Bahagi
Mga Kable sa Lahat ng Mga Bahagi

Ang mga bagay na kakailanganin mo. Ipinakita ko sa nakaraang hakbang kaya't kunin mo ang iyong circuit board ng wire board kasama ko.

Mga Hakbang sa Mga Kable:

  1. Ilagay ang 100 Ohm risistor sa itaas na bahagi ng board ng tinapay sa Negatibong Linya.
  2. Ilagay ang 120 Ohm risistor sa itaas na bahagi ng board ng tinapay sa Positive Line.
  3. Place Push Button (Ang diagram ay ipinakita sa itaas)
  4. Ilagay ang 10 K Ohm risistor sa ilalim ng Push Button
  5. Ikonekta ang 100 Ohm resistors (pareho) sa LCD display na may 'LED Cathode'
  6. Ikonekta ang 120 Ohm resistors (pareho) sa LCD display na may 'LED Anode'
  7. Ikonekta ang negatibong terminal ng board ng tinapay mula sa itaas na linya sa 'Basahin / Isulat'.
  8. Ikonekta ang negatibong terminal ng board ng tinapay mula sa itaas na linya patungo sa 'Kontras'.
  9. Ikonekta ang Positibong terminal ng board ng tinapay mula sa mas mababang linya patungo sa 'Vcc'.
  10. Ikonekta ang isa pang negatibong terminal ng board ng tinapay mula sa itaas na linya ng board board hanggang sa 'GND ".
  11. Gawin ang parehong sa ika-2 LCD ikonekta ang lahat ng mga tulad ng nakaraang.
  12. Ikonekta ang natitirang resistors sa negatibong linya ng board ng tinapay.
  13. Ikonekta ang mga pindutan ng itulak sa positibong linya.
  14. Ikonekta ang Positibo at Negatibong terminal ng board ng tinapay sa "Neo Pixel Ring 24".

Ngayon, nakakonekta mo ang lahat ng mga bahagi. Ngunit ang arduino ay natitira pa rin. Ang diagram ng ito ay ipinakita sa itaas.

Mga hakbang sa kable ng arduino sa lahat ng mga bahagi:

  1. Ikonekta ang mga pindutan ng itulak (Terminal22) sa A0 & A1 ng arduino.
  2. Ikonekta ang GND sa negatibong terminal ng bread board.
  3. Ikonekta ang 5V sa positibong terminal ng board ng tinapay.
  4. Ikonekta ang D13 ng arduino sa "Lakas ng" "Neo Pixel Ring 24"
  5. Ikonekta ang D7 ng arduino sa "Rehistro na Piliin" ng LCD1.
  6. Ikonekta ang D8 ng arduino sa "Paganahin" ng LCD 2.
  7. Ikonekta ang D9 ng arduino sa "DB4" ng LCD 2.
  8. Ikonekta ang D10 ng arduino sa "DB5" ng LCD 2.
  9. Ikonekta ang D11 ng arduino sa "DB6" ng LCD 2.
  10. Ikonekta ang D12 ng arduino sa "DB7" ng LCD 2.
  11. Ikonekta ang D1 ng arduino sa "Rehistro na Piliin" ng LCD 1.
  12. Ikonekta ang D2 ng arduino sa "Paganahin" ng LCD 1.
  13. Ikonekta ang D3 ng arduino sa "DB4" ng LCD 2.
  14. Ikonekta ang D4 ng arduino sa "DB5" ng LCD 2.
  15. Ikonekta ang D5 ng arduino sa "DB6" ng LCD 2.
  16. Ikonekta ang D6 ng arduino sa "DB7" ng LCD 2.

Ang diagram ng lahat ng mga bahagi pagkatapos ng mga kable ay ipinakita sa itaas.

Hakbang 3: Programming

Programming
Programming

Natapos mo na ang circuit. Ngunit hindi ito gagana hanggang sa mai-program mo ito para sa proyektong ito. Kung ikaw ay dalubhasa at mayroon kang karanasan madali mong mai-program. Inaasahan kong malalaman mo ang software na ginagamit para sa hangaring ito. Programa ito nang naaayon kung nais mong lumikha ng pagbabago sa pagprograma maaari mong tandaan na dapat itong wasto. Kung hindi man ay hindi ito gagana. Kung hindi mo ma-program ito maaari kang kopyahin mula dito o kunin ito mula sa ibang mapagkukunan.

# isama

// Left LCD LiquidCrystal lcd1 (7, 8, 9, 10, 11, 12); // Right LCD LiquidCrystal lcd2 (1, 2, 3, 4, 5, 6); # isama ang #ifdef _AVR_ # isama ang # endif / / NeoPixel Ring 24 # tukuyin ang PIN 13 # tukuyin ang NUMPIXELS 24Adafruit_NeoPixel pixel = Adafruit_NeoPixel (NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int pagkaantala = 50; matagal nang nakaraangMillis = 0; mahabang agwat = 950; int segundo = 0; int oras = 0; int hour ButtonState = 0; int min ButtonState = 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,}; // ang gawain sa pag-setup ay tumatakbo nang isang beses kapag pinindot mo ang pag-reset: void setup () {// set mga pindutan ng pin pinMode (14, INPUT); // set minute pinMode (15, INPUT); // set hour // gumawa ng mga pasadyang character lcd1.createChar (0, halfR); lcd1.createChar (1, kalahatingL); lcd1.createChar (2, buo); lcd2.createChar (0, kalahatiR); lcd2.createChar (1, kalahatingL); lcd2.createChar (2, buo); // set LCD1 size lcd1.begin (16, 2); // set LCD2 size lcd2.begin (16, 2); // pixel ring pixel.begin (); // paunang pag-setup lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); //pixels.setPixelColor(17, pixel. Color (0, 150, 0)); //pixels.setPixelColor(18, pixel. Color (0, 150, 0)); pix.show (); } // ang gawain ng loop ay tumatakbo nang paulit-ulit magpakailanman: void loop () {hourButtonState = digitalRead (15); minButtonState = digitalRead (14); kung (hourButtonState == MATAAS) {oras ++; runClock (); } kung (min ButtonState == MATAAS) {segundo ++; runClock (); } unsigned long currentMillis = millis (); kung (currentMillis - nakaraangMillis> agwat) {kung (segundo == 59) {segundo = 0; kung (oras == 11) {oras = 0; } iba pa {oras ++; }} iba pa {segundo ++; } nakaraangMillis = kasalukuyangMillis; runClock (); } pagkaantala (10); } void runClock () {kung (segundo == 0) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); } kung (segundo == 1 || segundo == 11 || segundo == 21 || segundo == 31 || segundo == 41 || segundo == 51) {lcd1.clear (); num1lcd1 (); } kung (segundo == 2 || segundo == 12 || segundo == 22 || segundo == 32 || segundo == 42 || segundo == 52) {lcd1.clear (); num2lcd1 (); } kung (segundo == 3 || segundo == 13 || segundo == 23 || segundo == 33 || segundo == 43 || segundo == 53) {lcd1.clear (); num3lcd1 (); } kung (segundo == 4 || segundo == 14 || segundo == 24 || segundo == 34 || segundo == 44 || segundo == 54) {lcd1.clear (); num4lcd1 (); } kung (segundo == 5 || segundo == 15 || segundo == 25 || segundo == 35 || segundo == 45 || segundo == 55) {lcd1.clear (); num5lcd1 (); } kung (segundo == 6 || segundo == 16 || segundo == 26 || segundo == 36 || segundo == 46 || segundo == 56) {lcd1.clear (); num6lcd1 (); } kung (segundo == 7 || segundo == 17 || segundo == 27 || segundo == 37 || segundo == 47 || segundo == 57) {lcd1.clear (); num7lcd1 (); } kung (segundo == 8 || segundo == 18 || segundo == 28 || segundo == 38 || segundo == 48 || segundo == 58) {lcd1.clear (); num8lcd1 (); } kung (segundo == 9 || segundo == 19 || segundo == 29 || segundo == 39 || segundo == 49 || segundo == 59) {lcd1.clear (); num9lcd1 (); } kung (segundo == 10) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num1lcd2 (); } kung (segundo == 20) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num2lcd2 (); } kung (segundo == 30) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num3lcd2 (); } kung (segundo == 40) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num4lcd2 (); } kung (segundo == 50) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num5lcd2 (); } kung (oras == 0) {pix.setPixelColor (15, pixel. Color (0, 0, 0)); pix.setPixelColor (16, pixel. Color (0, 0, 0)); pix.setPixelColor (17, pixel. Color (0, 150, 0)); pix.setPixelColor (18, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 1) {pix.setPixelColor (17, pixel. Color (0, 0, 0)); pix.setPixelColor (18, pixel. Color (0, 0, 0)); pix.setPixelColor (19, pixel. Color (0, 150, 0)); pix.setPixelColor (20, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 2) {pix.setPixelColor (19, pix. Color (0, 0, 0)); pix.setPixelColor (20, pixel. Color (0, 0, 0)); pix.setPixelColor (21, pixel. Color (0, 150, 0)); pix.setPixelColor (22, mga pixel. Kulay (0, 150, 0)); pix.show (); } kung (oras == 3) {pix.setPixelColor (21, pix. Color (0, 0, 0)); pix.setPixelColor (22, mga pixel. Kulay (0, 0, 0)); pix.setPixelColor (23, pixel. Color (0, 150, 0)); pix.setPixelColor (0, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 4) {pix.setPixelColor (23, pix. Color (0, 0, 0)); pix.setPixelColor (0, pixel. Color (0, 0, 0)); pix.setPixelColor (1, mga pixel. Kulay (0, 150, 0)); pix.setPixelColor (2, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 5) {pix.setPixelColor (1, pix. Color (0, 0, 0)); pix.setPixelColor (2, pixel. Color (0, 0, 0)); pix.setPixelColor (3, pixel. Color (0, 150, 0)); pix.setPixelColor (4, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 6) {pix.setPixelColor (3, pixel. Color (0, 0, 0)); pix.setPixelColor (4, pixel. Color (0, 0, 0)); pix.setPixelColor (5, pixel. Color (0, 150, 0)); pix.setPixelColor (6, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 7) {pix.setPixelColor (5, pix. Color (0, 0, 0)); pix.setPixelColor (6, pixel. Color (0, 0, 0)); pix.setPixelColor (7, pixel. Color (0, 150, 0)); pix.setPixelColor (8, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 8) {pix.setPixelColor (7, pixel. Color (0, 0, 0)); pix.setPixelColor (8, pixel. Color (0, 0, 0)); pix.setPixelColor (9, pixel. Color (0, 150, 0)); pix.setPixelColor (10, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 9) {pix.setPixelColor (9, pix. Color (0, 0, 0)); pix.setPixelColor (10, pixel. Color (0, 0, 0)); pix.setPixelColor (11, pixel. Color (0, 150, 0)); pix.setPixelColor (12, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 10) {pix.setPixelColor (11, pix. Color (0, 0, 0)); pix.setPixelColor (12, pixel. Color (0, 0, 0)); pix.setPixelColor (13, pixel. Color (0, 150, 0)); pix.setPixelColor (14, pixel. Color (0, 150, 0)); pix.show (); } kung (oras == 11) {pix.setPixelColor (13, pix. Color (0, 0, 0)); pix.setPixelColor (14, pixel. Color (0, 0, 0)); pix.setPixelColor (15, pixel. Color (0, 150, 0)); pix.setPixelColor (16, pixel. Color (0, 150, 0)); pix.show (); }} void num0lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // full lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // half right lcd1.setCursor (1, 0); lcd1.write (byte (1)); // half left 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)); } walang bisa 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)); } walang bisa num2lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // full lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 0); lcd1.write (byte (1)); // half left 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)); } walang bisa num3lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // full lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // kalahating kanan 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)); } walang bisa 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)); } walang bisa num5lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // full lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // kalahating kanan 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)); } walang bisa num6lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // full lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // half right lcd1.setCursor (1, 0); lcd1.write (byte (1)); // half left 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)); } walang bisa 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)); } walang bisa num8lcd1 () {lcd1.setCursor (0, 0); lcd1.write (byte (2)); // full lcd1.setCursor (0, 1); lcd1.write (byte (2)); lcd1.setCursor (1, 1); lcd1.write (byte (0)); // half right lcd1.setCursor (1, 0); lcd1.write (byte (1)); // half left 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)); } walang bisa 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)); } walang bisa num0lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // full lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); // kalahating kanan lcd2.setCursor (1, 0); lcd2.write (byte (1)); // half left 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)); } walang bisa 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)); } walang bisa num2lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // full lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 0); lcd2.write (byte (1)); // half left 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)); } walang bisa num3lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // full lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); // kalahating kanan 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)); } walang bisa 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)); } walang bisa num5lcd2 () {lcd2.setCursor (0, 0); lcd2.write (byte (2)); // full lcd2.setCursor (0, 1); lcd2.write (byte (2)); lcd2.setCursor (1, 1); lcd2.write (byte (0)); // kalahating kanan 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)); }

Hakbang 4: Paggawa at Pagtatapos ng Touch

Paggawa at Pagtatapos ng Touch
Paggawa at Pagtatapos ng Touch

Ikonekta ang iyong arduino sa computer at hayaang gumana ito. Inaasahan kong gagana ang iyong orasan. Gumagana ito ngunit mukhang napakagulo. Napakaraming risistor at wires na ito ay hindi maganda. Kaya, Ilagay ang lahat ng mga bahagi sa kahon at gupitin ang isang butas para sa LCD pintura ang kahon at bigyan ng hitsura ang Digital Clock.

Hindi ko ito nilikha sa totoong ngunit dinisenyo ko ito sa AUTODESK CIRCUITS. Ididisenyo ko ito sa totoong at i-post ang video ng pagtatrabaho. Hindi ako katutubong nagsasalita. Kung nagawa ang anumang pagkakamali ipaalam sa akin sa mga pribadong mensahe. At humihingi ako ng paumanhin tungkol sa pagkakamaling iyon. Kumuha din ako ng ilang ideya mula sa "Dan's arduino Clock". Makipagkita sa iyo sa isa pang itinuturo.

Inirerekumendang: