Isi kandungan:
- Langkah 1: Mengumpulkan Bahan
- Langkah 2: Pendawaian Semua Komponen
- Langkah 3: Pengaturcaraan
- Langkah 4: Sentuhan Bekerja dan Selesai
Video: Jam Arduino Hebat: 4 Langkah
2024 Pengarang: John Day | [email protected]. Diubah suai terakhir: 2024-01-30 11:09
Kami telah melihat banyak projek dengan arduino. Tetapi Sekarang, saya akan menunjukkan kepada anda cara membuat jam tangan dengan paparan arduino dan 2 LCD. Ia ringkas tetapi sangat menyeronokkan. Setiap orang boleh mencubanya. Jadi, Bersedia !!!
Langkah 1: Mengumpulkan Bahan
Sekiranya anda mahu membuatnya, anda akan memerlukan beberapa barang. Barang-barang ini boleh anda beli dengan mudah dari kedai runcit anda yang berhampiran.
Apa yang anda perlukan:
- Arduino UNO R3Neo
- Cincin Pixel 24
- Papan Roti
- LCD 16x2
- Perintang 100 Ohm (2)
- Perintang 120 Ohm (2)
- Perintang 10 K Ohm (2)
- Tekan butang
Gambar rajah ini ditunjukkan di atas. Anda boleh menggunakan mana-mana papan Roti. Anda memerlukan 6 Resistor nilai mereka ditulis di atas dalam senarai. Anda juga memerlukan wayar untuk sambungan. LCD ini akan anda paparkan. Kaedah litar pendawaian yang anda dapat lihat pada langkah seterusnya.
Langkah 2: Pendawaian Semua Komponen
Perkara yang anda perlukan. Saya telah menunjukkan pada langkah sebelumnya, jadi ikutilah rangkaian wayar papan roti anda.
Langkah Pendawaian:
- Letakkan perintang 100 Ohm di bahagian atas papan roti di Garis Negatif.
- Letakkan perintang 120 Ohm di bahagian atas papan roti di Garis Positif.
- Tombol Tekan Tekan (Gambar rajah ditunjukkan di atas)
- Letakkan perintang 10 K Ohm di bawah Butang Tekan
- Sambungkan perintang 100 Ohm (keduanya) ke paparan LCD dengan 'LED Cathode'
- Sambungkan 120 perintang Ohm (kedua-duanya) ke paparan LCD dengan 'LED Anode'
- Sambungkan terminal negatif papan roti dari baris atas ke 'Baca / Tulis'.
- Sambungkan terminal negatif papan roti dari garisan atas ke 'Kontras'.
- Sambungkan terminal positif papan roti dari garisan bawah ke 'Vcc'.
- Sambungkan terminal negatif papan roti yang lain dari barisan atas papan roti ke 'GND ".
- Lakukan perkara yang sama pada LCD ke-2 menghubungkan semua ini seperti sebelumnya.
- Sambungkan perintang yang tinggal ke garis negatif papan roti.
- Sambungkan butang tekan ke garis positif.
- Sambungkan terminal papan roti Positif & Negatif ke "Neo Pixel Ring 24".
Sekarang, anda telah menghubungkan semua komponen. Tetapi arduino masih ada. Rajah ini ditunjukkan di atas.
Langkah-langkah pendawaian arduino ke semua komponen:
- Sambungkan butang tekan (Terminal22) ke A0 & A1 dari arduino.
- Sambungkan GND ke terminal negatif papan roti.
- Sambungkan 5V ke terminal positif papan roti.
- Sambungkan D13 of arduino ke "Power of" "Neo Pixel Ring 24"
- Sambungkan D7 of arduino ke "Register Select" dari LCD1.
- Sambungkan D8 of arduino ke "Enable" LCD 2.
- Sambungkan D9 of arduino ke "DB4" LCD 2.
- Sambungkan D10 arduino ke "DB5" LCD 2.
- Sambungkan D11 of arduino ke "DB6" LCD 2.
- Sambungkan D12 of arduino ke "DB7" LCD 2.
- Sambungkan D1 of arduino ke "Register Select" dari LCD 1.
- Sambungkan D2 of arduino ke "Enable" LCD 1.
- Sambungkan D3 of arduino ke "DB4" LCD 2.
- Sambungkan D4 of arduino ke "DB5" LCD 2.
- Sambungkan D5 of arduino ke "DB6" LCD 2.
- Sambungkan D6 of arduino ke "DB7" LCD 2.
Rajah semua komponen selepas pendawaian ditunjukkan di atas.
Langkah 3: Pengaturcaraan
Anda telah melengkapkan litar. Tetapi ia tidak akan berjaya sehingga anda akan memprogramkannya untuk projek ini. Sekiranya anda pakar dan mempunyai pengalaman, anda akan memprogramnya dengan mudah. Saya harap anda akan mengetahui perisian yang digunakan untuk tujuan ini. Program dengan sewajarnya jika anda ingin membuat perubahan dalam pengaturcaraan anda boleh tetapi ingat itu mesti betul. Jika tidak, ia tidak akan berjaya. Sekiranya anda tidak dapat memprogramnya, anda boleh menyalinnya dari sini atau mengambilnya dari sumber lain.
#sertakan
// Liquid LCD LiquidCrystal lcd1 kiri (7, 8, 9, 10, 11, 12); // Liquid LCD kanan Lcd2 (1, 2, 3, 4, 5, 6); # include #ifdef _AVR_ #include # endif / / NeoPixel Ring 24 #define PIN 13 # define NUMPIXELS 24Adafruit_NeoPixel pixel = Adafruit_NeoPixel (NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int delayval = 50; lama sebelumnyaMillis = 0; selang panjang = 950; saat int = 0; int hour = 0; int hourButtonState = 0; int minButtonState = 0; bait penuh [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,}; // rutin persediaan berjalan sekali apabila anda menekan semula: kekosongan persediaan () {// set butang pin pinMode (14, INPUT); // tetapkan pin pinMode (15, INPUT); // set hour // buat watak khas lcd1.createChar (0, halfR); lcd1.createChar (1, halfL); lcd1.createChar (2, penuh); lcd2.createChar (0, halfR); lcd2.createChar (1, halfL); lcd2.createChar (2, penuh); // tetapkan saiz LCD1 lcd1.begin (16, 2); // tetapkan LCD2 saiz lcd2.begin (16, 2); // pixel cincin piksel. mulakan (); // persediaan awal lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); //pixels.setPixelColor(17, pixels. Color (0, 150, 0)); //pixels.setPixelColor(18, pixels. Color (0, 150, 0)); piksel.show (); } // rutin gelung berulang-ulang kali selamanya: gelung void () {hourButtonState = digitalRead (15); minButtonState = digitalRead (14); jika (hourButtonState == TINGGI) {jam ++; runClock (); } jika (minButtonState == TINGGI) {saat ++; runClock (); } arus panjang yang tidak ditandatanganiMillis = millis (); if (currentMillis - sebelumnyaMillis> selang) {if (saat == 59) {saat = 0; jika (jam == 11) {jam = 0; } lain {jam ++; }} lain {saat ++; } sebelumnyaMillis = currentMillis; runClock (); } kelewatan (10); } batal runClock () {if (saat == 0) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num0lcd2 (); } jika (saat == 1 || saat == 11 || saat == 21 || saat == 31 || saat == 41 || saat == 51) {lcd1.clear (); num1lcd1 (); } jika (saat == 2 || saat == 12 || saat == 22 || saat == 32 || saat == 42 || saat == 52) {lcd1.clear (); num2lcd1 (); } jika (saat == 3 || saat == 13 || saat == 23 || saat == 33 || saat == 43 || saat == 53) {lcd1.clear (); num3lcd1 (); } jika (saat == 4 || saat == 14 || saat == 24 || saat == 34 || saat == 44 || saat == 54) {lcd1.clear (); num4lcd1 (); } jika (saat == 5 || saat == 15 || saat == 25 || saat == 35 || saat == 45 || saat == 55) {lcd1.clear (); num5lcd1 (); } jika (saat == 6 || saat == 16 || saat == 26 || saat == 36 || saat == 46 || saat == 56) {lcd1.clear (); num6lcd1 (); } jika (saat == 7 || saat == 17 || saat == 27 || saat == 37 || saat == 47 || saat == 57) {lcd1.clear (); num7lcd1 (); } jika (saat == 8 || saat == 18 || saat == 28 || saat == 38 || saat == 48 || saat == 58) {lcd1.clear (); num8lcd1 (); } jika (saat == 9 || saat == 19 || saat == 29 || saat == 39 || saat == 49 || saat == 59) {lcd1.clear (); num9lcd1 (); } jika (saat == 10) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num1lcd2 (); } jika (saat == 20) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num2lcd2 (); } jika (saat == 30) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num3lcd2 (); } jika (saat == 40) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num4lcd2 (); } jika (saat == 50) {lcd1.clear (); num0lcd1 (); lcd2.clear (); num5lcd2 (); } jika (jam == 0) {pixels.setPixelColor (15, pixels. Color (0, 0, 0)); pixels.setPixelColor (16, pixel. Color (0, 0, 0)); pixels.setPixelColor (17, pixel. Color (0, 150, 0)); pixels.setPixelColor (18, pixel. Color (0, 150, 0)); piksel.show (); } jika (jam == 1) {pixels.setPixelColor (17, pixels. Color (0, 0, 0)); pixels.setPixelColor (18, pixel. Color (0, 0, 0)); pixels.setPixelColor (19, pixel. Color (0, 150, 0)); pixels.setPixelColor (20, pixel. Color (0, 150, 0)); piksel.show (); } jika (jam == 2) {pixels.setPixelColor (19, pixels. Color (0, 0, 0)); pixels.setPixelColor (20, pixel. Color (0, 0, 0)); pixels.setPixelColor (21, pixel. Color (0, 150, 0)); pixels.setPixelColor (22, pixel. Color (0, 150, 0)); piksel.show (); } jika (jam == 3) {pixels.setPixelColor (21, pixels. Color (0, 0, 0)); pixels.setPixelColor (22, pixel. Color (0, 0, 0)); pixels.setPixelColor (23, pixel. Color (0, 150, 0)); pixels.setPixelColor (0, pixels. Color (0, 150, 0)); piksel.show (); } jika (jam == 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)); piksel.show (); } jika (jam == 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)); piksel.show (); } jika (jam == 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, pixel. Color (0, 150, 0)); piksel.show (); } jika (jam == 7) {pixels.setPixelColor (5, pixels. Color (0, 0, 0)); pixels.setPixelColor (6, pixels. Color (0, 0, 0)); pixels.setPixelColor (7, pixel. Color (0, 150, 0)); pixels.setPixelColor (8, pixel. Color (0, 150, 0)); piksel.show (); } jika (jam == 8) {pixels.setPixelColor (7, pixels. Color (0, 0, 0)); pixels.setPixelColor (8, pixel. Color (0, 0, 0)); pixels.setPixelColor (9, pixel. Color (0, 150, 0)); pixels.setPixelColor (10, pixel. Color (0, 150, 0)); piksel.show (); } jika (jam == 9) {pixels.setPixelColor (9, pixels. Color (0, 0, 0)); pixels.setPixelColor (10, pixel. Color (0, 0, 0)); pixels.setPixelColor (11, pixel. Color (0, 150, 0)); pixels.setPixelColor (12, pixel. Color (0, 150, 0)); piksel.show (); } jika (jam == 10) {pixels.setPixelColor (11, pixels. Color (0, 0, 0)); pixels.setPixelColor (12, pixel. Color (0, 0, 0)); pixels.setPixelColor (13, pixel. Color (0, 150, 0)); pixels.setPixelColor (14, pixel. Color (0, 150, 0)); piksel.show (); } jika (jam == 11) {pixels.setPixelColor (13, pixels. Color (0, 0, 0)); pixels.setPixelColor (14, pixel. Color (0, 0, 0)); pixels.setPixelColor (15, pixel. Color (0, 150, 0)); pixels.setPixelColor (16, pixel. Color (0, 150, 0)); piksel.show (); }} batal num0lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // penuh lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // setengah kanan lcd1.setCursor (1, 0); lcd1.write (bait (1)); // setengah kiri 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)); } batal 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)); } batal num2lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // penuh lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 0); lcd1.write (bait (1)); // setengah kiri 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)); } batal num3lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // penuh lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // setengah kanan 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)); } batal 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)); } batal num5lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // penuh lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // setengah kanan 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)); } batal num6lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // penuh lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // setengah kanan lcd1.setCursor (1, 0); lcd1.write (bait (1)); // setengah kiri 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)); } batal 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)); } batal num8lcd1 () {lcd1.setCursor (0, 0); lcd1.write (bait (2)); // penuh lcd1.setCursor (0, 1); lcd1.write (bait (2)); lcd1.setCursor (1, 1); lcd1.write (bait (0)); // setengah kanan lcd1.setCursor (1, 0); lcd1.write (bait (1)); // setengah kiri 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)); } batal 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)); } batal num0lcd2 () {lcd2.setCursor (0, 0); lcd2.write (bait (2)); // penuh lcd2.setCursor (0, 1); lcd2.write (bait (2)); lcd2.setCursor (1, 1); lcd2.write (bait (0)); // setengah kanan lcd2.setCursor (1, 0); lcd2.write (bait (1)); // setengah kiri 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)); } batal 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)); } batal num2lcd2 () {lcd2.setCursor (0, 0); lcd2.write (bait (2)); // penuh lcd2.setCursor (0, 1); lcd2.write (bait (2)); lcd2.setCursor (1, 0); lcd2.write (bait (1)); // setengah kiri 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)); } batal num3lcd2 () {lcd2.setCursor (0, 0); lcd2.write (bait (2)); // penuh lcd2.setCursor (0, 1); lcd2.write (bait (2)); lcd2.setCursor (1, 1); lcd2.write (bait (0)); // setengah kanan 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)); } batal 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)); } batal num5lcd2 () {lcd2.setCursor (0, 0); lcd2.write (bait (2)); // penuh lcd2.setCursor (0, 1); lcd2.write (bait (2)); lcd2.setCursor (1, 1); lcd2.write (bait (0)); // setengah kanan 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)); }
Langkah 4: Sentuhan Bekerja dan Selesai
Sambungkan arduino anda ke komputer dan biarkan ia berfungsi. Saya harap jam anda akan berfungsi. Ia berfungsi tetapi kelihatan sangat tidak kemas. Begitu banyak perintang & wayar yang tidak baik. Oleh itu, Letakkan semua komponen di dalam kotak dan potong satu lubang untuk LCD cat kotak dan lihat Jam Digital.
Saya tidak menciptanya secara nyata tetapi saya telah merancangnya dalam AUTODESK CIRCUITS. Saya akan merancangnya secara sebenar dan menyiarkan video yang berfungsi. Saya bukan penutur asli. Sekiranya ada kesalahan sila maklumkan kepada saya dalam mesej peribadi. Dan saya minta maaf atas kesalahan itu. Saya juga telah mengambil beberapa idea dari "Jam arduino Dan". Jumpa anda dengan yang lain yang boleh diajar.
Disyorkan:
Jam Persaraan / Jam Naik / Jam Dn: 4 Langkah (dengan Gambar)
Jam Persaraan / Jam Naik / Jam Dn: Saya mempunyai beberapa paparan dot-matriks 8x8 LED di dalam laci dan memikirkan apa yang harus dilakukan dengan mereka. Diilhamkan oleh instruksional lain, saya mendapat idea untuk membuat paparan hitung mundur / naik untuk dikira ke tarikh / masa yang akan datang dan jika waktu sasaran
Jam Rangkaian ESP8266 Tanpa RTC - Jam NTP Nodemcu Tiada RTC - PROJEK JAM INTERNET: 4 Langkah
Jam Rangkaian ESP8266 Tanpa RTC | Jam NTP Nodemcu Tiada RTC | PROJEK JAM INTERNET: Dalam projek ini akan membuat projek jam tanpa RTC, akan memakan masa dari internet menggunakan wifi dan akan memaparkannya pada paparan st7735
Hebat hingga Hebat: Ganti Bunyi Penggera Mekanikal: 8 Langkah (dengan Gambar)
Hebat hingga Hebat: Ganti Suara Penggera Mekanikal: Dengan harapan dapat mengurangkan penggunaan telefon pintar lewat malam, saya mendapat jam penggera vintaj di sebelah katil saya. Jam balik mekanikal yang indah ini hanya mempunyai satu masalah: bunyi penggera yang sangat mengerikan. (Saksikan video pertama di atas.) Tidak hairanlah jam ini
Cara Membuat Firefox Nampak Hebat dan Hebat Percuma .. Sequil: 4 Langkah
Cara Membuat Firefox Nampak Hebat dan Hebat Percuma …….. Sequil: Helo semua. Instruksional ini adalah sekuel yang lebih kecil daripada instruksional Firefox pertama saya yang merupakan salah satu cara firefox paling popular di web. Hari ini saya akan memperkenalkan anda kepada tiga: (tambahan baru dan hebat untuk firefox. Sekiranya anda tidak mempunyai firefox
Gear Bergerak Hebat Dikendalikan oleh Butang Hebat (Akan Dilanjutkan): 9 Langkah
Alat Gerakan Hebat Dikendalikan oleh Butang Hebat (Akan Diteruskan): Reka bentuk permainan fizikal / elektronik untuk UCLA Design Media Arts dengan Eddo Stern. Pengajaran ini tidak lengkap. Projek ini masih dalam proses