Cov txheej txheem:

Kev Nyuaj Arduino GSM Xov Tooj Xov Tooj: 10 Kauj Ruam
Kev Nyuaj Arduino GSM Xov Tooj Xov Tooj: 10 Kauj Ruam

Video: Kev Nyuaj Arduino GSM Xov Tooj Xov Tooj: 10 Kauj Ruam

Video: Kev Nyuaj Arduino GSM Xov Tooj Xov Tooj: 10 Kauj Ruam
Video: Программирование Arduino с оптическим энкодером Epson и двигателем постоянного тока — серия DIY DTG 2024, Hlis ntuj nqeg
Anonim
Lub Teeb Nyeem Arduino GSM Txawb Xov Tooj
Lub Teeb Nyeem Arduino GSM Txawb Xov Tooj

Nyob zoo phooj ywg.

Txais tos. Hauv kab ntawv 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:

  • Hu
  • Txais Hu
  • Xa SMS
  • 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 paub nrog Nextion TFT ntse tshiab LCD Kov Zaub 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:

Qhov Yuav Tsum Tau
Qhov Yuav Tsum Tau
  • Arduino Ib.
  • SIM900A GSM module.
  • Nextion TFT Intelligent LCD Touch display.
  • SIM daim npav.
  • Txuas Txuas.

Kuj tseem muaj qee cov khoom siv xaiv tau.

  • Sab Nraud Mic & Hais Lus.
  • 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 tus pin 11
  • Nextion Tx rau Arduino tus pin 10
  • Nextion GND rau Arduino GND_0v.
  • GSM Rx rau Arduino tus 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
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.

Kauj Ruam 4: Cov Cuab Yeej Yuav Tsum Tau:

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

Kauj Ruam 5: Qhov program Nextion Zaub:

Program qhov Nextion Zaub
Program qhov Nextion Zaub
Program qhov Nextion Zaub
Program qhov Nextion Zaub
Program qhov Nextion Zaub
Program qhov Nextion Zaub

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 [https://material.io/resources/icons/?style=baselin…]. 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 [https://nextion.tech/instruction-set/]

Saib tag nrho cov duab kom zoo dua qhov nkag siab.

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 tias thaum kawg koj yuav txaus siab rau qhov tshwm sim tiag tiag, qhov txiaj ntsig kawg yog qhov txaus ntshai heev.

Cov kauj ruam:

  • Thauj lub. HMI cov ntaub ntawv rau hauv tus editor.
  • Scroll cia kom pom kuv ntu GitHub chaw cia khoom ntawm nplooj ntawv no. Sau cov ntaub ntawv. HMI (tsuas yog hauv qab ntawv qhia zaub mov bar).
  • 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.
  • Thaum theej tawm, ntxig daim npav SD rau hauv Nextion thiab tom qab ntawd power_on.
  • Tos rau.tft kom rub tawm.
  • Power_off the Nextion, tshem tawm daim npav SD kom nyab xeeb thiab tom qab ntawd rov power_on. Voila, koj yuav tsum pom koj cov kev cuam tshuam tshiab ntawm Nextion Display.

Kauj Ruam 6: Simulation

Simulation
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 7: 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 raws li cov khoom 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 qhov 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 8: Cov Cai Tau Txais:

Koj tuaj yeem rub tawm qhov ua tiav ntawm txoj haujlwm no los ntawm kuv GitHub los ntawm txhaj qhov no [https://github.com/ssrijantanwar/Lightweight-Arduino-GSM-Mobile]

Kauj Ruam 9: Qhia tawm

Image
Image

Kauj ruam 10: BONUS

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. Kev lom zem. Cheers. Ua tsaug rau kev nyeem thiab sib qhia.

Pom zoo: