Cov txheej txheem:

DIY Yuav Ua Li Cas Saib Zoo Saib - StickC - Yooj Yim Ua: 8 Kauj Ruam
DIY Yuav Ua Li Cas Saib Zoo Saib - StickC - Yooj Yim Ua: 8 Kauj Ruam
Anonim

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 LCD thiab tseem teeb lub sijhawm siv StickC cov nyees khawm.

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi

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, thiab Xaiv M5 Stack Stick C Board Type
Pib Visuino, thiab Xaiv M5 Stack Stick C Board Type
Pib Visuino, thiab Xaiv M5 Stack Stick C Board Type
Pib Visuino, thiab Xaiv M5 Stack Stick C Board Type
Pib Visuino, thiab Xaiv M5 Stack Stick C Board Type
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 Ntxiv Cheebtsam

Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
  1. Nyem rau ntawm "M5 Stack Stick C" Board kom xaiv nws
  2. Hauv "Properties" window xaiv "Modules" thiab nyem "+" kom nthuav dav,
  3. Xaiv "Zaub ST7735" thiab nyem "+" txhawm rau nthuav nws,
  4. Teeb "Kev taw qhia" rau "goRight"
  5. Teeb "Xim Xim" rau "ClBlack"
  6. Xaiv "Cov ntsiab lus" thiab nyem rau ntawm lub pob xiav nrog 3 dots …
  7. Elements Dialog yuav qhia
  8. Hauv Elements Dialog luag "Text Field" los ntawm sab xis mus rau sab laug
  9. Nyem rau ntawm "Text Field1" ntawm sab laug kom xaiv nws, tom qab ntawd hauv "Properties window" nyem rau "Color" thiab teeb nws rau "aclWhite" 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) Kaw lub qhov rai

  10. Ntxiv "Decode (Split) Date/Time" tivthaiv
  11. Ntxiv "Cov ntawv sau ua ke" tivthaiv

Kauj Ruam 4: Hauv Visuino Teeb Cov Khoom

Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
  1. Xaiv "FormattedTxt1" tivthaiv thiab hauv qab "Properties" qhov rai teeb "Text" rau:%0:%1:%2
  2. Nyem ob npaug rau "FormattedText1" tivthaiv thiab hauv Elements dialog rub 3x "Text Element" mus rau sab laug
  3. Xaiv "M5 Stack Stick C" board thiab hauv "Properties" window xaiv "Modules"> "Real Time Alarm Clock (RTC)"> "Elements"
  4. Nyem rau ntawm lub pob xiav nrog 3 dots thiab hauv Elements dialog drag "Set Hour", "Set Minute" thiab "Set Second" mus rau sab laug
  5. Xaiv ntawm sab laug "Teeb Sijhawm 1" lub ntsiab lus thiab hauv qab "Khoom" qhov rai teeb tsa "Ntxiv Tus Nqi" rau "Muaj tseeb" thiab "Tus nqi" rau "1"
  6. Xaiv ntawm sab laug "Set Minute1" element thiab hauv qab "Properties" window teeb tsa "Ntxiv Tus Nqi" rau "True" thiab "Value" rau "1"
  7. Xaiv ntawm sab laug "Teeb Thib Ob" thiab hauv qab "Cov Khoom" qhov rai teeb tsa "Ntxiv Tus Nqi" rau "Muaj tseeb" thiab "Tus nqi" rau "1"

Piav qhia:

"Tus Nqi" txhais tau ntau npaum li cas peb xav ntxiv nrog txhua qhov nyem ntawm lub pob rau lub sijhawm tam sim no (ob teev, feeb lossis vib nas this) "Ntxiv Tus Nqi" txhais tau tias peb xav ntxiv tus nqi rau lub sijhawm tam sim no

Kauj Ruam 5: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
  1. Txuas "M5 Stack Stick C"> Lub Sijhawm Tswb Tswb Tswb (RTC)> Pin [Tawm] rau "DecodeDateTime1" tivthaiv tus pin [Hauv]
  2. Txuas "DecodeDateTime1" tivthaiv tus pin [Teev] rau "FormattedText1" tivthaiv "TextElement1" tus pin [Hauv]
  3. Txuas "DecodeDateTime1" tiv thaiv tus pin [Minute] rau "FormattedText1" tivthaiv "TextElement2" tus pin [Hauv]
  4. Txuas "DecodeDateTime1" tiv thaiv tus pin [Thib Ob] rau "FormattedText1" tivthaiv "TextElement3" tus pin [Hauv]
  5. Txuas "FormattedText1" tivthaiv tus pin [Tawm] rau "M5 Stack Stick C" board "Display ST7735"> "Text Field1" pin [In]
  6. Txuas "M5 Stack Stick C"> Khawm "A (M5)" mus rau "M5 Stack Stick C"> Lub Sijhawm Tswb Tswb Tswb (RTC)> "Teeb Teev 1" Pin [Clock]
  7. Txuas "M5 Stack Stick C"> Khawm "B" mus rau "M5 Stack Stick C"> Lub Sijhawm Tswb Tswb Tswb (RTC)> "Set Minute1" Pin [Clock]

Kauj Ruam 6: Tsim, Ua Ke, thiab Tshaj Tawm Arduino Code

Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code
  1. 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 7: Ua si

Yog tias koj siv lub zog M5Sticks module, cov zaub yuav tsum pib qhia lub sijhawm. Koj tuaj yeem hloov sijhawm siv khawm "M5" rau Teev thiab "B" rau feeb

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:

Kauj Ruam 8: Hauv Kev Qhia Ntxiv Tom ntej

Hauv qhov kev qhia tom ntej no kuv yuav qhia koj yuav ua li cas Saib Txias Saib qhov twg koj tuaj yeem teev sijhawm (teev, feeb thiab vib nas this) siv StickC cov nyees khawm thiab tsim cov ntawv qhia yooj yim!

Pom zoo: