Cov txheej txheem:

Lub Sijhawm Nyob: 5 Kauj Ruam
Lub Sijhawm Nyob: 5 Kauj Ruam

Video: Lub Sijhawm Nyob: 5 Kauj Ruam

Video: Lub Sijhawm Nyob: 5 Kauj Ruam
Video: ICU Vol.5 - 07 Lub tshav rog 2024, Hlis ntuj nqeg
Anonim
Sijhawm Nyob
Sijhawm Nyob

Ua ke cov khawv koob ntawm kev saib tag nrho Harry Potter cov yeeb yaj kiab hauv ib lub lim tiam thiab lub sijhawm sib tham TTL (Lub Sijhawm Nyob), peb yuav tsim peb tus kheej phau ntawv khawv koob dub, qhia tias koj yuav tsum nyob ntev npaum li cas.

Khoom siv

  • Raspberry Pi 3 Qauv B.
  • Laub Khawm (ib qho)
  • Adafruit Standard LCD - 16x2 Dawb rau Xiav
  • Nrov 4300
  • Bookbinders Nplaum
  • Hluav Taws

Kauj ruam 1: Project Video

Image
Image

Kauj ruam 2: Phau ntawv

Phau ntawv
Phau ntawv
Phau ntawv
Phau ntawv
Phau ntawv
Phau ntawv

Nws pib nrog nrhiav phau ntawv qub los siv. Xyuas kom nws zoo thiab tuab yog li koj muaj chaw txaus rau cov khoom siv hluav taws xob. Ib qhov chaw zoo los saib yog cov khw muag khoom noj khoom haus, lawv muaj cov phau ntawv qub pheej yig. Hauv qhov no kuv tau pom phau ntawv kho mob los ntawm 80's. Zoo meej, vim nws muaj ntau cov duab txias los siv rau kev ua kom zoo nkauj.

Tam sim no peb muaj peb phau ntawv, peb yuav lo rau ntau nplooj ntawv ua ke los tsim qhov "thaiv" zoo. Kuv tau siv qee phau ntawv nplaum vim tias nws qhuav zoo thiab pom los ntawm. Kuv xav tias koj tseem tuaj yeem siv hom sib txawv, tab sis kuv tsis tau sim nws. Muab qee cov kua nplaum tso rau ntawm nplooj ntawv thiab nias lawv khov kho.

Txhawm rau ua kom nrawm dua koj tuaj yeem ua kua nplaum ob sab ua ke, ua ke ntawm qhov no thiab tag nrho nplooj ntawv gluing tsim cov khoom thaiv.

Tom qab ziab, nws yog lub sijhawm los txiav tawm peb cov khoom siv hluav taws xob, Dremel nrog lub tshuab txiav ntoo ua haujlwm zoo kawg nkaus. Nco ntsoov hnav qee qhov kev tiv thaiv, nws tsim cov hmoov av ntau.

Qhov ntawd yog ib qho chaw zoo, tsuas yog ntxiv qee cov kab xev ntxiv rau lub zog. Cov lus qhia tag nrho rau kev tsim phau ntawv zais cia, tuaj yeem pom ntawm no.

Cov kauj ruam tom ntej yog ntxiv "lub hau" rau peb qhov chaw. Gluing qee nplooj ntawv ua ke muab lub hauv paus rau peb. Ntxiv cov hlau nplaum txhais tau tias peb tuaj yeem qhib thiab kaw peb lub hauv paus. Qhov tawm me ntsis me me thiab lo ob qho tib si cov hlau nplaum (nyob ib sab ntawm peb qhov chaw) thiab phaj hlau (hauv qab ntawm lub hau) hauv qhov chaw.

Nrog peb lub thawv thiab lub hau nyob hauv qhov chaw, peb phau ntawv yuav luag tiav. Txhawm rau muab nplooj ntawv pom sab xis (txaus ntshai) saib thiab hnov koj tuaj yeem ua cov hauv qab no:

  • Txiav thiab gluing cov duab ntawm nplooj ntawv (pob txha taub hau thiab nroj tsuag hauv qhov no)
  • Hlawv cov duab/nplooj ntawv thiab tso lawv rau hauv dej
  • Txiav ib kab lus rau hauv nplooj ntawv thiab hla nws nrog hluav ncaig
  • Lwm yam uas los rau hauv siab, koj tuaj yeem mus ceev …

Kauj ruam 3: Electronics

Tam sim no peb tuaj yeem txav mus rau cov khoom siv hluav taws xob. Peb yuav xav tau cov hauv qab no:

  • Raspberry Pi (Arduino,…)
  • Lub laub khawm (ib qho)
  • LCD me me
  • Powerbank lossis Powerplug

Nov yog ob qho kev qhia zoo los xaim lub pob thiab tshuaj ntsuam. Nrog txhua yam txuas nrog, ntsuas lub khawm/tshuaj ntsuam thiab txiav qhov rau hauv lub hau kom haum zoo.

Kauj ruam 4: Code

Yuav luag muaj!

Qhov tsuas yog tshuav yog cov khawv koob. Koj tuaj yeem pom tag nrho cov cai hauv cov ntawv txuas. Rau kev ntsuas zoo, ua kom pom sai ntawm cov laj thawj:

  • Mloog yog khawm raug thawb
  • Yog tias yog, tsim lub sijhawm (tus lej thib ob) thiab tso saib nws
  • Khawm tsis raug thawb, txheeb xyuas yog lub sijhawm yog 0 Yog tias muaj sijhawm nyob, txo nws los ntawm ib qho, thiab tso saib dab tsi sab laug.
  • Tsis muaj sijhawm nyob ntxiv, hais Bye Bye

Koj tuaj yeem hloov kho lub sijhawm koj muab rau cov tsis muaj hmoo hauv kab ntawv hauv qab no:

tooj = random.randint (1, 60)

Koj tseem tuaj yeem hloov cov lus pom hauv kab no:

lcdShowMessage ("Sijhawm Nyob", lcdLine1)

lcdShowMessage ("Bye Bye", lcdLine2) lcdShowMessage (str (tus lej), lcdLine2)

Kauj ruam 5: Qhov tshwm sim

Qhov tshwm sim
Qhov tshwm sim

Thiab tag nrho cov!

Tam sim no peb muaj phau ntawv khawv koob, zoo tshaj rau Xus thaum ntxov!

Pom zoo: