Cov txheej txheem:

Arduino BiJin ToKei: 11 Kauj Ruam
Arduino BiJin ToKei: 11 Kauj Ruam

Video: Arduino BiJin ToKei: 11 Kauj Ruam

Video: Arduino BiJin ToKei: 11 Kauj Ruam
Video: Mini Wifi Radio 2024, Kaum ib hlis
Anonim
Arduino BiJin ToKei
Arduino BiJin ToKei
Arduino BiJin ToKei
Arduino BiJin ToKei

Cov lus qhia no qhia yuav siv Arduino IDE, ESP32 dev board thiab ILI9341 LCD los ua lub moos yees duab.

Kauj ruam 1: BiJin ToKei yog dab tsi?

BiJin ToKei yog dab tsi?
BiJin ToKei yog dab tsi?

Rov ua dua los ntawm kuv qhov kev nkag siab yav dhau los, ESP32 Lub Sijhawm Yees Duab:

BiJin ToKei from 美人 時 計) from pib txij xyoo 2009, lawv pom ntau yam kev zoo nkauj tuav lub rooj tswj hwm lub sijhawm qhia txhua feeb. BiJin ToKei muab daim ntawv thov web thiab mobile app version. Tom qab xyoo no, koj tuaj yeem pom ntau yam kev hloov pauv ntawm lub vev xaib tam sim no.

www.bijint.com

ja.wikipedia.org/wiki/BIJIN%26Co.

deadoralive.wikia.com/wiki/Bijin_Tokei

twitter.com/search?q=%23bijintokei

Kauj ruam 2: Arduino Version

Arduino Version ntawm
Arduino Version ntawm

Kuv qhov kev nkag siab yav dhau los, ESP32 Lub Sijhawm Yees Duab, ua haujlwm tau zoo. Txawm li cas los xij, txoj haujlwm tau tsim los ntawm ESP-IDF. Qhov no yog ib qho teeb meem loj rau tus pib. Txij li Aruino-esp32 lub moj khaum tau loj dua tam sim no, siv lub moos yees duab ntawm Arduino IDE dhau los ua yooj yim dua.

Kauj ruam 3: Kev npaj

Kev npaj
Kev npaj
Kev npaj
Kev npaj
Kev npaj
Kev npaj

ESP32 Dev Board

Ib qho ESP32 dev pawg thawj coj yuav tsum ua tau zoo.

Stacking Header

Lub 8-pins stacking poj niam lub taub hau. Khoov cov kab taub hau ntev tuaj yeem pab kho qhov pom ntawm LCD.

Cov qhob cij

Ib qho 400 khi ntsiab lus qhob cij.

Breadboard Hlau

Qee lub breadboard dhia xaim.

Zaub Zaub

Lub sijhawm no kuv siv 2.8 nti ILI9341 LCD. Txoj haujlwm no siv Arduino_GFX lub tsev qiv ntawv, yog li feem ntau SPI LCD Zaub yuav tsum yog.

Arduino_GFX tam sim no txhawb nqa:

  • HX8352C 240x400
  • HX8357B 320x480
  • IB 9225 176x220
  • Ib 9341 240x320
  • ILI9341 M5Stack 320x240
  • ILI9486 320x480 (18 xim)
  • SIB 525 160x128
  • SSD1331 96x64
  • SSD1351 128x128
  • SSD1351 128x96
  • ST7735 128x128 (ntau lub tab)
  • ST7735 128x160 (ntau lub tab)
  • SWB 7735 80x160
  • SWB 7789 240x135
  • SWB 7789 240x240
  • ST7789 TTGO T-Saib 240x240
  • SWB 7789 240x320

Kauj Ruam 4: Txuas ESP32 Dev Board ntawm Breadboard

Plug ESP32 Dev Board ntawm Breadboard
Plug ESP32 Dev Board ntawm Breadboard

Kauj Ruam 5: Khoov Lub Taub Hau Header & Plug ntawm LCD

Khoov Stacking Header & Plug ntawm LCD
Khoov Stacking Header & Plug ntawm LCD

Kauj Ruam 6: Txuas LCD ntawm Breadboard

Plug LCD ntawm Breadboard
Plug LCD ntawm Breadboard

Kauj ruam 7: Kev sib txuas

Kev sib txuas
Kev sib txuas

Siv Breadboard dhia xaim txuas LCD thiab ESP32 dev board ua ke.

Nov yog cov ntsiab lus sib txuas:

LCD -> ESP32

=== ===== Vcc -> 5V tus pin (lossis 3.3V tus pin nyob ntawm koj lub vijtsam LCD) GND -> GND CS -> GPIO 5 RESET -> GPIO 17 D/C -> GPIO 16 MOSI -> GPIO 23 SCK -> GPIO 18 LED -> GPIO 22 (Tsis teb los tau, qee qhov LCD xav tau ncaj qha ntsaws tus pin rau 3.3V tus pin kom nws ci dua)

Kauj Ruam 8: Kev Npaj Software

Arduino IDE Cov

Rub tawm thiab teeb tsa Arduino IDE yog tias tseem tsis tau:

Arduino ESP32 Txhawb

Thov ua raws li Cov Lus Qhia Kev Txhim Kho ntawm GitHub:

Arduino GFX lub tsev qiv ntawv

Ntxiv Arduino_GFX lub tsev qiv ntawv rau Arduino IDE:

Yog tias koj tsis paub ntxiv lub tsev qiv ntawv los ntawm GitHub, yooj yim nias lub ntsuab "Clone lossis rub tawm" khawm thiab tom qab ntawd "Download ZIP". Thiab tom qab ntawd hauv Arduino IDE, xaiv Sketch menu -> suav nrog Tsev qiv ntawv -> Ntxiv. ZIP Library … -> xaiv rub tawm ZIP cov ntaub ntawv.

Arduino BiJin ToKei Source Code

Rub tawm qhov chaws los ntawm GitHub:

Kauj Ruam 9: Nws Ua Haujlwm Li Cas?

Nov yog qhov haujlwm ua haujlwm:

Teeb

Pib LCD, koj tuaj yeem hloov tus pin thiab tus tsav tsheb kom haum rau koj cov zaub

Arduino_HWSPI *npav = tshiab Arduino_HWSPI (16 / *DC * /, 5 / *CS * /, 18 / *SCK * /, 23 / *MOSI * /, -1 / *MISO * /);

Arduino_ILI9341 *tft = tshiab Arduino_ILI9341 (tsheb npav, 17 / *RST * /, TFT_ROTATION);

Txuas WiFi, nco ntsoov sau koj li WiFi AP chaw

#define SSID_NAME "YourAP"

#define SSID_PASSWORD "YourPassword"

Txuas NTP server kom tau txais lub sijhawm tam sim no, koj tuaj yeem hloov pauv koj li NTP server thiab thaj chaw sijhawm

const char* ntpServer = "pool.ntp.org";

#define GMT_OFFSET_SEC 28800L // Timezone +0800 #define DAYLIGHT_OFFSET_SEC 0L // tsis muaj hnub ci txuag

Loop

Yog feeb hloov, ua HTTP thov mus rau qhov ua ntej URL hauv URL.h. Muaj ntau qhov URL hauv ToKei cov npe, thov nyeem cov lus hauv URL.h kom paub meej ntxiv

#define JPG_SCALE JPG_SCALE_NONE

#define TFT_ROTATION 0 // portrait #define URL "https://www.bijint.com/assets/pict/shizuoka/bp/%02d%02d.jpg"

  • Tau txais HTTP cov lus teb JPEG kwj thiab pub rau esp_jpg_decode
  • esp_jpg_decode pub cov duab txiav txim siab rau LCD kos ua haujlwm

Kauj ruam 10: Txoj haujlwm

Qhib ArduinoBiJinToKei.ino hauv Arduino IDE, suav thiab xa cov program rau ESP32 dev board.

Kauj ruam 11: Lub Sijhawm Zoo Siab

Sijhawm Zoo Siab!
Sijhawm Zoo Siab!

Nws yog lub sijhawm los tso Arduino BiJin ToKei ntawm koj lub desktop thiab qhia tawm yam koj tau ua. Txaus siab rau!

Pom zoo: