Cov txheej txheem:
- Kauj ruam 1: Yam Koj Yuav Tsum Tau
- Kauj Ruam 2: Pib Visuino, thiab Xaiv M5 Stack Stick C Board Type
- Kauj Ruam 3: Hauv Visuino teeb tsa StickC Board
- Kauj Ruam 4: Hauv Visuino Ntxiv Cheebtsam
- Kauj Ruam 5: Hauv Visuino Teeb Cov Khoom
- Kauj Ruam 6: Hauv Visuino Connect Components
- Kauj Ruam 7: Tsim, Ua Ke, thiab Tshaj Tawm Arduino Code
- Kauj ruam 8: Ua si
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Hauv qhov kev qhia no peb yuav kawm paub yuav ua haujlwm li cas ESP32 M5Stack StickC nrog Arduino IDE thiab Visuino kom tso saib lub sijhawm ntawm lub LCD thiab tseem teeb tsa lub sijhawm thiab qhov ci ci siv cov ntawv qhia zaub mov thiab StickC nyees khawm.
Saib daim vis dis aus.
Kauj ruam 1: Yam Koj Yuav Tsum Tau
M5StickC ESP32: koj tuaj yeem tau txais nws ntawm no
Visuino program: Rub tawm Visuino
Nco tseg: Txheeb xyuas cov ntawv qhia no ntawm yuav ua li cas rau Nruab StickC ESP32 pawg thawj coj
Kauj Ruam 2: Pib Visuino, thiab Xaiv M5 Stack Stick C Board Type
Pib Visuino raws li pom hauv thawj daim duab Nyem rau ntawm "Cuab Yeej" khawm ntawm Arduino tivthaiv (Daim duab 1) hauv Visuino Thaum qhov kev sib tham tshwm, xaiv "M5 Stack Stick C" raws li qhia hauv daim duab 2
Kauj Ruam 3: Hauv Visuino teeb tsa StickC Board
- Nyem rau ntawm "M5 Stack Stick C" Board kom xaiv nws
- Hauv "Properties" window xaiv "Modules" thiab nyem "+" kom nthuav dav,
- Xaiv "Zaub ST7735" thiab nyem "+" txhawm rau nthuav nws,
- Teeb "Kev taw qhia" rau "goRight"
- Teeb "Xim Xim" rau "ClBlack"
- Xaiv "Cov ntsiab lus" thiab nyem rau ntawm lub pob xiav nrog 3 dots …
- Elements Dialog yuav qhia
- Hauv Elements Dialog luag 2X "Text Field" los ntawm sab xis mus rau sab laug
- Nyem rau ntawm "Text Field1" ntawm sab laug kom xaiv nws, tom qab ntawd hauv "Properties window" nyem rau "Color" thiab teeb nws rau "aclOrange" thiab nyem rau "Fill Color" thiab teeb nws rau "aclBlack" (Koj tuaj yeem ua si nrog cov xim yog tias koj xav tau) -thiab hauv cov khoom qhov rai teeb tsa X: 10 thiab Y: 20 qhov no yog qhov uas koj xav pom lub sijhawm ntawm LCD -teeb loj: 3 (qhov no yog qhov loj me ntawm lub sijhawm)
- Nyem rau ntawm "Text Field2" ntawm sab laug kom xaiv nws, tom qab ntawd hauv "Properties window" nyem rau "Color" thiab teeb nws rau "aclAqua" thiab nyem rau "Fill Color" thiab teeb nws rau "aclBlack"
(Koj tuaj yeem ua si nrog cov xim yog tias koj xav tau) -set "Initial Value" to: Set HOUR
-thiab nyob hauv cov khoom qhov rai teeb tsa X: 10 thiab Y: 2 qhov no yog qhov uas koj xav pom cov zaub mov ntawm LCD -teeb loj: 1 (qhov no yog qhov loj me ntawm cov ntawv qhia zaub mov)
Kaw lub ntsiab qhov rai
- Nyem rau ntawm "M5 Stack Stick C" Board kom xaiv nws
- Hauv "Properties" window xaiv "Modules" thiab nyem "+" kom nthuav dav,
- Xaiv "Display Real Time Alarm Clock (RTC)" thiab nyem "+" txhawm rau nthuav nws,
- Xaiv "Cov ntsiab lus" thiab nyem rau ntawm lub pob xiav nrog 3 dots …
- Hauv Cov Ntsiab Lus Dialog luag "Teev Sijhawm" los ntawm sab xis mus rau sab laug-thiab hauv cov khoom qhov rai teeb tsa "Ntxiv Tus Nqi" rau: Tseeb thiab "Tus Nqi" rau: 1
- Hauv Cov Ntsiab Lus Dialog luag "Teeb feeb" los ntawm sab xis mus rau sab laug-thiab hauv cov khoom qhov rai teeb tsa "Ntxiv Tus Nqi" rau: Tseeb thiab "Tus Nqi" rau: 1
- Hauv Cov Ntsiab Lus Dialog luag "Teeb Thib Ob" los ntawm sab xis mus rau sab laug-thiab hauv cov khoom qhov rai teeb tsa "Ntxiv Tus Nqi" rau: Tseeb thiab "Tus Nqi" rau: 1
Kaw lub ntsiab qhov rai
Kauj Ruam 4: Hauv Visuino Ntxiv Cheebtsam
- Ntxiv 2x "Debounce Button" tivthaiv
- Ntxiv "Pib Rov Ua Dua" khawm tivthaiv
- Ntxiv "Text Array" tivthaiv
- Ntxiv "Analog Array" tivthaiv
- Ntxiv 2x "Counter" tivthaiv
- Ntxiv "Moos Demux (Ntau Qhov Chaw Tso Tawm Hloov)" tivthaiv
- Ntxiv "Decode (Split) Date/Time" tivthaiv
- Ntxiv "FormattedText1" tivthaiv
Kauj Ruam 5: Hauv Visuino Teeb Cov Khoom
- Xaiv "FormattedText1" tivthaiv thiab hauv qab "Properties" window teeb tsa "Text" rau:%0:%1:%2
- Nyem ob npaug rau "FormattedText1" tivthaiv thiab hauv Elements dialog rub 3x "Text Element" mus rau sab laug
- Xaiv "TextElement1" ntawm sab laug thiab hauv cov khoom qhov rai teeb tsa "Sau Tus Cwj Pwm" rau: 0 thiab "Ntev" txog: 2
- Xaiv "TextElement2" ntawm sab laug thiab hauv cov khoom qhov rai teeb tsa "Sau Tus Cwj Pwm" rau: 0 thiab "Ntev" txog: 2
- Xaiv "TextElement3" ntawm sab laug thiab hauv cov khoom qhov rai teeb tsa "Sau Tus Cwj Pwm" rau: 0 thiab "Ntev" txog: 2
- Xaiv "ClockDemmux1" tivthaiv thiab nyob rau hauv lub qhov rai khoom teeb tsa "Tus lej Pins" rau: 5
- Xaiv "Counter1" tivthaiv thiab hauv cov khoom qhov rai nthuav dav "Max" thiab teeb tsa "Tus nqi" rau: 4
- Xaiv "Counter1" tivthaiv thiab hauv cov khoom qhov rai nthuav dav "Min" thiab teeb "Tus nqi" rau: 0
- Xaiv "Counter2" tivthaiv thiab hauv cov khoom qhov rai nthuav dav "Max" thiab teeb tsa "Tus nqi" rau: 6
- Xaiv "Counter2" tivthaiv thiab hauv cov khoom qhov rai nthuav dav "Min" thiab teeb "Tus nqi" rau: 0BUILDING MENU:
- Xaiv "Array1" tivthaiv (Text Array) thiab ob npaug nias rau nws.-Hauv cov ntsiab lus qhov rai rub 4X "Tus nqi" mus rau sab laug-Ntawm sab laug Xaiv "Yam [1]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: SET HOURS-Ntawm sab laug Xaiv "Yam khoom [2]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: SET MINUTES-Ntawm sab laug Xaiv "Yam [3]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: SET SECONDS-Ntawm sab laug Xaiv "Yam khoom [4]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: SET BRIGHTNESS Kaw lub Elements window. SETTING VALUES FOR BRIGHTNESS:
-
Xaiv "Array2" tivthaiv (Analog Array) thiab ob npaug nias rau nws.-Hauv cov ntsiab lus qhov rai rub 6X "Tus nqi" mus rau sab laug-Ntawm sab laug Xaiv "Khoom [0]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: 1
-Ntawm sab laug Xaiv "Yam [1]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: 0.9
-Ntawm sab laug Xaiv "Yam [2]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: 0.8 -Ntawm sab laug Xaiv "Khoom [3]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: 0.7 -On sab laug Xaiv "Khoom [4]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: 0.6-Ntawm sab laug Xaiv "Khoom [5]" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau: 0.55
Kauj Ruam 6: Hauv Visuino Connect Components
- Txuas "M5 Stack Stick C" tus pin A (M5) rau "Button2" tus pin [Hauv]
- Txuas "M5 Stack Stick C" tus pin [B] mus rau "Button1" tus pin [Hauv]
- Txuas "Button2" tus pin [Tawm] rau 'RepeatButton1 "tus pin [Hauv]
- Txuas "RepeatButton1" tus pin [Tawm] rau "ClockDemmux1" tus pin [Hauv]
- Txuas "Button1" tus pin [Tawm] rau "Counter1" tus pin [Hauv]
- Txuas "M5 Stack Stick C"> "Lub Sijhawm Tswb Tswb Tswb (RTC)" tus pin [Tawm] rau "DecodeDateTime1" tus pin [Hauv]
- Txuas "DecodeDateTime1" tus pin [Teev] rau "FormattedText1"> "TextElement1" tus pin [Hauv]
- Txuas "DecodeDateTime1" tus pin [feeb] mus rau "FormattedText1"> "TextElement2" tus pin [Hauv]
- Txuas "DecodeDateTime1" tus pin [Thib Ob] rau "FormattedText1"> "TextElement3" tus pin [Hauv]
- Txuas "FormattedText1" tus pin [Tawm] rau "M5 Stack Stick C" board> "Display ST7735"> "Text Field1" pin [In]
- Txuas "Counter1" tus pin [Tawm] rau "ClockDemmux1" tus pin [Xaiv] thiab rau "Array1" tus pin [Index]
- Txuas "Counter2" tus pin [Tawm] rau "Array2" tus pin [Index]
- Txuas "Array1" tus pin [Tawm] mus rau "M5 Stack Stick C" board> "Display ST7735"> "Text Field2" pin [In]
- Txuas "Array2" tus pin [Tawm] mus rau "M5 Stack Stick C" board> "Display ST7735"> pin [Brightness]
- Txuas "ClockDemmux1" tus pin [1] rau "M5 Stack Stick C" board> "Lub Sijhawm Tswb Tswb Tswb (RTC)"> "Teeb Sijhawm 1" tus pin [Clock]
- Txuas "ClockDemmux1" tus pin [2] mus rau "M5 Stack Stick C" board> "Lub Sijhawm Tswb Tswb Tswb (RTC)"> "Teeb Minute1" tus pin [Clock]
- Txuas "ClockDemmux1" tus pin [3] rau "M5 Stack Stick C" board> "Lub Sijhawm Tswb Tswb Tswb (RTC)"> "Teeb Thib Ob" pin [Clock]
- Txuas "ClockDemmux1" tus pin [4] rau "Counter2" tus pin [Hauv]
Kauj Ruam 7: Tsim, Ua Ke, thiab Tshaj Tawm Arduino Code
Hauv Visuino, hauv qab nyem rau ntawm "Tsim" Tab, xyuas kom tseeb tias qhov chaw nres nkoj raug xaiv, tom qab ntawd nyem rau ntawm "Compile/Build and Upload" khawm.
Kauj ruam 8: Ua si
Yog tias koj siv lub zog M5Sticks module, cov zaub yuav tsum pib qhia lub sijhawm. Koj tuaj yeem hloov sijhawm thiab ci ntsa iab siv cov nyees khawm "B" los tso saib Cov Ntawv Qhia thiab hloov ntawm (Teev Teev Sijhawm, Teev feeb, Teeb Thib Ob, Teeb Pom Kev Zoo) thiab siv khawm "M5" rau teeb tsa nws.
Nrog koj zoo siab! Koj tau ua tiav koj txoj haujlwm M5Sticks nrog Visuino. Kuj txuas nrog yog Visuino qhov haujlwm, uas kuv tau tsim rau Cov Lus Qhia no, koj tuaj yeem rub tawm nws ntawm no. Koj tuaj yeem rub tawm thiab qhib nws hauv Visuino:
Pom zoo:
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
Thermostat Tswj ntawm Lub Txias Txias Txias: 7 Cov Kauj Ruam (nrog Duab)
Kev ntsuas cua sov ntawm Kev Sib Hloov Thaum Tshav Kub Kub: Nyob Zoo Txhua Tus, Hauv Phau Ntawv Qhia no, Kuv yuav qhia koj yuav ua li cas siv lub tshuab cua sov hloov pauv uas siv lub ntsuas cua sov pheej yig. Kuv tsis paub tseeb tias koj tab tom ua dab tsi, tsis txhob sim
Lub Tsev Ua Lub Txias Txias Nrog Ntse Tswj Ua Haujlwm (Lub Freezer Txias): 11 Kauj Ruam (nrog Duab)
Lub Tsev Ua Tub Yees Nrog Lub Ntse Tswj Kev Ua Haujlwm (Deep Freezer): Nyob Zoo Cov Phooj Ywg Qhov no yog Tshooj 2 ntawm DIY lub tub yees raws li peltier module, hauv ntu no peb siv 2 peltier module hloov 1, peb kuj siv lub ntsuas cua sov kom teeb tsa qhov xav tau kom sov me ntsis zog
Ua Lub Laptop Dej Txias Dej Txias! thiab Lwm Yam Khoom Txias: 6 Cov Kauj Ruam (nrog Duab)
Ua Lub Laptop Dej Txias Dej Txias! thiab Lwm Yam Khoom Txias: Cov Lus Qhia no yuav qhia koj yuav ua li cas thiaj ua kom cov dej txias txias txias thiab lub ncoo txias rau koj lub laptop. Yog li dab tsi yog qhov cua sov rho tawm no tiag? Zoo nws yog lub cuab yeej tsim los ua kom koj lub laptop txias - hauv txhua lub ntsiab lus ntawm lo lus. Nws tuaj yeem
Yuav Ua Li Cas Kom Txias Txias Txias Txias rau hauv Cov Cuab Yeej Siv Tau Zoo: 6 Cov Kauj Ruam
Yuav Ua Li Cas Kom Txias Txias Txias Txias rau hauv Cov Cuab Yeej Siv Tau Zoo: OH NO !!! Koj yuav lub Coldheat !!! Koj yuav ua dab tsi nrog nws? Kuv paub, koj tuaj yeem hloov nws mus rau qee yam muaj txiaj ntsig, zoo li lub teeb nyem! Nov yog cov kauj ruam ib kauj ruam los tig koj cov khoom pov tseg rau hauv lub teeb ci, ua haujlwm teeb, uas yog qhov zoo tshaj rau koj