Cov txheej txheem:

Lub Teeb Arduino GSM Xov Tooj Xov Tooj: 7 Kauj Ruam (nrog Duab)
Lub Teeb Arduino GSM Xov Tooj Xov Tooj: 7 Kauj Ruam (nrog Duab)

Video: Lub Teeb Arduino GSM Xov Tooj Xov Tooj: 7 Kauj Ruam (nrog Duab)

Video: Lub Teeb Arduino GSM Xov Tooj Xov Tooj: 7 Kauj Ruam (nrog Duab)
Video: Arduino GSM Shield - Intro part 1 2024, Hlis ntuj nqeg
Anonim
Image
Image
Qhov Yuav Tsum Tau
Qhov Yuav Tsum Tau

Nyob zoo phooj ywg, Hauv cov lus qhia no kuv yuav qhia koj kuv Lub Teeb Nyeem Arduino GSM Txawb Xov Tooj. Lub teeb txawb tau muaj peev xwm ntawm cov hauv qab no Hauv Tebchaws/Thoob Ntiaj Teb nta:

  1. Hu.
  2. Txais Hu.
  3. Xa SMS.
  4. Tau txais SMS.

Hauv qhov haujlwm no, Kuv tau siv GSM SIM900A module txuas rau lub xov tooj ntawm tes. Nws yog qhov ntxim nyiam txhua-hauv-ib lub xov tooj ntawm tes uas tso cai rau koj ntxiv lub suab, SMS thiab cov ntaub ntawv rau koj cov haujlwm. Nws ua haujlwm ntawm zaus 900/1800MHz thiab los nrog tus phooj ywg RS232 uas tuaj yeem yooj yim cuam tshuam nrog txhua MCUs, tus nqi baud tuaj yeem kho tau los ntawm 9600 - 115200 los ntawm AT Commands.

Kuv kuj tseem siv cov zaub los pom GUI cuam tshuam, Kuv xaiv lub LCD kov zaub los ntawm Nextion, ntseeg kuv nws yog qhov zoo tshaj plaws. Nextion txais yuav txoj hauv kev tshiab thiab yooj yim los cuam tshuam ib qho ntawm koj cov phiaj xwm los ntawm UART. Nws yooj yim-rau-siv teeb tsa software (Nextion Editor) tso cai rau koj los tsim koj tus kheej cuam tshuam siv GUI cov lus txib thiab ua rau ib feem ntawm koj txoj kev txhim kho tsis siv zog, tig koj tuaj yeem txuag tau ntau qhov chaw hauv koj li MCUs. Ua tsaug rau Nextion !!..

Ntawm nws tus kheej, GSM module thiab Nextion kov zaub tsis tuaj yeem ua dab tsi. Nws xav tau lub microcontroller los tsav nws. Hauv plawv yog Arduino Uno tsav lub GSM txawb lub xov tooj uas hnyav, uas tuaj yeem xa thiab txais cov lus txib hla nws RX/TX pins.

Yog tias koj txaus siab ua koj li, phau ntawv qhia no yuav qhia koj yuav tsim thiab tso cov lej chaws li cas kom ua tiav koj txoj haujlwm. Qhov no yog txoj haujlwm ncaj ncaj, tab sis qhov nruab nrab ib qho tshwj xeeb tshaj yog thaum koj coj mus rau hauv tus account qhov nyuaj ntawm cov lej.

Txoj haujlwm no tseem yog ib qho piv txwv zoo ntawm kev siv arduino tshwj xeeb rau txoj hlua & tus cwj pwm li cas, nrog rau koj kom tau paub dua tshiab Nextion TFT Intelligent LCD Touch Display thiab siv AT cov lus txib rau GSM module. Vam tias koj yuav txaus siab thiab pom kuv cov ntawv nthuav tawm. Tam sim no cia peb ua nws.

Kauj Ruam 1: Qhov Yuav Tsum Tau:

Nov yog cov ntu xav tau rau qhov piv txwv no.

  1. Arduino Ib.
  2. SIM900A GSM module.
  3. Nextion TFT Intelligent LCD Touch display.
  4. SIM daim npav.
  5. Txuas Txuas.

Kuj tseem muaj qee cov khoom siv xaiv tau.

  1. Sab Nraud Mic & Hais Lus.
  2. Stylus.

Kauj ruam 2: Txuas:

Thaiv
Thaiv

Txuas GSM module thiab Nextion Display rau koj Arduino los ntawm ua raws cov kauj ruam tsim nyog hauv qab no.

  • Nextion +5V rau Arduino VDD_5v.
  • Nextion RX rau Arduino pin_11.
  • Nextion Tx rau Arduino pin_10.
  • Nextion GND rau Arduino GND_0v.
  • GSM Rx rau Arduino pin_1.
  • GSM TX to Arduino pin_0.
  • GSM GND rau Arduino GND_0v.

NCO TSEG: yog tias koj daim npav SIM raug kaw nrog tus lej PIN. Koj tuaj yeem kaw qhov PIN lossis nkag tus lej PIN ntawm 'AT+CPIN' cov lus txib ua ntej koj tuaj yeem txuas lub network. Piv txwv: “AT+CPIN = 1234”.

Kauj ruam 3: Teeb:

Teeb
Teeb
Teeb
Teeb
Teeb
Teeb

Tom ntej no, kuv yuav qhia koj yuav npaj li cas. HMI (Tib Neeg Lub Tshuab Kev Sib Txuas) rau Nextion zaub, yam tsis hnov qab daim duab Arduino.

Cov Cuab Yeej Yuav Tsum Tau:

  • Nextion Editor Cov.
  • Paint.net.
  • Arduino IDE Cov.

Program qhov Nextion zaub:

Txhawm rau Nextion tso saib cov cuam tshuam, thawj qhov uas yuav tsum tau ua yog tsim HMI cov ntaub ntawv hauv Nextion Editor. Tus kws sau ntawv no tso cai rau koj los tsim koj cov kev cuam tshuam siv cov khoom sib txuas thiab ua si zoo li (Cov ntawv, khawm, bar nce qib, duab, ntsuas, ntsuas lub thawv, xov tooj cua thiab ntau ntxiv), uas koj tuaj yeem teeb tsa cov lej & cov khoom rau txhua qhov ntawm cov khoom no.

Hauv txoj haujlwm no, kuv siv 8 nplooj ntawv los ua GUI sib tham. Feem ntau ntawm cov cim uas kuv siv rau kev coj ua yog muaj dawb hauv Android Icons thiab tuaj yeem rub tawm los ntawm qhov no [txuas]. Kuv siv paint.net (Open Source editor) txhawm rau kho/hloov pauv txhua daim duab thiab tsim qhov hloov pauv ntawm cov cim, kom muab qhov kev xav ntawm kov thaum cov khoom xws li cov nyees khawm raug nias. Kov cov xwm txheej zoo li (Xovxwm & Tshaj Tawm) kuj suav nrog thaum cov khoom raug kov. Yog tias koj txaus siab kom tau txais ntau ntxiv txog Nextion Kev Qhia Teeb koj tuaj yeem mus ntsib nplooj wiki ntawm no.

Kev teeb tsa Nextion zaub tsuas yog yooj yim ib yam li abc tab sis siv sijhawm txheej txheem tshwj xeeb tshaj yog thaum siv cov yam ntxwv zoo ib yam li cov lej thiab cov keyboard. Txawm li cas los xij, Kuv xav hais txog qhov kawg koj yuav txaus siab rau qhov tshwm sim, qhov kawg tau zoo kawg li zoo li cov duab saum toj no.

Cov kauj ruam:

  1. Thauj lub. HMI cov ntaub ntawv rau hauv tus editor. Scroll cia kom pom kuv ntu GitHub chaw cia khoom ntawm nplooj ntawv no.
  2. Sau cov ntaub ntawv. HMI (tsuas yog hauv qab ntawv qhia zaub mov).
  3. Mus rau cov ntawv> Qhib tsim nplaub tshev> luam cov ntawv.tft> muab tshuaj txhuam rau hauv SD daim npav.

    Nco tseg: xyuas kom tseeb tias daim npav SD tau teeb tsa rau FAT32

  4. Thaum theej tawm, ntxig daim npav SD rau hauv Nextion thiab tom qab ntawd power_on.
  5. Tos rau.tft kom rub tawm.
  6. Power_off the Nextion, tshem tawm daim npav SD kom nyab xeeb thiab tom qab ntawd rov ua zog_on.
  7. Voila !, koj yuav tsum pom koj qhov cuam tshuam tshiab ntawm Nextion Display.

Simulation:

Nexiton tseem muab qhov yooj yim sim los sim/debug cov ntaub ntawv. HMI zoo ua ntej koj txuas koj cov zaub rau koj MCUs. Qhov "Qhia Hauv Cheeb Tsam", tso cai rau koj ntxig cov lus txib xws li hloov nplooj, zais/qhia daim duab, qhib/qhib lub pob, pab/lov tes taw/ntxig cov ntawv & ntau ntxiv rau Nextion zaub. Ntawm lwm sab, "Simulator Rov Qab Cov Ntaub Ntawv" muab rau koj cov lus teb los ntawm cov xwm txheej kov thaum cov khoom siv ntawm Nextion zaub raug nias lossis txawm tias cov lus txib ua rau Nextion.

Kauj ruam 4: Program Arduino:

Program Arduino
Program Arduino
Program Arduino
Program Arduino
Program Arduino
Program Arduino

Ardiuno Uno yog lub hlwb ntawm tag nrho cov xov tooj ntawm tes, Arduino ua haujlwm nruab nrab uas cuam tshuam GSM Module thiab Nextion zaub.

Txog qhov haujlwm no, Kuv tsis tau siv ib lub tsev qiv ntawv Nextion, zoo li nws nyuaj rau nkag siab thiab tsis muaj cov ntaub ntawv thiab kuv cov duab tsis suav nrog thaum siv Nextion cov tsev qiv ntawv, vam tias yuav tau txais kev txhim kho sai. Xws li, Kuv txiav txim siab txav mus yam tsis siv lub tsev qiv ntawv, zoo li nyuaj txoj cai? Ntseeg kuv nws tsis yog.

Txhawm rau kom ua tiav txoj cai, yooj yim nqes mus nrhiav kuv qhov GitHub chaw cia khoom ntawm nplooj ntawv no. Luam cov cai, thiab muab nws tso rau hauv daim duab tshiab hauv Arduino IDE. Txuag nws, upload nws rau koj Arduino.

Qhov ntawd yog txhua yam rau software ib feem !! Sau cov cai. Yog tias tsis muaj qhov yuam kev, zoo siab nrog koj cov cuab yeej tam sim no tau teeb tsa los txuas rau lub xov tooj ntawm tes los ntawm GSM module. Qhib Serial saib, koj yuav tsum pom AT hais kom ua cav rau txhua qhov xwm txheej tshwm sim los ntawm Nextion Zaub.

Kauj Ruam 5: Cov Cai Tau Txais:

Cov Cai Codes
Cov Cai Codes

Koj tuaj yeem rub tawm qhov ua tiav ntawm txoj haujlwm no los ntawm kuv GitHub los ntawm txhaj qhov txuas no.

Kauj ruam 6: Demo:

Image
Image

Kauj Ruam 7: YUAV TSUM:

Los ntawm lub neej ntawd, GSM tus qauv muaj SMS tsis loj li ntawm 20. Hmoov tsis zoo, peb tsis tuaj yeem tso tawm txhua 20 SMS ib zaug ntawm Nextion zaub, tau txais tsis dhau thaum sau cov lej Nextion. Raws li xws li, kuv tau teeb tsa Nextion zaub hauv txoj hauv kev los nthuav qhia tsuas yog 10 SMS.

Yog tias muaj 10 lossis ntau dua SMS nyob ntawm GSM tsis, Lub cim cim nco qis yuav tshwm rau ntawm Nextion zaub, ceeb toom koj kom tshem tawm SMS yav dhau los txhawm rau saib SMS tshiab nyob rau hauv ib txoj kev zuj zus.

Kuv vam tias koj nyiam kuv cov ntawv thiab vam tias qhov kev qhia no pab koj nrhiav txoj hauv kev los siv koj tus kheej Arduino GSM Txawb thiab yog thov qhia ib qho ntawm koj qhov kev hloov pauv tshiab.

Muaj Kev Lom Zem.. Cheerz … Ua tsaug rau kev nyeem thiab sib qhia.

-Avishek Hardin

Pom zoo: