Cov txheej txheem:

JAWS: Tsuas yog Lwm Qhov Chaw Huab Cua: 6 Kauj Ruam
JAWS: Tsuas yog Lwm Qhov Chaw Huab Cua: 6 Kauj Ruam

Video: JAWS: Tsuas yog Lwm Qhov Chaw Huab Cua: 6 Kauj Ruam

Video: JAWS: Tsuas yog Lwm Qhov Chaw Huab Cua: 6 Kauj Ruam
Video: ICU Kub Vaj - Leej Twg Hais Cia (Cover Video) Hmong Song 2023 2024, Kaum ib hlis
Anonim
JAWS: Npaj Peb Cov Khoom Npaj
JAWS: Npaj Peb Cov Khoom Npaj
JAWS: Npaj Peb Cov Khoom Npaj
JAWS: Npaj Peb Cov Khoom Npaj
JAWS: Npaj Peb Cov Khoom Npaj
JAWS: Npaj Peb Cov Khoom Npaj

Nws yog qhov yooj yim heev los ua JAWS.

Koj tau txais koj lub ntsuas cua, koj muab lawv tso ua ke ntawm cov laug cam, thiab koj pib siv cov tsev qiv ntawv uas los nrog lub ntsuas cua.

Cia peb pib nrog kev teeb tsa ntawm qhov program.

Txij li thaum kuv hais lus Dutch (tus neeg hais lus ib txwm) txhua cov ntaub ntawv thiab ntau qhov kev hloov pauv uas kuv siv yog hauv Dutch. Yog li tam sim no koj muaj sijhawm los kawm lwm yam lus …

Peb xav tau dab tsi los ntawm JAWS?

Yooj yim: peb xav saib lub vijtsam uas qhia peb lub sijhawm tiag, hnub tim, ephemerides (hnub tuaj, hnub poob, ntev ntawm hnub thiab yav tav su lub hnub qub).

Ib sab ntawm qhov ntawd, nws yuav yog qhov zoo kom pom sab hauv thiab sab nraud qhov kub thiab txias, txheeb ze ze thiab huab cua siab.

Txhawm rau ua kom yooj yim dua, kuv siv centigrades rau qhov kub thiab hPa (= mBar) rau qhov ntsuas siab. Yog li tsis muaj leej twg yuav tsum rov qab los ntawm Fahrenheit lossis phaus ib square furlongs …

Lub sijhawm no, tsuas yog cov ntaub ntawv no muaj…

Yav tom ntej, Kuv yuav ntxiv Cua nrawm, cua qhia thiab nag lossis daus.

Lub tswv yim yog tias kuv yuav muaj lub tsev pheeb suab sab nraud thiab txhua cov ntaub ntawv yuav raug xa hla 2.4GHz mus rau chav nyob sab hauv tsev.

Kauj Ruam 3: JAWS: Software

JAWS: Software
JAWS: Software

Txhawm rau mus rau peb cov software, feem ntau tuaj yeem pom nrog cov tsev qiv ntawv uas twb muaj lawm.

Hauv JAWS Kuv siv cov hauv qab no:

  1. SPI.h: Thawj lub tsev qiv ntawv los ntawm Arduino rau 4 xaim raws tu qauv. Nws nws tau siv rau TFT-ntaub thaiv npog
  2. Adafruit_GFX.h thiab MCUfriend_kbv.h: ob qho tib si siv rau cov duab thiab tshuaj ntsuam. Cov no ua rau nws yooj yim heev los sau cov ntawv, kos kab thiab lub thawv ntawm TFT-screen.
  3. dht.h: rau peb DHT's: lub tsev qiv ntawv no tuaj yeem siv rau DHT11 (xiav xiav) thiab DHT22.
  4. Wire.h: Arduino lub tsev qiv ntawv los ua kev sib txuas lus yooj yim. Nws tau siv rau lub moos thiab SD daim npav.
  5. SD.h: Ib zaug ntxiv Arduino thawj, los sau thiab nyeem los ntawm daim npav SD.
  6. TimeLord.h: qhov no kuv siv rau khaws lub sijhawm, suav hnub poob lossis hnub nce los ntawm ib qho chaw nyob. Nws tseem teev sijhawm rau DST (lub caij ntuj sov lossis caij ntuj no).

Cia peb pib nrog lub moos.

Thaum nyeem lub moos, koj xav tau qhov sib txawv uas koj tau txais los ntawm kev sau npe sib txawv hauv lub moos qauv. Thaum peb ua rau lawv ntau dua li tus lej, peb tuaj yeem siv kab hauv qab no:

const int DS1307 = 0x68; const char* days = {"Zo.", "Ma.", "Di.", "Wo.", "Do.", "Vr.", "Za."};

const char* hli = {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11 "," 12 "}; ib.

n

Nrog TimeLord, peb tau txais qhov no raws li cov ntaub ntawv, rau kuv qhov chaw: (Lokeren, Belgium)

TimeLord Lokeren; teeb tsa Lokeren. Position (51.096, 3.99); latitude thiab latitude

Lokeren. TimeZone (+1*60); GMT +1 = +1 x 60 feeb

Lokeren. DstRules (3, 4, 10, 4, 60); DST txij lub hli thib 3, lub lim tiam thib 4 txog rau 10 lub hlis, plaub lub lim tiam, +60 feeb

int jaar = xyoo +2000;

byte sunRise = {0, 0, 12, hli, hli, xyoo}; pib suav txhua hnub los ntawm 00 teev

byte sunSet = {0, 0, 12, hli, hli, xyoo}; tib yam li saum toj no

byte maan = {0, 0, 12, hli, hli, xyoo}; tib yam li saum toj no

ntab theem;

Los ntawm no, kev suav tau ua.

theem = Lokeren. MoonPhase (maan);

Lokeren. SunRise (hnub tuaj);

Lokeren. SunSet (sunSet);

Lokeren. DST (hnub tuaj);

Lokeren. DST (sunSet);

int ZonOpUur = sunRise [tl_hour];

int ZonOpMin = sunRise [tl_minute];

int ZonOnUur = sunSet [tl_hour];

int ZonOnMin = sunSet [tl_minute];

Nov yog qhov piv txwv ntawm yuav suav cov khoom hauv TimeLord li cas. Nrog lub tsev qiv ntawv no, koj tau txais (zoo nkauj) lub sijhawm ntawm hnub poob thiab hnub tuaj.

Thaum kawg, Kuv yuav tso tag nrho txoj haujlwm nrog Cov Lus Qhia no. Nws zoo nkauj ncaj nraim.

Kauj ruam 4: Ntau Software…

Ntau Software…
Ntau Software…
Ntau Software…
Ntau Software…

Xav paub ntau ntxiv txog software…

Peb muaj peb ntu loj hauv software.

1) Peb tau txais qee cov ntaub ntawv nyoos los ntawm peb cov ntsuas sib txawv: los ntawm peb lub moos, DHTs thiab BMP180. Qhov ntawd yog peb cov tswv yim.

2) Peb yuav tsum txhais cov ntaub ntawv rau (1 thiab 0) rau qee yam uas ua rau muaj kev nkag siab. Rau qhov no, peb siv peb cov tsev qiv ntawv thiab cov lej sib txawv.

3) Peb xav nyeem thiab khaws peb cov ntaub ntawv. Qhov ntawd yog peb qhov txiaj ntsig. Rau kev siv tam sim, peb muaj peb lub LCD-TFT, rau kev siv tom qab, peb muaj peb cov ntaub ntawv khaws tseg ntawm peb daim npav SD.

Hauv peb lub voj (), peb tau txais ntau "GOTO's": peb dhia mus rau cov tsev qiv ntawv sib txawv. Peb tau txais peb cov ntaub ntawv los ntawm ib qho ntawm cov ntsuas, tau txais cov ntaub ntawv thiab khaws cia hauv (feem ntau) cov ntaub ntawv ntab ntab. Peb xaiv peb cov npe hloov pauv kom zoo, tsis nrog x lossis y tab sis nrog cov npe xws li "tempOutside" lossis "siab" lossis yam zoo li ntawd. Kom lawv nyeem tau yooj yim dua. OK, qhov no ua rau nws hnyav dua me ntsis ntawm qhov hloov pauv-siv thiab ntau lub cim xeeb-siv.

Nov yog qhov ua kom yuam kev: thaum ua rau peb cov kev hloov pauv pom ntawm lub vijtsam, nws tsuas yog tso lawv rau ntawm txoj haujlwm raug.

Ob lub tsev qiv ntawv siv ntawm no, Adafruit_GFX.h thiab MCUfriend_kbv.h muaj cov haujlwm zoo tsim los siv xim, fonts thiab muaj peev xwm kos kab. Hauv thawj kis, kuv siv 12864- tshuaj ntsuam nrog cov tsev qiv ntawv no, tom qab ntawd kuv hloov qhov ntawd hauv tft-screen. Txhua yam kuv tau ua, yog muab cov thawv, duab plaub thiab kab, thiab ua kom ntseeg tau tias cov ntaub ntawv tawm hauv qhov chaw raug. Rau qhov ntawd, koj tuaj yeem siv setCursor thiab tft. Write raws li hais kom ua. Yooj yim ua. Cov xim tuaj yeem raug teeb tsa raws li qhov sib txawv thiab, muaj ntau qhov piv txwv hauv cov tsev qiv ntawv yuav xaiv lawv li cas.

Txhawm rau sau rau ntawm SD-daim npav, peb kuj xav tau qee qhov ua kom yooj yim.

Piv txwv li, peb nyeem peb cov ntaub ntawv los ntawm lub moos raws li teev teev, feeb thiab vib nas this. Kub yog DHT.temperature thiab DHTT.temperature, kom sib txawv ntawm sab hauv lossis sab nraum zoov.

Thaum peb xav muab lawv tso rau hauv daim npav SD, peb siv txoj hlua: peb pib txhua lub voj raws li txoj hlua khoob:

variablestring = ""; Tom qab ntawd peb tuaj yeem sau nws nrog tag nrho peb cov ntaub ntawv:

variablestring = variablestring + teev + ":" + feeb + ":" + vib nas this. Qhov no muab txoj hlua zoo li 12:00:00.

Txij li thaum peb sau nws ua TXT-file (saib SD.h ntawm Arduino.cc), rau qhov hloov pauv tom ntej peb ntxiv ib lub tab, yog li nws yooj yim dua rau import nws hauv Excel.

Yog li peb tuaj rau: variablestring = variablestring + "\ t" + DHT.temperature + "\ t" + DHTT. Temperature.

Ntxiv rau

Kauj ruam 5: Qee qhov Screenshots…

Qee qhov Screenshots…
Qee qhov Screenshots…
Qee qhov Screenshots…
Qee qhov Screenshots…
Qee qhov Screenshots…
Qee qhov Screenshots…

Kom paub tseeb tias peb tsis "tshaj" peb cov ntaub ntawv, kuv tau sau cov ntaub ntawv ib zaug txhua 10 feeb. Muab peb 144 daim ntawv tso rau ib hnub. Kuv tsis phem, kuv xav.

Thiab ntawm chav kawm, koj tuaj yeem txuas ntxiv cov ntaub ntawv ntawd: koj tuaj yeem ua qhov nruab nrab, koj tuaj yeem nrhiav maxima thiab minima, koj tuaj yeem sib piv nrog xyoo dhau los …

Cov chaw haujlwm feem ntau ua nruab nrab nruab hnub thiab hmo ntuj, rau qhov kub: nruab hnub pib thaum 8 teev sawv ntxov, thiab khiav mus txog 8 teev tsaus ntuj.

Txog cua, siab thiab nag lossis daus, qhov nruab nrab yog ntsuas txij ib tag hmo txog ib tag hmo.

Kauj ruam 6: Tiav lawm?

Tiav lawm?
Tiav lawm?
Tiav lawm?
Tiav lawm?

Tsis yog tiag tiag … Raws li kuv tau hais Kuv xav kom thaum kawg tau txais cua-nrawm thiab cua-kev coj ua haujlwm ua haujlwm nrog JAWS tas li.

Kev tsim kho me me kuv ua sawv siab txog 4m siab. Meteorologist tau txais cua nrawm los ntawm qhov siab 10m. Me ntsis siab dhau rau kuv …

Kuv vam tias koj nyiam nyeem qhov no!

Adafruit-GFX tau piav qhia ntawm no:

MCUFRIEND_kbv.h yuav tsum pom ntawm no:

Xav paub ntau ntxiv txog BMP 120 (tib yam li BMP085):

Txog DHT22:

Pom zoo: