Cov txheej txheem:

SmartClock: 6 Kauj Ruam
SmartClock: 6 Kauj Ruam

Video: SmartClock: 6 Kauj Ruam

Video: SmartClock: 6 Kauj Ruam
Video: Tshuav 6 Lub Hlis (A HeartBreaking Story That Will Make You Cry) 2024, Kaum ib hlis
Anonim
SmartClock
SmartClock
SmartClock
SmartClock
SmartClock
SmartClock

SmartClock, tsis yog lub moos xwb, nws tseem yog txoj hauv kev yooj yim los saib hauv social media txheeb cais, thiab huab cua.

Koj tuaj yeem txuas rau facebook, thiab tau txais koj nyiam, lossis txuas rau soundcloud thiab ua rau koj cov thwjtim tshwm sim nyob! Qhov tsuas yog koj yuav tsum tau ua, kom pom qhov no, yog nias lub pob hom.

Muaj ntau qhov ntsuas ntawm cov cuab yeej no, uas tas li khaws cov ntaub ntawv thiab khaws cov ntaub ntawv ntawd hauv cov ntaub ntawv khaws tseg. Koj tuaj yeem saib cov ntaub ntawv no, ntawm daim duab zoo ntawm lub vev xaib.

Koj tseem tuaj yeem ua suab paj nruag, uas koj xaiv ntawm chav tsev, lossis hauv lub vev xaib.

Khoom siv

- Raspberri Pib

- Arduino Ib

- Hais lus nrog ampilifier

- 4*7 ntu zaub

- TSH 11

LM35 (yeem)

- LDR Dr.

PIB 3008

- 16x2 LCD Zaub

- 5 Qhov Qhib Qhib Monostable Li Qub

- Resistors 100k, 220, 1k thiab 5k

- Lub hwj chim

- Ntau tus jumper cables, txiv neej/poj niam thiab poj niam/poj niam

Kauj Ruam 1: DHT 11 Pinout

DHT 11 Pinout
DHT 11 Pinout
DHT 11 Pinout
DHT 11 Pinout
DHT 11 Pinout
DHT 11 Pinout

Muaj 2 hom DHT11. Depending ntawm cov version koj yuav, koj yuav muaj 3 lossis 4 tus pin.

Vcc mus rau 3.3V, teeb liab mus rau GPIO4 Yog tias koj tau txais 4pin version, koj yuav tsum tso 4k7 resistor nyob nruab nrab ntawm vcc thiab tus pin teeb liab. Yog tias koj tau txais 3pin version, koj zoo mus.

Kauj Ruam 2: MCP3008 Nrog LDR, LM35 thiab Pulldown Switches

MCP3008 Nrog LDR, LM35 thiab Pulldown Switches
MCP3008 Nrog LDR, LM35 thiab Pulldown Switches
MCP3008 Nrog LDR, LM35 thiab Pulldown Switches
MCP3008 Nrog LDR, LM35 thiab Pulldown Switches
  • VDD - 3.3V
  • Lub hwj chim - 3.3V
  • AGND - Hauv av
  • CLK - GPIO 9
  • DOUT - GPIO MISO
  • DIN - GPIO MOSI
  • TSO - CS0
  • DGND - Hauv av

CH0 mus nruab nrab ntawm 10k Resistor thiab ldr

CH1 mus rau tus pin nruab nrab ntawm Lm35

Kauj Ruam 3: LCD Zaub

Zaub Zaub
Zaub Zaub

Txhawm rau kom koj lub LCD zaub ua haujlwm, txuas thawj tus pin rau hauv av, thiab qhov thib ob rau +5V. Thib tus pin yuav tsum txuas nrog lub 5k resistor rau hauv av, lossis lub zog yog tias koj xav hloov qhov ci ci.

RS tus pin mus rau GPIO22, RW ncaj qha mus rau gnd ib yam. Txij ntawm no mus, koj yuav tsum pom kab ntawm cov duab plaub dub ntawm koj cov zaub. tam sim no tsuas yog txuas 8 tus pin cov ntaub ntawv rau GPIO pins koj muaj dawb thiab txuas LED+ rau 5v, LED- rau hauv av.

Kauj Ruam 4: 4*7 Segment Display

4*7 Segment Zaub
4*7 Segment Zaub

Koj cov zaub tuaj yeem yog anode / cathode ntau. Qhov no tsis muaj teeb meem li cas koj txuas nws, tab sis nws yog qhov zoo kom paub tias koj muaj hom twg. Nco ntsoov khaws RX0 tus pin dawb, vim peb yuav xav txuas qhov no rau TX0 ntawm RPI. Tus so ntawm kev sib txuas tsis muaj teeb meem, raws li cov cai tau sau tom qab.

Kauj Ruam 5: Kev tsim kho

Kev tsim kho
Kev tsim kho
Kev tsim kho
Kev tsim kho

Txhawm rau tsim qhov teeb tsa no ntawm daim ntawv qhia zaub mov, koj xav tau ntau qhov chaw. Kuv xav kom, muab tshuaj txhuam MCP nrog LM35 thiab al resistors ntawm daim ntawv xeem, thiab ntxiv qee lub taub hau. Txoj kev no, koj tuaj yeem txuas nws nrog ob peb tus poj niam/poj niam jumper xov hlau. Nco ntsoov txuas raspberri thiab thaj chaw arduino. Ceev faj tsis txhob sib xyaw 3.3V nrog 5V

Kauj ruam 6: Software

Software
Software
Software
Software

Kuv siv Python, nrog hwj rau backend. Html, css/tsawg & javascript raws li frontend thiab arduino code rau arduino.

Kuj tseem muaj cov ntaub ntawv khaws cia ntawm Raspberry pi uas txuag cov ntaub ntawv ntsuas, nrog rau lub tswb uas koj tau teeb tsa thiab cov ntaub ntawv siv. Cov ntaub ntawv no tau khiav ntawm MariaDB server. Cov lus nug kom tau txais cov ntaub ntawv tawm ntawm no tau sau rau hauv kuv lub nraub qaum, hauv nab hab sej. Qhov no hloov cov ntaub ntawv mus rau json ntawm kev cai kawg. Peb tuaj yeem tau txais cov ntaub ntawv ntawd hauv peb qhov kawg-kawg los ntawm kev xa GET thov mus rau peb lub nraub qaum. Ntawm no peb tuaj yeem ua txhua yam peb xav tau nrog cov ntaub ntawv. Kuv xaiv rau kab ntawv, ua los ntawm chart.js, uas yog javascript txuas ntxiv.

Pom zoo: