Cov txheej txheem:

Cryptic Wall Clock: 27 Kauj Ruam (nrog Duab)
Cryptic Wall Clock: 27 Kauj Ruam (nrog Duab)

Video: Cryptic Wall Clock: 27 Kauj Ruam (nrog Duab)

Video: Cryptic Wall Clock: 27 Kauj Ruam (nrog Duab)
Video: The Clocks Were Striking Thirteen 2024, Kaum ib hlis
Anonim
Cryptic Wall Moos
Cryptic Wall Moos

Lub sijhawm dhau mus yog ib yam uas peb tswj tsis tau. Nws tshwm sim ntawm tib tus nqi yog tias peb tsaug zog, tsaug zog, dhuav, lossis koom nrog. Nrog cov xwm txheej tam sim no, nws yog ib qho tseem ceeb kom nco ntsoov lub sijhawm yuav dhau mus. Thaum peb tab tom tos lub sijhawm dhau mus, vim li cas ho tsis ua qee yam uas ua rau lub sijhawm dhau mus zoo dua saib.

Lub moos no tau tshoov siab los ntawm Mengenlehreuhr pom hauv Berlin, Lub Tebchaws Yelemees thiab tuaj yeem nyeem tib yam nkaus. Ib yam li qhov qub, nws qhia lub sijhawm los ntawm kev ua kom pom kev, cov xim dawb.

Nws nta 96 LED's uas ua rau thaj tsam 52 'tus lej'. Tsis zoo li qhov qub, nws muaj lub ntsej muag tsim uas suav nrog lub nplhaib thib ob, tsis yog kab rov tav kab teeb tsa. Cov qhab sab nraud qhia txog vib nas this ua ke nrog cov qhab nia nruab nrab, ob pawg tom ntej no qhia txog feeb, nrog rau cov kab sab hauv kawg uas qhia txog teev.

Yog tias koj muaj qee cov khoom seem thiab sijhawm ntxiv ntawm koj txhais tes, vim li cas ho tsis siv lub sijhawm no los ua qee yam uas yuav qhia nws!

Muaj qee qhov kev hloov pauv kuv yuav ua rau txoj haujlwm no yog tias kuv yuav rov ua dua. Ua ntej tshaj, kuv yuav pleev xim rau lub thav duab thiab LED board dawb tsis yog dub. Qhov no yuav cuam tshuam ntau lub teeb los ntawm lub lens loj nyob rau pem hauv ntej. Kuv tseem yuav tos txog thaum kawg txhawm rau ntxig cov LED. Kuv xav tau lub rooj tsavxwm kom tiav ua ntej nws thiaj tuaj yeem pab kuv sau cov cai. Nrog qhov ntawd ntawm txoj kev, xub xub kawm paub yuav nyeem nws li cas!

Duab
Duab

Kauj Ruam 1: Yuav Ua Li Cas Nyeem Lub Sijhawm

Lub moos tau nyeem los ntawm lub voj voog sab hauv mus rau sab nraud. Lub nplhaib sab hauv ntawm plaub thaj chaw qhia txog tsib teev puv txhua, nrog rau lub nplhaib thib ob, kuj yog ntawm plaub thaj chaw, uas qhia txog ib teev puv txhua, qhia tus nqi teev nyob rau hauv 24-teev hom. Lub nplhaib thib peb suav nrog kaum ib daim teb, uas qhia txog tsib feeb tag nrho txhua, lub nplhaib tom ntej muaj lwm plaub thaj chaw, uas cim ib feeb feeb txhua. Thaum kawg lub nplhaib sab nraud ntawm 29 thaj chaw qhia tias yog vib nas this nrog lub teeb nyob hauv nruab nrab ntsais muag kom pom qhov txawv (thaum teeb) lossis txawm tias-suav (thaum tsis qhib) vib nas this.

Duab
Duab

Piv txwv li, daim duab saum toj no muaj 1 ntawm tsib teev tus lej, 3 ntawm ib teev tus lej, 8 ntawm tsib feeb tus lej, 4 ntawm tus lej ib feeb, thiab 23 ntawm ob tus lej thib ob thiab tus lej thib ob nruab nrab.

1x5 + 3x1: 8x5 + 4x1: 23x2 + 1x1 = 8:44:47 = 8:44:47 AM

Duab
Duab

Lub sijhawm qhia saum toj no yog: 3x5 + 0x1: 3x5 + 2x1: 5x2 + 1x1 = 15:17:11 = 3:17:11 PM

Duab
Duab

Lub sijhawm qhia saum toj no yog: 3x5 + 2x1: 3x5 + 3x1: 16x2 + 1x1 = 17:18:33 = 5:18:33 PM

Kauj Ruam 2: Cov Cuab Yeej thiab Cov Khoom

Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom

Cov Khoom Siv Hluav Taws Xob:

  • Arduino Nano Cov
  • Sijhawm Tiag
  • LEDs nyob tau
  • Hwj chim Plug
  • Fais Fab Cable
  • USB hwj chim Plug
  • Lub teeb nyob ntawm tus tiv taus thiab sib npaug tiv taus (yog tias koj xav kom nws dim thaum hmo ntuj)
  • Hlau

Cov Khoom Ntoo:

  • 3/4 nyob rau hauv. Plywood
  • Nyias Plywood
  • Ntoo Ntoo (Kuv siv 2x4s tab sis tawv ntoo yuav ua haujlwm ib yam)
  • Xim
  • Acrylic 30 x 36 nyob rau hauv. Ntawv (pom ntawm lub khw txhim kho tsev hauv zos)
  • Qhov rai Tint (sim ua qhov chaw hauv zos. Yog tias tsis muaj, koj tuaj yeem pom cov ntawv loj txaus ntawm no)
  • Daim Ntawv Tint Daim Ntawv Thov Dej (Kuv siv dej sib xyaw nrog menyuam mos zawv plaub hau hauv lub raj mis tsuag)
  • Windex
  • Neeg Tuag Ntawv
  • Ntsia Hlau
  • Txau Adhesive
  • Kua nplaum
  • Kua nplaum

Cov Cuab Yeej:

  • Tus kav
  • Xacto Riam
  • Daim kab xev
  • Daim Kab Xev Ob Sab
  • Compass
  • Vajvoog Txiav Jig
  • Jigsaw
  • Bandsaw
  • Spindle Sander
  • Xibtes Sander
  • Disk Sander yog
  • Rooj Rooj
  • Awl
  • Drill thiab Drill Bit/Drivers
  • Clamps
  • Soldering Hlau
  • Solder
  • Hlau Strippers

Kauj Ruam 3: Sib Sau Cov Qauv

Sib dhos Cov Qauv
Sib dhos Cov Qauv
Sib dhos Cov Qauv
Sib dhos Cov Qauv

Txog tus qauv loj, luam tawm nws siv cov ntawv teeb tsa teeb tsa hauv Adobe Reader. Txiav tawm cov npoo rau txhua daim ntawv thiab kab xev ua ke. Cov kab ntsug, kab rov tav, thiab kab pheeb ces kaum yuav pab ua kab hauv kab ntawv. Cov nplooj ntawv txhua tus muaj tus lej me me ntawm lawv los pab ua kom lawv muaj kev sib koom yog tias lawv poob qhov kev txiav txim.

Txhua tus qauv thiab cov ntaub ntawv xav tau muaj nyob hauv Kauj Ruam 26.

Kauj Ruam 4: Rough Cut Circles

Rough Cut Circles
Rough Cut Circles
Rough Cut Circles
Rough Cut Circles

Teem tawm ob tus qauv ntawm ib daim ntawv ntawm 3/4 hauv. Plywood, kos lub voj voog loj dua me ntsis uas xav tau nrog lub koob. Siv lub jigsaw, txiav tawm cov duab ntxhib.

Kauj Ruam 5: Txiav rau Qhov Loj

Txiav rau Qhov Loj
Txiav rau Qhov Loj
Txiav rau Qhov Loj
Txiav rau Qhov Loj

Siv lub voj voos txiav jig ntawm txoj hlua khi, txiav cov voj voos kom loj me me.

Kauj Ruam 6: Thov Siv Tus Qauv

Thov Template
Thov Template
Thov Template
Thov Template
Thov Template
Thov Template

Siv tshuaj nplaum, siv txhua tus qauv rau lub voj voog. Ntxig tus ntsia hlau rau hauv nruab nrab ntawm tus qauv kom nws nyob hauv lub voj voog.

Kauj ruam 7: Txiav Template

Txiav Template
Txiav Template
Txiav Template
Txiav Template
Txiav Template
Txiav Template

Siv lub jigsaw, txiav tawm txhua lub qhov rais ntawm tus qauv. Yog tias koj nkag mus rau CNC, cov kauj ruam no yuav yooj yim dua! Kuv tau tho qhov ntawm txhua lub qhov rais los pab nrog cov txheej txheem no. Thaum koj pib txiav, tus qauv tuaj yeem pib tawm. Yog tias qhov no tshwm sim, koj tuaj yeem ruaj ntseg nws nrog cov kab xev me me.

Kauj ruam 8: Sanding

Sanding
Sanding
Sanding
Sanding
Sanding
Sanding

Siv cov ntawv xuab zeb siv rau ib tus pas, ntxaiv ntxhua khaub ncaws, thiab xibtes xib teg, xuab zeb thiab txhuam tawm qhov ntxhib txiav sab laug los ntawm cov jigsaw.

Kauj Ruam 9: Laum Tuav rau LEDs

Drill Holds rau LEDs
Drill Holds rau LEDs
Drill Holds rau LEDs
Drill Holds rau LEDs
Drill Holds rau LEDs
Drill Holds rau LEDs
Drill Holds rau LEDs
Drill Holds rau LEDs

Kos rau nruab nrab ntawm txhua lub qhov nrog awl thiab laum tshem qhov rau LEDs. Kuv tau siv phau ntawv qhia txhawm rau txhawm rau ua kom cov kab rov tav rau kuv cov haujlwm thiab lub nraub qaum kom tsis txhob tshuab ntoo tawm tom qab.

Kauj Ruam 10: Ua ke Cov Rooj Sib Tham

Muab cov laug cam
Muab cov laug cam
Muab cov laug cam
Muab cov laug cam
Muab cov laug cam
Muab cov laug cam

Sib pauv cov laug laug pem hauv ntej thiab nraub qaum thiab taug ib feem ntawm tus ncej nyob tom qab ntawm pawg thawj coj saib LED. Tsiv lub thav duab rov qab mus rau pem hauv ntej ntawm lub rooj tsavxwm LED thiab siv lub qhov thiab ntsaws cov khoom ua ke.

Saib cov ntawv sau tseg kom paub ntau ntxiv.

Kauj Ruam 11: Ntxig LEDs

Ntxig LEDs
Ntxig LEDs
Ntxig LEDs
Ntxig LEDs

Thawb lub LEDs hla sab nraum qab ntawm lub rooj tsavxwm LED. Lub qhov yuav tsum tau sib nrug kom txaus uas koj tsis tas yuav txiav cov xov hlau tshwj tsis yog txav los ntawm ib lub voj voog mus rau lwm qhov.

Los ntawm sab nraub qaum, LEDs pib hauv nruab nrab thiab tom qab ntawd ua haujlwm counter clockwise ces mus rau lub nplhaib tom ntej.

Kauj Ruam 12: Txuas ntu 1

Txuas ntu 1
Txuas ntu 1
Txuas ntu 1
Txuas ntu 1
Txuas ntu 1
Txuas ntu 1

Txiav tawm 9 ntu los ntawm "Segment 1" template txuas rau 3/4 hauv. Plywood (pom hauv qib 26). Txuas mus rau lub rooj tsav xwm LED nrog kua nplaum thiab clamps. Yog tias koj tsis ua siab ntev koj tseem tuaj yeem siv cov ntsia hlau txhawm rau kho nws.

Ib zaug qhuav, xuab zeb ntug ntug yaug nrog lub tshuab ziab khaub ncaws.

Kauj ruam 13: Xim

Xim
Xim
Xim
Xim
Xim
Xim
Xim
Xim

Txau xim ob qho tib si LED board thiab thav duab. Yog tias kuv tau rov ua qhov no dua, kuv yuav tau xaiv siv cov xim dawb tsis txhob siv dub vim nws yuav muaj kev cuam tshuam ntau dua los ntawm lub lens.

Kauj Ruam 14: Ntu 2

Ntu 2
Ntu 2
Ntu 2
Ntu 2
Ntu 2
Ntu 2

Txiav tawm 9 ntu los ntawm "Segment 2" template txuas tawm ntawm cov ntoo uas yog 2 3/8 in. Tuab (pom hauv qib 26). Kuv siv qee qhov seem 2x4s los ntawm ib ncig ntawm lub khw. Qhuav haum cov ntu thiab xyuas kom nws haum zoo nrog txoj hlua khi. Yog tias txhua yam tshuaj xyuas, npog sab nrauv nrog cov xim pleev xim rau kom cov kua nplaum tsis lo thiab cia kom qhuav tsawg kawg ib teev ua ntej yuav txav mus rau qib tom ntej.

Kauj Ruam 15: Ntu 3

Ntu 3
Ntu 3
Ntu 3
Ntu 3
Ntu 3
Ntu 3

Txiav tawm 9 ntu los ntawm "Segment 3" template txuas tawm ntawm 3/8 hauv. Tuab ntoo ntoo (pom hauv qib 26). Kuaj lawv kom cov nqaws los ntawm Ntu 2 nyob hauv nruab nrab ntawm txhua ntu 3. Qhov no yuav ntxiv dag zog rau lub nplhaib.

Kauj Ruam 16: Ntiv Nplhaib thiab Xim

Ntiv Nplhaib thiab Xim
Ntiv Nplhaib thiab Xim
Ntiv Nplhaib thiab Xim
Ntiv Nplhaib thiab Xim

Kuv tau ua qhov kev cai sanding thaiv tawm ntawm qhov txiav tawm ntawm lub nplhaib loj. Xuab zeb sab hauv thiab sab nraud ntawm lub nplhaib thiab sau cov kab nrib pleb uas tej zaum yuav tshwm sim thaum txheej txheej nplaum.

Thaum du, siv ob peb lub tsho xim dub thiab lub tsho ntshiab.

Kauj Ruam 17: Txiav Acrylic

Txiav Acrylic
Txiav Acrylic
Txiav Acrylic
Txiav Acrylic
Txiav Acrylic
Txiav Acrylic
Txiav Acrylic
Txiav Acrylic

Txiav cov acrylic rau ib lub xwmfab ntsuas 30 x 30 nyob rau hauv. Thiab kos rau hauv nruab nrab. Txuas cov acrylic nrog daim kab xev ob tog. Siv cov yaug dej tshem tawm cov ntoo me ntsis, tshem cov acrylic ntau dhau

Kauj Ruam 18: Siv Qhov Ncauj Tint

Siv Qhov Ncauj Tint
Siv Qhov Ncauj Tint
Siv Qhov Ncauj Tint
Siv Qhov Ncauj Tint
Siv Qhov Ncauj Tint
Siv Qhov Ncauj Tint

Hauv ib puag ncig tsis muaj hmoov av, tshem cov zaj duab xis tiv thaiv los ntawm acrylic. Thov tshuaj tsuag thiab tshem tawm qhov thaub qab ntawm lub qhov rais tint. Siv lub qhov rai tint nplaum sab. Siv lub tshuab ntxhua khaub ncaws lossis daim npav rho nyiaj, nyem tawm tag nrho cov kua los ntawm lub qhov rai xim. Thaum tag nrho cov npuas thiab cov pob tw tau raug tshem tawm, txiav qhov ntau dhau ntawm lub qhov rais tint siv rab riam ntse.

Kauj ruam 19: Txuas Defuser

Txuas Defuser
Txuas Defuser
Txuas Defuser
Txuas Defuser

Kuv siv daim ntawv tua tsiaj loj los ua tus defuser. Muab daim ntawv tso rau ntawm qhov chaw tiaj. Npog lub ntsej muag ntawm lub thav duab nrog kua nplaum los ntawm cov kua nplaum. Ua ntej cov kua nplaum qhuav, nteg lub hauv ntej ntawm lub ntsej muag rau ntawm daim ntawv thiab ntxhib txiav qhov tshaj. Thaum qhuav tas lawm, siv rab riam ntse los txhuam cov yaug dej.

Kauj Ruam 20: Siv Rwb Thaiv Tsev

Siv Rwb Thaiv Tsev
Siv Rwb Thaiv Tsev

Kuv siv daim kab xev hluav taws xob los khaws lub zog thiab cov ntaub ntawv kab sib cais.

Kauj ruam 21: Sib sau ua ke

Sib sau ua ke
Sib sau ua ke
Sib sau ua ke
Sib sau ua ke
Sib sau ua ke
Sib sau ua ke

Tshem tawm lwm txheej tiv thaiv los ntawm acrylic. Muab cov acrylic tso rau hauv lub nplhaib nrog lub qhov rai tint sab. Xaub qhov seem ntawm lub moos rau hauv lub nplhaib. Siv lub clamp txhawm rau siv lub teeb siab thaum lub qhov drilled los ntawm lub nplhaib thiab rau hauv pawg thawj coj saib LED. Qhov no yuav tsum yog kwv yees li 1 1/8 nyob rau sab qab teb. Ceev faj tsis txhob tho rau hauv LED. Ntsia lub taub hau taub hau ntswj rau hauv lub qhov. Rov ua dua tag nrho yim qhov ntsia hlau nyob ib puag ncig ntawm lub moos.

Kauj Ruam 22: Txuas Cov Ntsiab Lus Ntsiab Lus

Txuas Cov Ntsiab Lus Ntsiab Lus
Txuas Cov Ntsiab Lus Ntsiab Lus

Cov kua nplaum taw tes rau sab nraum qab ntawm lub moos rau sab nraub qaum los txuas rau. Cov no yog 3/4 hauv. Tuab thiab kwv yees li 2 nyob rau hauv.

Kauj Ruam 23: Laum Fais Fab thiab LDR Sensor Qhov

Laum Fais Fab thiab LDR Sensor Qhov
Laum Fais Fab thiab LDR Sensor Qhov

Laum lub qhov fais fab hla hauv qab ntawm lub moos rau lub hwj chim ntsaws thiab lub qhov nyob rau sab saum toj rau lub teeb nyob ntawm tus tiv thaiv (LDR) sensor.

Kauj Ruam 24: Nruab Cov Khoom Siv Hluav Taws Xob

Nruab Cov Khoom Siv Hluav Taws Xob
Nruab Cov Khoom Siv Hluav Taws Xob
Nruab Cov Khoom Siv Hluav Taws Xob
Nruab Cov Khoom Siv Hluav Taws Xob

Txhim kho lub tshuab luam ntawv 3D rau RTC thiab Arduino Nano. Txuas txhua yam khoom siv hluav taws xob raws li qhia hauv kab lus.

Kauj Ruam 25: Rov Qab Npog

Rov Qab Npog
Rov Qab Npog
Rov Qab Npog
Rov Qab Npog
Rov Qab Npog
Rov Qab Npog
Rov Qab Npog
Rov Qab Npog

Txiav lub nraub qaum los ntawm plywood nyias tsuas yog me dua sab nraum lub moos. Laum qhov rau cov ntsiab lus thauj tog rau nkoj. Nrhiav qhov chaw nruab nrab ntawm nraub qaum thiab ntsuas tawm 8 ntiv tes hauv ob qho tib si los txiav cov qhov (qhov qauv 16 hauv cov chaw rau cov pob zeb hauv Asmeskas). Kuv drilled lub qhov loj tsuas yog loj dua lub taub hau ntawm cov ntsia hlau Kuv yuav siv thiab foob lub qhov loj dua hauv ib qho kev taw qhia. Xim dub thiab muab lub hau npog tso rau qhov chaw.

Kauj Ruam 26: Cov Cai thiab Cov Ntaub Ntawv

Ib zaug ntxiv, Kuv yog qhov tshiab los siv ntau ntawm Arduino cov tsev qiv ntawv siv ntawm no yog li kuv paub tseeb tias muaj txoj hauv kev zoo dua los siv lawv.

Kuv tau sau cov cai kom hloov pauv tau yooj yim raws li muaj pes tsawg LEDs koj siv yog tias txoj haujlwm raug txo qis lossis qis. Txhua yam koj yuav tsum tau ua yog hloov kho LED pib thiab xaus txoj haujlwm nrog rau pes tsawg LEDs yog ib feem ntawm txhua tus lej.

Kuv tau ntxiv qee qhov kev ua yeeb yaj kiab uas ua si thaum pib zoo li ntawm teev. Lawv yog sudo random raws li lub tshuab hluav taws xob tus lej nws muaj nyob hauv nkoj.

Koj tuaj yeem teeb tsa lub moos mus los ntawm cov xim lossis nyob zoo li qub ntawm ib qho. Koj tuaj yeem tseem hais qhia tus lej cim kom pab nyeem sijhawm raws li qhia hauv kev qhia.

Xav tias dawb los kho thiab hloov cov cai raws li koj xav tau.

#suav nrog "RTClib.h"

#suav nrog #define NUM_LEDS 96 #define DATA_PIN 3 #define LDR A0 RTC_DS1307 rtc; boolean timeChange = tsis tseeb; boolean printTime = tsis tseeb; // Teeb kom raug yog tias koj xav pom cov zis hauv lub console. Pab tau rau debugging. boolean redDown = tseeb; boolean greenDown = tsis tseeb; boolean blueDown = tsis tseeb; boolean cycle = cuav; // Teem qhov tseeb yog tias koj xav kom lub moos xim hloov mus rau boolean highlight = tseeb; // Teeb qhov tseeb kom pom tseeb 'tus lej kawg'. // Cov chaw pib thiab xaus ntawm txhua pab pawg ntawm lub sijhawm ua rau SECOND_1_LOCATION = 0; const int HOUR_2_START_LOCATION = 1; const int HOUR_2_END_LOCATION = 8; const int HOUR_1_START_LOCATION = 9; const int HOUR_1_END_LOCATION = 20; const int MINUTE_2_START_LOCATION = 21; const int MINUTE_2_END_LOCATION = 42; const int MINUTE_1_START_LOCATION = 43; const int MINUTE_1_END_LOCATION = 66; const int SECOND_2_START_LOCATION = 67; const int SECOND_2_END_LOCATION = 95; const int LEDS_PER_HOUR_1 = 3; const int LEDS_PER_HOUR_2 = 2; const int LEDS_PER_MINUTE_1 = 6; const int LEDS_PER_MINUTE_2 = 2; // Multipliers siv los faib lub sijhawm sib koom ua ke MULTIPLIER_FIVE = 5; const int MULTIPLIER_TWO = 2; const int START_UP_DELAY = 1; // Hloov qhov no kom nrawm lossis qeeb qeeb pib ua kom muaj kev cuam tshuam CYCLE_SPEED = 1; // Hloov tus nqi ntawm no rau lub voj voog hloov xim (yuav tsum siab dua 1) // Tshaj tawm qhov hloov pauv int lastSecond = 0; int currentHour = 0; int tam sim noMinute = 0; int tam sim noSecond = 0; teev 1 = 0; int teev 2 = 0; int feeb1 = 0; feeb feeb2 = 0; int thib ob1 = 0; int thib ob = 0; int cycleCount = 1; ntab fadeValue = 255; ntab fadeCheck = 255; uint8_t ci = 255; int numberOfAnimations = 5; int randomness = 0; // Teeb Xim uint8_t liab = 0; uint8_t ntsuab = 0; uint8_t xiav = 255; uint8_t highlight_red = 60; uint8_t highlight_green = 60; uint8_t highlight_blue = 255; // Txhais cov kab ntawm leds CRGB leds [NUM_LEDS]; teeb tsa tsis muaj dab tsi () {Serial.begin (19200); FastLED.addLeds (leds, NUM_LEDS); LEDS.setBrightness (ci); FastLED.clear (); rtc.begin (); // Kab lus tsis pom zoo hauv qab no kom teem sijhawm. // rtc.adjust (DateTime (2020, 2, 19, 23, 59, 50)); // rtc.adjust (DateTime (F (_ DATE_), F (_ TIME_)))); // Pib pib ua yeeb yaj kiab animate (randomness); } void loop () {// Tau txais sijhawm DateTime tam sim no = rtc.now (); currentHour = tam sim no.hour (); currentMinute = tam sim no.minute (); currentSecond = tam sim no.second (); timeChange = tsis tseeb; // Siv cov no los teeb tsa lub sijhawm yam tsis muaj RTC. Pab tau rau kev debugging // currentHour = 5; // currentMinute = 30; // currentSecond = 30; // Rov pib dua txhua qhov khoom rau xoom rau (int i = SECOND_1_LOCATION; kuv <= SECOND_2_END_LOCATION; i ++) {leds = CRGB:: Dub; } // Teev Sijhawm // Teev teev 1 teev 1 = (tam sim noHour % MULTIPLIER_FIVE) * LEDS_PER_HOUR_1; // Qhov no yuav suav tag nrho LEDs ntawm lub sijhawm ua kom pom kev rau (int i = HOUR_1_START_LOCATION; i 0) // && hour1 <12) {rau (int i = (HOUR_1_START_LOCATION + hour1 - 1); i> = (HOUR_1_START_LOCATION + teev 1-LEDS_PER_HOUR_1); i--) {leds = CRGB (highlight_red, highlight_green, highlight_blue); }} // Teev teev 2 hour2 = (currentHour / MULTIPLIER_FIVE) * LEDS_PER_HOUR_2; // Qhov no yuav suav tag nrho LEDs ntawm lub sijhawm ua kom pom kev rau (int i = HOUR_2_START_LOCATION; i 0) // && hour2 <8) {rau (int i = (HOUR_2_START_LOCATION + hour2 - 1); i> = (HOUR_2_START_LOCATION + teev 2-LEDS_PER_HOUR_2); i--) {leds = CRGB (highlight_red, highlight_green, highlight_blue); }} // Teeb feeb // Teeb feeb 1 feeb1 = (currentMinute % MULTIPLIER_FIVE) * LEDS_PER_MINUTE_1; // Qhov no yuav suav tag nrho LEDs ntawm lub sijhawm ua kom pom kev rau (int i = MINUTE_1_START_LOCATION; i 0) // && minute1 <24) {rau (int i = (MINUTE_1_START_LOCATION + minute1 - 1); i> = (MINUTE_1_START_LOCATION + feeb1-LEDS_PER_MINUTE_1); i--) {leds = CRGB (highlight_red, highlight_green, highlight_blue); }} // Teeb feeb 2 feeb2 = (tam sim noMinute / MULTIPLIER_FIVE) * LEDS_PER_MINUTE_2; // Qhov no yuav suav tag nrho LEDs ntawm lub sijhawm ua kom pom kev rau (int i = MINUTE_2_START_LOCATION; i 0) // && minute2 <22) {rau (int i = (MINUTE_2_START_LOCATION + minute2 - 1); i> = (MINUTE_2_START_LOCATION + feeb2-LEDS_PER_MINUTE_2); i--) {leds = CRGB (highlight_red, highlight_green, highlight_blue); }} // Teeb thib ob yog (currentSecond! = LastSecond) {timeChange = tseeb; } // Teeb tsa thib 1 thib ob1 = tam sim noSecond % MULTIPLIER_TWO; yog (thib ob == 1) {leds [SECOND_1_LOCATION] = CRGB (liab, ntsuab, xiav); } // Teeb tsa thib ob thib ob2 = currentSecond / MULTIPLIER_TWO; rau (int i = SECOND_2_START_LOCATION; i 0) // && second2 <29) {rau (int i = (SECOND_2_START_LOCATION + second2 - 1); i> = (SECOND_2_START_LOCATION + second2 - 1); i--) {leds = CRGB (highlight_red, highlight_green, highlight_blue); }} lastSecond = tam sim noSecond; // Suav cov voj voog ntawm txoj haujlwm thiab hu rau setColor kom hloov xim ntawm LEDs puas tau CYCLE_SPEED mus. yog (cycleCount ci) // {// fadeValue = ci; //} // else if (fadeValue <150) // {// fadeValue = 150; //} // LEDS.setBrightness (fadeValue); FastLED.show (); // Luam lub sijhawm tam sim no rau lub console yog (timeChange == tseeb && printTime == tseeb) {printToConsole (); }} // Animation muaj nuj nqi ntxiv ntau cov duab ntawm no raws li koj xav tau void animate (int xaiv) {yog (xaiv == 0) {rau (int i = SECOND_1_LOCATION; kuv <= SECOND_2_END_LOCATION; i ++) {leds = CRGB (liab, ntsuab, xiav); FastLED.show (); ncua (START_UP_DELAY); } rau (int i = SECOND_2_END_LOCATION; i> = SECOND_1_LOCATION; i--) {leds = CRGB:: Dub; FastLED.show (); ncua (START_UP_DELAY); }} lwm qhov yog (xaiv == 1) {rau (int i = 0; i <250; i ++) {int teeb = random (95); leds [lub teeb] = CRGB (liab, ntsuab, xiav); FastLED.show (); }} ntxiv yog (xaiv == 2) {leds [0] = CRGB (liab, ntsuab, xiav); rau (int i = 0; i <= SECOND_2_END_LOCATION - SECOND_2_START_LOCATION; i ++) {leds [SECOND_2_START_LOCATION+i] = CRGB (liab, ntsuab, xiav); yog (kuv <= (MINUTE_1_END_LOCATION - MINUTE_1_START_LOCATION)) {leds [MINUTE_1_START_LOCATION + i] = CRGB (liab, ntsuab, xiav); } yog (kuv <= (MINUTE_2_END_LOCATION - MINUTE_2_START_LOCATION)) {leds [MINUTE_2_START_LOCATION + i] = CRGB (liab, ntsuab, xiav); } yog (i <= (HOUR_1_END_LOCATION - HOUR_1_START_LOCATION)) {leds [HOUR_1_START_LOCATION + i] = CRGB (liab, ntsuab, xiav); } yog (kuv <= (HOUR_2_END_LOCATION - HOUR_2_START_LOCATION)) {leds [HOUR_2_START_LOCATION + i] = CRGB (liab, ntsuab, xiav); } ncua (34); FastLED.show (); }} ntxiv yog (xaiv == 3) {leds [0] = CRGB (liab, ntsuab, xiav); rau (int i = 0; i <= SECOND_2_END_LOCATION - SECOND_2_START_LOCATION; i ++) {leds [SECOND_2_END_LOCATION - i] = CRGB (liab, ntsuab, xiav); yog (kuv <= (MINUTE_1_END_LOCATION - MINUTE_1_START_LOCATION)) {leds [MINUTE_1_END_LOCATION - i] = CRGB (liab, ntsuab, xiav); } yog (kuv <= (MINUTE_2_END_LOCATION - MINUTE_2_START_LOCATION)) {leds [MINUTE_2_END_LOCATION - i] = CRGB (liab, ntsuab, xiav); } yog (i <= (HOUR_1_END_LOCATION - HOUR_1_START_LOCATION)) {leds [HOUR_1_END_LOCATION - i] = CRGB (liab, ntsuab, xiav); } yog (kuv <= (HOUR_2_END_LOCATION - HOUR_2_START_LOCATION)) {leds [HOUR_2_END_LOCATION - i] = CRGB (liab, ntsuab,xiav); } ncua (34); FastLED.show (); }} lwm qhov yog (xaiv == 4) {rau (int i = SECOND_2_END_LOCATION; i> = SECOND_1_LOCATION; i--) {leds = CRGB:: Dub; } FastLED.show (); ncua (200); rau (int i = SECOND_1_LOCATION; kuv <= SECOND_2_END_LOCATION; i ++) {leds = CRGB (liab, ntsuab, xiav); } FastLED.show (); ncua (200); rau (int i = SECOND_2_END_LOCATION; i> = SECOND_1_LOCATION; i--) {leds = CRGB:: Dub; } FastLED.show (); ncua (200); rau (int i = SECOND_1_LOCATION; kuv <= SECOND_2_END_LOCATION; i ++) {leds = CRGB (liab, ntsuab, xiav); } FastLED.show (); ncua (200); rau (int i = SECOND_2_END_LOCATION; i> = SECOND_1_LOCATION; i--) {leds = CRGB:: Dub; } FastLED.show (); ncua (200); }} // Xim kev caij tsheb kauj vab tsis muaj dab tsi setColor (boolean cycleColors) {yog (cycleColors == muaj tseeb) {yog (redDown == muaj tseeb && greenDown == tsis tseeb) {liab ++; ntsuab-; yog (ntsuab <= 0) {liab = 255; redDown = tsis tseeb; greenDown = tseeb; }} lwm yog (greenDown == muaj tseeb && blueDown == tsis tseeb) {ntsuab ++; xiav-; yog tias (xiav <= 0) {ntsuab = 255; greenDown = tsis tseeb; blueDown = tseeb; }} lwm tus yog (blueDown == muaj tseeb && redDown == tsis tseeb) {xiav ++; liab-; yog tias (liab <= 0) {xiav = 255; blueDown = tsis tseeb; redDown = tseeb; }}} lwm {liab = 0; ntsuab = 0; xiav = 255; }} // Sau rau Serial Monitor ua haujlwm tsis muaj dab tsi printToConsole () {Serial.print ("Lub Sijhawm Tam Sim No:"); Serial.print (currentHour); Serial.print (":"); Serial.print (currentMinute); Serial.print (":"); Serial.println (tam sim noSecond); Serial.println (""); rau (int i = HOUR_2_START_LOCATION; kuv <= HOUR_2_END_LOCATION; i ++) {Serial.print (leds ); yog (i % 2 == 0) {Serial.print (""); }} Serial.println (""); rau (int i = HOUR_1_START_LOCATION; kuv <= HOUR_1_END_LOCATION; i ++) {Serial.print (leds ); yog (((i - HOUR_1_START_LOCATION + 1) % 3) == 0) {Serial.print (""); }} Serial.println (""); rau (int kuv = MINUTE_2_START_LOCATION; kuv <= MINUTE_2_END_LOCATION; i ++) {Serial.print (leds ); yog (((kuv - MINUTE_2_START_LOCATION) + 1) % 2 == 0) {Serial.print (""); }} Serial.println (""); rau (int kuv = MINUTE_1_START_LOCATION; kuv <= MINUTE_1_END_LOCATION; i ++) {Serial.print (leds ); yog (((kuv - MINUTE_1_START_LOCATION) + 1) % 6 == 0) {Serial.print (""); }} Serial.println (""); rau (int kuv = SECOND_2_START_LOCATION; kuv <= SECOND_2_END_LOCATION; kuv ++) {Serial.print (leds ); Serial.print (""); } Serial.println (""); Serial.println (coj [SECOND_1_LOCATION]); Serial.println (); rau (int kuv = 0; kuv <NUM_LEDS; kuv ++) {Serial.print (leds ); } Serial.println (); Serial.println (); }

Kauj ruam 27: Txaus siab rau

Duab
Duab

Hauv qhov xaus, lub moos no zoo saib thiab thaum koj tau dai nws, nws yooj yim nyeem. Yog tias koj ua koj tus kheej lub sijhawm ua haujlwm, qhia rau kuv paub!

Pom zoo: