Cov txheej txheem:

M5StickC Txias Saib Saib Nrog Cov Ntawv Qhia thiab Kev Tswj Lub Teeb: 8 Kauj Ruam
M5StickC Txias Saib Saib Nrog Cov Ntawv Qhia thiab Kev Tswj Lub Teeb: 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 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

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 teeb tsa StickC Board

Hauv Visuino teeb tsa StickC Board
Hauv Visuino teeb tsa StickC Board
Hauv Visuino teeb tsa StickC Board
Hauv Visuino teeb tsa StickC Board
Hauv Visuino teeb tsa StickC Board
Hauv Visuino teeb tsa StickC Board
Hauv Visuino teeb tsa StickC Board
Hauv Visuino teeb tsa StickC Board
  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 2X "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 "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)
  10. 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

  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 "Display Real Time Alarm Clock (RTC)" thiab nyem "+" txhawm rau nthuav nws,
  4. Xaiv "Cov ntsiab lus" thiab nyem rau ntawm lub pob xiav nrog 3 dots …
  5. 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
  6. 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
  7. 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

Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
  1. Ntxiv 2x "Debounce Button" tivthaiv
  2. Ntxiv "Pib Rov Ua Dua" khawm tivthaiv
  3. Ntxiv "Text Array" tivthaiv
  4. Ntxiv "Analog Array" tivthaiv
  5. Ntxiv 2x "Counter" tivthaiv
  6. Ntxiv "Moos Demux (Ntau Qhov Chaw Tso Tawm Hloov)" tivthaiv
  7. Ntxiv "Decode (Split) Date/Time" tivthaiv
  8. Ntxiv "FormattedText1" tivthaiv

Kauj Ruam 5: 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 "FormattedText1" tivthaiv thiab hauv qab "Properties" window teeb tsa "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 "TextElement1" ntawm sab laug thiab hauv cov khoom qhov rai teeb tsa "Sau Tus Cwj Pwm" rau: 0 thiab "Ntev" txog: 2
  4. Xaiv "TextElement2" ntawm sab laug thiab hauv cov khoom qhov rai teeb tsa "Sau Tus Cwj Pwm" rau: 0 thiab "Ntev" txog: 2
  5. Xaiv "TextElement3" ntawm sab laug thiab hauv cov khoom qhov rai teeb tsa "Sau Tus Cwj Pwm" rau: 0 thiab "Ntev" txog: 2
  6. Xaiv "ClockDemmux1" tivthaiv thiab nyob rau hauv lub qhov rai khoom teeb tsa "Tus lej Pins" rau: 5
  7. Xaiv "Counter1" tivthaiv thiab hauv cov khoom qhov rai nthuav dav "Max" thiab teeb tsa "Tus nqi" rau: 4
  8. Xaiv "Counter1" tivthaiv thiab hauv cov khoom qhov rai nthuav dav "Min" thiab teeb "Tus nqi" rau: 0
  9. Xaiv "Counter2" tivthaiv thiab hauv cov khoom qhov rai nthuav dav "Max" thiab teeb tsa "Tus nqi" rau: 6
  10. Xaiv "Counter2" tivthaiv thiab hauv cov khoom qhov rai nthuav dav "Min" thiab teeb "Tus nqi" rau: 0BUILDING MENU:
  11. 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:
  12. 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

Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
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" tus pin A (M5) rau "Button2" tus pin [Hauv]
  2. Txuas "M5 Stack Stick C" tus pin [B] mus rau "Button1" tus pin [Hauv]
  3. Txuas "Button2" tus pin [Tawm] rau 'RepeatButton1 "tus pin [Hauv]
  4. Txuas "RepeatButton1" tus pin [Tawm] rau "ClockDemmux1" tus pin [Hauv]
  5. Txuas "Button1" tus pin [Tawm] rau "Counter1" tus pin [Hauv]
  6. Txuas "M5 Stack Stick C"> "Lub Sijhawm Tswb Tswb Tswb (RTC)" tus pin [Tawm] rau "DecodeDateTime1" tus pin [Hauv]
  7. Txuas "DecodeDateTime1" tus pin [Teev] rau "FormattedText1"> "TextElement1" tus pin [Hauv]
  8. Txuas "DecodeDateTime1" tus pin [feeb] mus rau "FormattedText1"> "TextElement2" tus pin [Hauv]
  9. Txuas "DecodeDateTime1" tus pin [Thib Ob] rau "FormattedText1"> "TextElement3" tus pin [Hauv]
  10. Txuas "FormattedText1" tus pin [Tawm] rau "M5 Stack Stick C" board> "Display ST7735"> "Text Field1" pin [In]
  11. Txuas "Counter1" tus pin [Tawm] rau "ClockDemmux1" tus pin [Xaiv] thiab rau "Array1" tus pin [Index]
  12. Txuas "Counter2" tus pin [Tawm] rau "Array2" tus pin [Index]
  13. Txuas "Array1" tus pin [Tawm] mus rau "M5 Stack Stick C" board> "Display ST7735"> "Text Field2" pin [In]
  14. Txuas "Array2" tus pin [Tawm] mus rau "M5 Stack Stick C" board> "Display ST7735"> pin [Brightness]
  15. Txuas "ClockDemmux1" tus pin [1] rau "M5 Stack Stick C" board> "Lub Sijhawm Tswb Tswb Tswb (RTC)"> "Teeb Sijhawm 1" tus pin [Clock]
  16. Txuas "ClockDemmux1" tus pin [2] mus rau "M5 Stack Stick C" board> "Lub Sijhawm Tswb Tswb Tswb (RTC)"> "Teeb Minute1" tus pin [Clock]
  17. Txuas "ClockDemmux1" tus pin [3] rau "M5 Stack Stick C" board> "Lub Sijhawm Tswb Tswb Tswb (RTC)"> "Teeb Thib Ob" pin [Clock]
  18. Txuas "ClockDemmux1" tus pin [4] rau "Counter2" tus pin [Hauv]

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

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