Cov txheej txheem:

Nextion Touchscreen Outlook Calendar Lub Rooj Sib Tham Nco: 6 Cov Kauj Ruam
Nextion Touchscreen Outlook Calendar Lub Rooj Sib Tham Nco: 6 Cov Kauj Ruam

Video: Nextion Touchscreen Outlook Calendar Lub Rooj Sib Tham Nco: 6 Cov Kauj Ruam

Video: Nextion Touchscreen Outlook Calendar Lub Rooj Sib Tham Nco: 6 Cov Kauj Ruam
Video: Huge Nextion Touchscreen Display Examples | Video | Gauges | RTC 2024, Hlis ntuj nqeg
Anonim
Nextion Touchscreen Outlook Calendar Lub Rooj Sib Tham Nco
Nextion Touchscreen Outlook Calendar Lub Rooj Sib Tham Nco

Qhov laj thawj kuv pib txoj haujlwm no yog vim ntau zaus kuv tsis ntsib cov rooj sib tham thiab xav tias kuv xav tau lub kaw lus ceeb toom zoo dua. Txawm hais tias peb siv Microsoft Outlook Calendar tab sis kuv siv kuv lub sijhawm feem ntau ntawm Linux/UNIX ntawm tib lub computer. Thaum ua haujlwm nrog Linux lub PC Outlook Calendar popup ceeb toom tau zais tom qab LInux VNC lossis tom qab lwm lub app ntawm kuv Windows.

Kuv tuaj nrog lub tswv yim ntawm kev nthuav tawm lub rooj sib tham ceeb toom saum kuv lub khoos phis tawj saib yog li nws pom ntau dua. Lub phiaj xwm yog kom muaj lub vijtsam kov kom rov qab tau kuv lub rooj sib tham tom ntej los ntawm Outlook Calendar, thiab lub pob nyem kom tso tseg lub rooj sib tham.

Khoom siv

Yuav tsum tau kho vajtse:

1. Nextion touchscreen (los ntawm $ 22)

2. Arduino Nano (los ntawm $ 4) lossis lwm pawg Arduino. Kuv khaws Nano vim yog cov khoom me me kom haum rau hauv rooj plaub me.

3. Mini USB cable

Tsis teb los tau: Nrhiav lub tshuab luam ntawv 3D lossis muab kev pabcuam 3D luam ntawv los luam lub casing.

Kuv tsim thiab 3D luam tawm rooj plaub kom haum rau kuv lub saib thiab nws yuav tsis haum rau lwm tus saib. Tej zaum koj yuav tsum tsim rooj plaub.

Saib cov vis dis aus hauv qab no kom pom thaum nws tsawg dua 60 vib nas this, lub sijhawm tab tom nco ua rau kuv ceeb toom kom pib khiav mus rau lub rooj sib tham.

Kauj ruam 1: Teeb Up Nextion Touchscreen

Teem Up Nextion Touchscreen
Teem Up Nextion Touchscreen
  1. Txhawm rau kawm paub txog Nextion muaj ntau cov ntawv qhia suav nrog los ntawm Lub Vev Xaib Qhia no, tshawb rau "Nextion".
  2. Koj tuaj yeem tau txais Nextion touchscreen los ntawm lub khw online xws li Amazon.com (saib daim duab)
  3. Rub tawm kuv cov ntawv Nextion rau qhov haujlwm no los ntawm qhov txuas hauv qab no. Koj tuaj yeem hloov kho nws raws li xav tau.
  4. Qhib cov ntawv siv Nextion Editor. Nextion Editor tuaj yeem rub tawm los ntawm:
  5. Siv Nextion Editor, xa cov ntawv mus rau Nextion.

Kauj ruam 2: Teeb Arduino

Teeb tsa Arduino
Teeb tsa Arduino
  • Zoo li Nextion, tsis txhob mus dhau qhov kev qhia ntev ntawm yuav siv Arduino li cas, koj tuaj yeem tshawb nrhiav rau kev qhia paub yuav siv Arduino li cas nrog rau lub vev xaib Qhia no.
  • Txhawm rau kom haum tag nrho cov kab ke mus rau hauv lub thawv me me, kuv xaiv yog Arduino Nano. Nws tseem me dua thiab muaj peev xwm txuas ncaj qha rau kuv lub PC USB. Xwb koj tuaj yeem siv tau ib qho Arduino board.
  • Koj tuaj yeem tau txais Arduino Nano los ntawm khw online xws li Amazon.com raws li qhia hauv daim duab, rau tsawg dua $ 4 txhua.
  • Rub tawm Nextion Arduino lub tsev qiv ntawv: https://github.com/itead/ITEADLIB_Arduino_Nextion thiab suav nrog nws rau hauv tsev qiv ntawv Arduino Sketch.
  • Los ntawm lub neej ntawd Nextion Arduino lub tsev qiv ntawv xav tias cov lej nyob hauv tus lej. Qhov no ua rau muaj teeb meem rau Arduino Nano (lossis ib qho ATmega raws cov laug cam xws li Arduino UNO), qhov twg tus lej yog 16-ntsis uas mus ntawm -32768 txog 32768. Yog tias koj siv 32-ntsis Arduino board xws li Arduino Due, Mega, lossis SAMD raws cov laug cam (MKR1000 thiab Xoom), tsis tas yuav hloov kho Nextion Arduino lub tsev qiv ntawv. Cov lus qhia hauv qab no qhia yuav hloov pauv ntawm tus lej "ntev" 32-ntsis tus lej uas mus los ntawm -2147483, 648 txog 2147483647. 32-ntsis xav tau vim tias lub sijhawm los tshuaj xyuas lub rooj sib tham yog vib nas this. Rau kev sib tham hauv 24 teev nws yog 86400 vib nas this uas dhau ntawm 16-ntsis integer.
  • Hloov kho Nextion Arduino lub tsev qiv ntawv los hloov tus lej los ntawm cov lej mus ntev:

    1. Ib zaug ntxiv, cov kauj ruam hauv qab no tsis siv rau 32-ntsis Arduino board.
    2. Mus rau Arduino Library nplaub tshev.
    3. Mus rau ITEADLIB_Arduino_Nextion-master nplaub tshev

      • Kho cov ntaub ntawv "NexNumber.h":

        Hloov kab: "bool setValue (uint32_t tus lej)"; rau "bool setValue (tus lej ntev)";

      • Kho cov ntaub ntawv "NexNumber.cpp":

        1. Hloov kab: "bool NexNumber:: setValue (uint32_t tus lej)" rau "bool NexNumber:: setValue (tus lej ntev)"
        2. Hloov kab: "itoa (tus lej, buf, 10);" rau "ltoa (naj npawb, buf, 10);"

Rub kuv tus lej Arduino rau hauv Arduino Nano:

Kauj Ruam 3: Teeb tsa Python

Teeb tsa Python
Teeb tsa Python

Kuv siv Python code kom rov qab tau Microsoft Outlook Calendar teem sijhawm/rooj sib tham thiab xa mus rau Nextion touchscreen ntawm USB Serial chaw nres nkoj. Yav dhau los kuv siv VB. Net tab sis Python yooj yim dua rau cov cai, tsis xav tau daim ntawv tso cai, thiab tuaj yeem siv rau hauv txhua lub operating system.

Muaj ntau ntau cov lus qhia yuav ua li cas rau nruab thiab ua haujlwm hauv Python. Thaum koj tau nruab Python, qhov tom ntej yog teeb tsa Kev sib txuas lus txuas los ntawm kev ntaus ntawv: "pip install pyserial" hauv kab hais kom ua.

Rub tawm kuv li Python code los ntawm qhov txuas hauv qab no:

Sab hauv Python code, koj yuav tsum hloov kho USB Serial chaw nres nkoj kom phim qhov chaw nres nkoj siv los ntawm koj lub computer. Txhawm rau kom paub tus lej chaw nres nkoj, txuas rau Arduino pawg thawj coj saib mus rau Tus Thawj Tswj Ntaus Ntawv. Hauv kuv qhov xwm txheej nws yog "COM12" (saib daim duab.

Python kab los hloov rau kuv qhov piv txwv:

myserial = MySerial ("COM12")

Nco tseg: Kuv npaj txuas ntxiv txhim kho Python code, suav nrog ntxiv GUI (Graphical User Interface) xws li rub tawm cov ntawv qhia zaub mov kom xaiv cov lej COM. Tom qab ntawd khawm kom pib thiab nres rov qab/xa daim ntawv sib tham rau lub touchscreen. Kuv xav kom ua raws cov lus qhia no kom tau txais qhov hloov tshiab kawg.

Kauj ruam 4: Kev thaiv kab

Thaiv
Thaiv
Thaiv
Thaiv

Nram qab no yog daim duab ntawm kev thaiv kab hlau:

Txuas ntxiv Arduino

==================================

5 V ---- VCC

TX ---- pin 10

RX ---- pin 11

GND ---- NCO

Txuas Arduino rau koj lub khoos phis tawj.

Kauj Ruam 5: Khiav Tests

Khiav Kev Xeem
Khiav Kev Xeem

Tom qab txuas lub Nextion rau Arduino thiab txuas Arduino rau lub khoos phis tawj USB chaw nres nkoj, tom qab ntawd nws tau npaj rau kev sim.

Thaum koj teeb tsa Python, yog tias koj khij lub npov ntxiv Python rau ib puag ncig Hloov Chaw, koj tuaj yeem yooj yim nyem kuv li Python cov ntaub ntawv: "calendar_nextion.py" tau hais hauv qib ua ntej. Muaj lub qhov rai pop-up (saib daim duab). Yog tias tsis yog, koj tuaj yeem ntxiv txoj hauv kev ntawm Python rau koj li Kev Hloov Pauv Ib puag ncig ua ntej. Lwm qhov kev xaiv yog siv Windows Command, mus rau daim nplaub tshev uas koj rub tawm "calendar_nextion.py" cov ntaub ntawv los ntawm kuv GitHub ces ntaus "python calendar_nextion.py".

Qhov kev zov me nyuam yuav khaws koj li Outlook Calendar sib tham txhua feeb. Nws yuav qhia cov feeb ntxiv lossis vib nas this ua ntej lub rooj sib tham tom ntej. Thaum nws tsawg dua 1 feeb, nws yuav pib suav txhua thib ob ua ntej pib kev sib tham tom ntej. Nov yog qhov uas koj yuav tsum tau khiav mus rau lub rooj sib tham:).

Yog tias koj nias lub "DISMISS" khawm, nws yuav hla qhov kev ceeb toom tom ntej tam sim no thiab dhia mus rau lub rooj sib tham tom ntej tom ntej.

Txaus siab rau ….

Kauj Ruam 6: Tsis teb los tau: khiav Python Code Yeej Nrog Chaw Nres Nkoj

Saib kuv cov lus qhia yuav ua li cas thiaj ua haujlwm ib qhov program, qhov no yog tus nab npawb nab npawb, cia li thaum koj ntsaws koj lub laptop rau hauv qhov chaw nres nkoj.

www.instructables.com/id/Start-a-Program-Automatically-When-Hooking-a-Lapto/

Pom zoo: