Cov txheej txheem:
- Kauj Ruam 1: Yam Khoom Siv Hauv Txoj Haujlwm no
- Kauj ruam 2: Zaj dab neeg
- Kauj Ruam 3: Rub Cov Ntaub Ntawv Tsim Nyog
- Kauj ruam 4: Sib sau ua ke
- Kauj Ruam 5: Txoj Haujlwm
- Kauj Ruam 6: Ua Nws Portable
- Kauj Ruam 7: Xaus
- Kauj ruam 8: Code
Video: Hnub, Sijhawm & Kub Zaub Siv XinaBox: 8 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Txias OLED zaub qhia hnub, sijhawm thiab ntsuas kub hauv Celsius thiab Fahrenheit siv Xinabox xChips raws li ESP8266.
Kauj Ruam 1: Yam Khoom Siv Hauv Txoj Haujlwm no
Cov khoom siv kho vajtse
- XinaBox IP01 x 1 xChip USB Programmer raws FT232R Los ntawm FTDI Txwv
- XinaBox CW01 x 1 xChip Wi-Fi Core raws li ESP8266 Wi-Fi Module
- XinaBox SW01 x 1 xChip Kub, av noo thiab huab cua siab ntsuas raws BME280 los ntawm Bosch.
- XinaBox OD01 x 1 xChip 128x64 Pixel OLED Display
- XinaBox PU01 x 1 xChip USB (Hom A) Cov Khoom Siv Hluav Taws Xob
- XinaBox XC10 x 1 xChip Tsheb Txuas
- 5V USB Fais Fab Khoom x 1
Software apps thiab cov kev pabcuam online
Arduino IDE Cov
Kauj ruam 2: Zaj dab neeg
Taw qhia
Kuv ua qhov haujlwm no los tso saib hnub tim, UCT lub sijhawm thiab ntsuas kub siv XinaBox xChips uas siv I2C npav raws tu qauv. Lub sijhawm tau rov qab los ntawm google NTP server. Qhov ntsuas kub ib puag ncig tau ntsuas siv SW01 xChip thiab tau tshwm ntawm OD01 xChip OLED zaub hauv Celsius thiab Fahrenheit. Cov duab hauv qab no qhia pom OLED.
OLED tso tawm hnub, sijhawm thiab ntsuas kub
Kauj Ruam 3: Rub Cov Ntaub Ntawv Tsim Nyog
Koj yuav xav tau cov tsev qiv ntawv hauv qab no thiab software rau txoj haujlwm no.
- Arduino IDE - Kev Txhim Kho Software uas koj yuav ua tus lej
- xSW01 - Lub tsev qiv ntawv ntsuas kub
- xCore - Lub tsev qiv ntawv tseem ceeb rau XinaBox xChips
- xOD01 - OLED Display lub tsev qiv ntawv.
- Timezone - Lub tsev qiv ntawv los xaiv koj lub sijhawm
- Sijhawm - Txhawm rau siv sijhawm ua haujlwm
- NTPClient - Pab kom koj tau txais sijhawm los ntawm server
- Koj kuj tseem yuav tsum rub lub ESP8266 lub rooj tsavxwm thiab ua raws cov lus qhia uas txuas nrog nws txhawm rau txhawm rau teeb tsa lub rooj tsavxwm
Thaum rub tawm koj yuav nruab IDE thiab cov tsev qiv ntawv. Nws ncaj ncaj rau pem hauv ntej yog tias koj ua raws cov lus qhia.
Kauj ruam 4: Sib sau ua ke
Koj lub xChip tseem ceeb uas yuav ua thiab ua cov haujlwm yog CW01. Nws yog raws li ESP8266 WiFi Module thiab siv I2C cov txheej txheem tsheb npav. Txhawm rau ua haujlwm rau CW01, koj yuav xav tau lub program xChip. IP01 tso cai rau peb ua haujlwm CW01 ntawm USB chaw nres nkoj ntawm peb lub khoos phis tawj yooj yim los ntawm kev nyem ua ke ob lub xChips siv XC10 tsheb npav txuas thiab tso nws rau hauv USB chaw nres nkoj. Tsis muaj xov hlau thiab tsis muaj qhov yuav tsum tau siv. Ib yam uas yuav tsum nco ntsoov yog kev taw qhia ntawm xChip cov npe cim npe. Lawv txhua tus yuav tsum tau taw qhia rau tib txoj kev. Tam sim no koj yuav tsum muaj teeb tsa hauv qab no.
Nyem ua ke CW01 thiab IP01 thiab ntxig nws rau hauv USB chaw nres nkoj ntawm koj lub computer
Yog tias koj paub nrog xChips koj tuaj yeem txuas txhua xChip ua ke siv XC10 tsheb npav txuas uas koj xav siv rau koj txoj haujlwm thiab tom qab ntawd ntxig nws rau hauv USB chaw nres nkoj. Peb yuav siv SW01 ntsuas kub thiab OD01 OLED zaub.
Koj tuaj yeem txuas tag nrho koj cov chips ua ke thiab tom qab ntawd ntxig nws rau hauv koj lub USB chaw nres nkoj
Kauj Ruam 5: Txoj Haujlwm
Rub tawm lossis luam thiab muab cov cai hauv qab no tso rau hauv koj li Arduino IDE. Yog tias koj tsis hloov pauv cov cai yooj yim nkag koj li WiFi cov ntsiab lus hauv lawv cov haujlwm raws li qhia hauv qab no. Kuj nkag mus rau NTP lub sijhawm server ntseeg tau. Kuv tau siv Google lub sijhawm server rau txoj haujlwm no.
Cov ntsiab lus WiFi thiab NTP lub sijhawm server
Tam sim no sau thiab upload. Nco ntsoov tias koj tau xaiv qhov tseeb COM chaw nres nkoj thiab pawg thawj coj hauv qab cov cuab yeej ntawv qhia zaub mov hauv Arduino IDE. Ib zaug rub tawm, lub sijhawm, hnub tim thiab qhov kub thiab txias yuav tsum qhia raws li hauv qab no.
Tom qab upload koj yuav tsum pom cov hauv qab no
Kauj Ruam 6: Ua Nws Portable
Tam sim no koj tuaj yeem tshem chav nyob ntawm koj lub USB chaw nres nkoj thiab cais txhua xChip los ntawm kev rub nws sib nrug. Txij li cov phiaj xwm ua tiav, IP01 tsis xav tau ntxiv lawm. Tam sim no koj tuaj yeem txuas koj txoj haujlwm hauv txhua yam uas koj xav tau tsuav yog cov npe cim npe tau qhia txhua yam hauv tib txoj kev. Txhawm rau txhawb peb chav peb yuav siv PU01. Qhov no tso cai rau peb siv nws los ntawm lub txhab nyiaj ib txwm muaj lossis ib qho 5V USB fais fab mov. Kuv tau txuas nrog kuv li qhia hauv qab no.
Sib dhos zaum kawg. xChips tuaj yeem txuas nrog txhua txoj hauv kev uas koj xav tau.
Kauj Ruam 7: Xaus
Txoj haujlwm no yuav siv 20 feeb los ua kom tiav. Yog tias koj xav tau sijhawm nyob hauv koj qhov chaw nyob, txiav txim siab saib tus lej piv txwv hauv lub tsev qiv ntawv Timezone lossis ua qee qhov lej nrog UTC lub sijhawm. Tsis tau siv cov xov hlau thiab tsis tas yuav tsum tau siv cov laug.
Kauj ruam 8: Code
Date_Time_Temp.ino Arduino Cias sau koj li WiFi cov ntsiab lus hauv lawv cov haujlwm thiab muab xa mus rau koj lub rooj tsavxwm.
#suav nrog // suav nrog cov tsev qiv ntawv tseem ceeb rau XinaBox xCHIPS
#suav nrog // suav nrog OLED cov tsev qiv ntawv #suav nrog // suav nrog lub tsev qiv ntawv ntsuas kub #suav nrog // suav nrog ESP8266WiFi ua haujlwm #suav nrog // suav nrog lub sijhawm qiv ntawv #include #include #include #include #include xSW01 SW01; // txhais NTP cov khoom #define ntpOffset 60 * 60 // hauv vib nas this #define ntpInterval 60 * 1000 // nyob rau hauv miliseconds // ntxig rau ntseeg ntp lub sijhawm server nruab nrab ntawm ob nqe lus hais // ntawm no kuv tau siv google ntp server sijhawm # txhais ntpAddress "time1.google.com" // teeb tsa NTP UDP tus neeg siv WiFiUDP ntpUDP; NTPClient timeClient (ntpUDP, ntpAddress, ntpOffset, ntpInterval); // qhov kub thiab txias sib txawv ntab tempC; // C Celsius ntab tempF; // fahrenheit // your wifi details const char* wifi_ssid = "XinaBox"; // koj lub wifi ssid const char* wifi_pass = "RapidIoT"; // koj tus password wifi // hnub tim thiab sijhawm sib txawv Hnub txoj hlua; Txoj hlua clktime; // variables muaj hnub thiab hli const char * days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; const char * months = {"Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sep", "Oct", "Nov" "," Dec "}; const char * ampm = {"AM", "PM"}; teeb tsa tsis muaj dab tsi () {tempC = tempF = 0; // pib ntsuas kub kom xoom timeClient.begin (); // pib NTP UDP tus neeg siv // pib kev sib txuas lus txuas Serial.begin (115200); // pib i2c kev sib txuas lus thiab teeb pins Wire.begin (2, 14); // pib ntsuas kub SW01.begin (); // pib OLED zaub OLED.begin (); // meej OLED zaub OD01.clear (); // tsim wifi txuas wifi_connect (); ncua (1000); } void loop () {// khiav yog wifi txuas tau tsim yog (WiFi.status () == WL_CONNECTED) {SW01.poll (); // nyeem ntsuas kub tempC = SW01.getTempC (); // khaws cov khoom kub hauv celcius tempF = SW01.getTempF (); // khaws lub sijhawm hauv hnub fahrenheit = ""; // clear date variable clktime = ""; // meej lub sijhawm sib txawv // hloov kho ntp tus thov thiab tau txais unix utc timestamp timeClient.update (); unsigned ntev epochTime = timeClient.getEpochTime (); // hloov pauv tau txais lub sijhawm thwj rau lub sij hawm_t yam khoom time_t utc; utc = lub sijhawm; // utc time TimeChangeRule utcRule = {"UTC", Xeem, Hnub, Mar, 1, 0}; Timezone UTC (utcRule, utcRule); // format time variables date += days [weekday (utc) - 1]; hnub += ","; hnub += hli [hli (utc) - 1]; hnub tim += ""; hnub += hnub (utc); hnub += ","; hnub += xyoo (utc); // format lub sij hawm rau 12-teev hom nrog AM/PM thiab tsis muaj vib nas this clktime += hourFormat12 (utc); clktime += ":"; yog (feeb (utc)
Pom zoo:
Loj hlob Zaub Zaub Ntxiv Hauv Qhov Chaw Tsawg Los Yog Loj hlob Zaub Zaub Hauv Chaw, (Ntau lossis Tsawg): 10 Kauj Ruam
Loj Hlob Ntau Cov Zaub Zaub Hauv Tsawg Chaw lossis … Loj hlob Zaub Zaub Hauv Chaw, (Ntau lossis Tsawg).: Qhov no yog kev tshaj lij tshaj lij rau Kev Loj Hlob Tshaj Ntiaj Teb, Kev Tsim Khoom Sib Tw, xa los ntawm Cov Lus Qhia. Kuv tsis tuaj yeem muaj kev zoo siab dua los tsim rau thaj chaw cog qoob loo thiab tshaj tawm kuv thawj Cov Lus Qhia. Yuav pib, kev sib tw nug peb kom
Siv DS1307 thiab DS3231 Lub Sijhawm Teev Sijhawm Sijhawm Nrog Arduino: 3 Kauj Ruam
Siv DS1307 thiab DS3231 Lub Sijhawm Caij Nyoog Sijhawm Nrog Arduino: Peb tseem tau txais kev thov yuav siv DS1307 thiab DS3231 lub sijhawm teev sijhawm nrog Arduino los ntawm ntau qhov chaw-yog li qhov no yog thawj ntawm ob ntu kev qhia yuav siv li cas. Txog qhov kev qhia Arduino no peb muaj ob lub sijhawm teev sijhawm ua haujlwm rau peb
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 - Saib Xyuas Qhov Kub Kub & Qhov Kub Kub ntawm M5stick-C Nrog DHT11: 6 Cov Kauj Ruam
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 | Saib Xyuas Qhov Kub thiab Qhov Ntsuas Kub ntawm M5stick-C Nrog DHT11: Nyob zoo cov neeg, hauv cov lus qhia no peb yuav kawm paub yuav ua li cas cuam tshuam DHT11 ntsuas kub nrog m5stick-C (pawg tswj hwm kev txhim kho los ntawm m5stack) thiab tso tawm ntawm cov zaub ntawm m5stick-C. Yog li hauv qhov kev qhia no peb yuav nyeem qhov ntsuas kub, av noo & heat kuv
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: 6 Kauj Ruam
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: Cov lus qhia no piav qhia yuav ua li cas thiaj tsim tau Arduino Robot uas tuaj yeem txav mus raws qhov xav tau (Forward, Backward) , Sab laug, Txoj Cai, Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) xav tau Kev nrug deb hauv Centimeters siv lub suab hais kom ua. Neeg hlau kuj tseem tuaj yeem txav tau tus kheej
Yuav Ua Li Cas Lub Sijhawm Teev Sijhawm Siv Arduino thiab TFT Zaub - Arduino Mega RTC Nrog 3.5 Ntiag TFT Zaub: 4 Kauj Ruam
Yuav Ua Li Cas Lub Sijhawm Teev Sijhawm Siv Arduino thiab TFT Zaub | Arduino Mega RTC Nrog 3.5 Ntiag TFT Zaub: Mus Saib Kuv Youtube Channel.Introduction:- Hauv kab ntawv no kuv yuav ua "Sijhawm Sijhawm" siv 3.5 nti TFT kov LCD, Arduino Mega 2560 thiab DS3231 RTC module…. Ua ntej pib… tshawb xyuas cov vis dis aus los ntawm kuv tus YouTube channel..Ntau:- Yog tias koj siv Arduin