Cov txheej txheem:

TTGO T-Watch: 9 Kauj Ruam (nrog Duab)
TTGO T-Watch: 9 Kauj Ruam (nrog Duab)

Video: TTGO T-Watch: 9 Kauj Ruam (nrog Duab)

Video: TTGO T-Watch: 9 Kauj Ruam (nrog Duab)
Video: TTGO T-Block - платформа для разработки на ESP32 с круглым дисплеем (GC9A01) 2024, Kaum ib hlis
Anonim
Image
Image
TTGO T-Saib
TTGO T-Saib

Cov lus qhia no qhia yuav pib ua si nrog TTGO T-Watch li cas.

Kauj Ruam 1: TTGO T-Watch yog dab tsi?

TTGO T-Watch yog dab tsi?
TTGO T-Watch yog dab tsi?
TTGO T-Watch yog dab tsi?
TTGO T-Watch yog dab tsi?
TTGO T-Watch yog dab tsi?
TTGO T-Watch yog dab tsi?
TTGO T-Watch yog dab tsi?
TTGO T-Watch yog dab tsi?

TTGO T-Watch yog saib cov duab ESP32 raws li cov cuab yeej txhim kho. 16 MB nyem thiab 8 MB PSRAM ob qho tib si yog qhov tshwj xeeb tshaj plaws. Nws kuj tseem ua-nyob rau hauv 240x240 IPS LCD, kov lub vijtsam, micro-SD daim npav chaw nres nkoj, I2C chaw nres nkoj, RTC, 3-axis accelerometer thiab khawm kev cai. Lub dav hlau rov qab kuj tseem tuaj yeem hloov mus rau lwm cov qauv xws li LORA, GPS thiab SIM.

Tab sis qhov tseem ceeb tshaj plaws nws tuaj yeem dhau los ua siv tau yog lub zog siv hluav taws xob. Nws koom ua ke AXP202 multi-channel programmable tswj lub zog nti. Nov yog thawj zaug kuv pom cov khoom siv txhim kho uas muaj I2C tswj lub hwj chim nti!

Raws li AXP202X_Library interface, koj tuaj yeem tswj hwm txhua lub zog hluav taws xob qhib thiab tawm, nyeem qib roj teeb, them nqi xwm txheej thiab txawm tias kaw lub zog ncaj qha, ib yam li thawb lub zog khawm.

Ref.: Yog

github.com/Xinyuan-LilyGO/TTGO-T-Watch

Kauj ruam 2: Yooj Yim Saib PoC

Yooj Yim Saib PoC
Yooj Yim Saib PoC

Lub hwj chim nti zoo li zoo, tab sis nws siv sijhawm ntev npaum li cas rau hauv 180 mAh roj teeb?

Txij li nws tau tsim los ua kev saib xyuas lub sijhawm, cia pib nrog qhov piv txwv saib yooj yim xws li PoC los tshuaj xyuas seb lub hwj chim nti ua haujlwm li cas.

Kauj Ruam 3: Tsim Saib Lub Ntsej Muag

Tsim Saib Lub Ntsej Muag
Tsim Saib Lub Ntsej Muag

ESP32 yog lub zog muaj zog heev, 240 Mhz dual core CPU thiab 80 Mhz SPI nrawm tuaj yeem tsim cov qauv zoo nkauj. Yog li kuv tsim lub ntsej muag saib ncaj ncees nrog cheb ob txhais tes tas mus li.

Txawm li cas los xij, kev tsim teeb meem yog qhov tsis tau xav txog yav dhau los, nws tsis yooj yim los tshem qhov thib ob txhais tes yam tsis tas yuav ntsais muag. Kuv tau sim 4 txoj hauv kev ntxiv los ua nws. Cov duab saum toj no qhia txog kev rov ua tsis tiav uas tseem nyob zaum thib ob pixels tsis raug tshem tawm ntawm lub vijtsam. Tus tsim saib lub ntsej muag ua haujlwm muaj ntau lo lus tuaj yeem hais tab sis me ntsis sab nraum txoj haujlwm no. Tej zaum kuv tuaj yeem hais ntau ntxiv txog kev tsim qauv hauv kuv cov lus qhia tom ntej, nws yuav tsum raug hu ua "Arduino Watch Core".

Kauj Ruam 4: Teem Sijhawm

T-Watch muaj built-in RTC nti, uas txhais tau tias nws tuaj yeem khaws lub sijhawm nruab nrab ntawm kev rov pib dua thaum txhim kho. Ua ntej nws tuaj yeem khaws sijhawm, peb yuav tsum teem sijhawm ua ntej.

Muaj ntau txoj hauv kev los teem sijhawm:

  • ESP32 muaj peev xwm WiFi, yog li koj tuaj yeem sib txuas sijhawm nrog NTP
  • zoo ib yam li lwm cov khoom siv hluav taws xob, zoo li lub koob yees duab digital, koj tuaj yeem sau UI los teeb lub sijhawm
  • koj tuaj yeem siv GPS rov qab, tom qab ntawd koj tuaj yeem tau txais lub sijhawm los ntawm satellite

Txhawm rau ua kom yooj yim, nws tseem yog qhov sib txawv siv txoj hauv kev los teeb tsa lub sijhawm, koj tuaj yeem nrhiav txoj hauv kev no ntawm qee qhov piv txwv TFT moos. Thaum koj suav qhov kev zov me nyuam hauv Arduino, tus txheej txheem ua tiav tau piav qhia 2 qhov sib txawv "_DATE_" thiab "_TIME_" txhawm rau sau sijhawm suav sau. Peb tuaj yeem siv cov ntaub ntawv no los ua qhov haujlwm yooj yim heev los teeb lub sijhawm RTC.

Nco tseg:

Txoj haujlwm yooj yim no ib txwm teeb tsa lub sijhawm ntawm khau raj. Tab sis lub sijhawm suav sau tsuas yog siv tau ntawm thawj zaug khau raj, yog li koj yuav tsum sau dua nrog lwm txoj haujlwm thaum nws teeb tsa lub sijhawm ua tiav.

Ref.: Yog

gcc.gnu.org/onlinedocs/cpp/Standard-Predef…

Kauj Ruam 5: Kev Siv Hluav Taws Xob

Kev Siv Hluav Taws Xob
Kev Siv Hluav Taws Xob
Kev Siv Hluav Taws Xob
Kev Siv Hluav Taws Xob

Thaum lub moos khiav, qhia txuas ntxiv mus ob txhais tes, nws haus me ntsis ntau dua 60 mA. Vim lub zog txuag lub zog, nws yuav tsum mus rau hauv hom pw tsaug zog tom qab qee lub sijhawm.

Yog tias kuv tua lub teeb nraub LCD thiab hu rau ESP32 tsaug zog, nws poob rau ib puag ncig 7.1 mA. Nws tsuas tuaj yeem nyob ntev li ntawm 1 hnub rau lub roj teeb 180 mAh.

Kuv paub nyob ib puag ncig 6 mA tau noj los ntawm LCD nti. Raws li ST7789 cov ntaub ntawv, muaj cov lus txib kom nkag mus rau hom pw. Tab sis tam sim no lub tsev qiv ntawv TFT_eSPI tseem tsis tau pw hom API.

Thiab tseem muaj tseem nyob ib ncig ntawm 1 mA siv los ntawm qhov chaw.

Kauj Ruam 6: Programmable Power Management Chip

Image
Image
Program
Program

Muaj ntau cov chips hauv cov khoom siv txhim kho, raws li lawv cov ntaub ntawv, feem ntau ntawm lawv txhawb hom kev txuag hluav taws xob. Txawm li cas los xij, tsis yog txhua lub tsev qiv ntawv nthuav tawm lub zog txuag hom API. Thiab nws yog lub sijhawm ntev rau kev txuag hluav taws xob los ntawm kev txheeb xyuas thiab hu rau txhua tus qauv nkag mus rau hom pw.

Yuav ua li cas txog kev kaw lub hwj chim ib yam li ncaj qha thawb lub zog khawm? AXP202X_Library tuaj yeem ua nws los ntawm kev hu yooj yim kaw () ua haujlwm. Hauv hom kaw, nws tsuas yog siv me ntsis qis dua 0.3 mA. Nws tuaj yeem siv 25 hnub rau lub roj teeb 180 mAh!

Nco tseg:

Kuv nyuam qhuav tau them lub roj teeb ntawm 28 Lub Rau Hli, koj tuaj yeem ua raws kuv li twitter kom paub qhov tseeb roj teeb xwm txheej.

Hloov tshiab:

Lub roj teeb ntws tawm ntawm 18 Lub Xya Hli, lub roj teeb tuaj yeem kav 20 hnub. Thaum lub sijhawm kuv tshuaj xyuas ob peb zaug hauv ib hnub, Kuv xav tias lub moos tuaj yeem siv sijhawm 1-2 lub lis piam hauv kev siv ib txwm muaj.

Ref.: Yog

github.com/lewisxhe/AXP202X_Library/pull/2

Kauj Ruam 7: Txoj Haujlwm

  1. Ua raws https://github.com/Xinyuan-LilyGO/TTGO-T-Watch nplooj ntawv qhia kev teeb tsa software thiab tsev qiv ntawv.
  2. Rub tawm qhov chaws ntawm GitHub:
  3. Qhib, suav thiab xa Set_RTC.ino hloov kho RTC hnub thiab sijhawm
  4. Qhib, suav thiab xa Arduino-T-Watch-simple.ino
  5. Ua tiav!

Qhov kev saib xyuas yooj yim yuav ua:

  • nyeem RTC hnub thiab sijhawm
  • kos lub cim cim (koj tuaj yeem xaiv puag ncig lossis lub cim moos cim)
  • qhia txuas txuas ntxiv ob txhais tes
  • kaw fais fab tom qab 60 vib nas this (lossis koj tuaj yeem tuav lub hwj huam khawm kom kaw tam sim)
  • nias lub hwj huam khawm kom qhib nws dua

Kauj Ruam 8: Zoo Siab Ua Haujlwm

Zoo siab Programming!
Zoo siab Programming!

TTGO T-watch tuaj yeem ua ntau yam ntxiv uas yooj yim saib, piv txwv.

  • ESP32 tuaj yeem ua WiFi thiab BT kev sib txuas lus wireless
  • siv lub vijtsam kov lub vijtsam tuaj yeem txhim kho UI zoo nkauj dua
  • onboard peb-axis accelerometer (BMA423), built-in step counter algorithm thiab lwm yam muaj nuj nqi GSensor
  • lub dav hlau hloov pauv tau ntxiv LORA, GPS, SIM ua haujlwm
  • I2C chaw nres nkoj tuaj yeem nthuav dav ntau yam ntxiv

Kauj Ruam 9: Arduino-T-Watch-GFX

Image
Image

Arduino-T-Watch-yooj yim xav tau nias thiab tuav lub zog me me khawm kom sawv thiab LCD pib qhia ob peb lub hlis qeeb. Yog li cov neeg siv kev paub tsis zoo li ntawd.

Kuv tau ntxiv lwm qhov program hu ua Arduino-T-Watch-GFX txhawm rau txhim kho qhov no. Txoj haujlwm no hloov pauv siv Arduino_GFX cov tsev qiv ntawv tso saib, tom qab ntawd nws tuaj yeem qhia cov zaub nkag mus pw hauv hom kom txuag lub zog. Yog li thaum ESP32 nkag mus pw tsaug zog, nws tsuas yog haus qis dua 3 mA tam sim no. Thiab tam sim no nws tuaj yeem ua rau sawv los ntawm kov lub vijtsam. ESP32 sawv thiab tso pw tsaug zog nrawm dua li tag nrho cov txheej txheem rov ua haujlwm, koj tuaj yeem pom cov vis dis aus saum toj no nws yuav luag teb tam sim. Hauv kev xav, lub roj teeb yuav tsum muaj peev xwm kav ntev dua 2 hnub: P.

Pom zoo: