Cov txheej txheem:

Ntse Tsev Siv Amazon Alexa: 5 Kauj Ruam
Ntse Tsev Siv Amazon Alexa: 5 Kauj Ruam

Video: Ntse Tsev Siv Amazon Alexa: 5 Kauj Ruam

Video: Ntse Tsev Siv Amazon Alexa: 5 Kauj Ruam
Video: Xyw By Nquab Tsab New Song 2022-2023 2024, Hlis ntuj nqeg
Anonim
Ntse Tsev Siv Amazon Alexa
Ntse Tsev Siv Amazon Alexa

Lub tswv yim yooj yim tom qab txoj haujlwm no yog tswj hwm cov khoom siv hluav taws xob siv Amazon Alexa lossis los ntawm nws app los ntawm txhua qhov chaw hauv ntiaj teb. Peb yuav siv Node MCU V1.0 rau qhov no. Txhua tus lej yuav nyob ntawm kuv nplooj Github. Yog tias ntawm ib qho twg koj tsis nkag siab ib qib xav tawm tswv yim hauv qab no thiab kuv yuav teb rau nws thaum ntxov. Txhua Khab nias rau cov servers nrog rau cov cai mus rau kakopappa (https://github.com/kakopappa). Kuv tau hloov kho txoj cai los tswj 4 Relays rau lub hom phiaj ntawm qhov kev qhia no. Zoo, Cia peb pib!

Nco tseg: Cov ntawv qhia no xav tias koj muaj qee qhov kev paub txog Arduino IDE thiab Node MCU.

Khoom siv

  1. Node MCU V1.0
  2. 4 Relays (Relay Bank)
  3. Jumper xov hlau
  4. Cov qhob cij
  5. Ib Lub Hwj Huam Sab Nraud

Kauj Ruam 1: Tsim Tus Kheej ntawm Sinric.com

Tsim tus as khauj ntawm Sinric.com
Tsim tus as khauj ntawm Sinric.com
Tsim tus as khauj ntawm Sinric.com
Tsim tus as khauj ntawm Sinric.com
Tsim tus as khauj ntawm Sinric.com
Tsim tus as khauj ntawm Sinric.com

Thawj qhov uas koj yuav tsum ua yog mus rau sinric.com thiab tsim tus as khauj (Nws Dawb). Sinric tso cai rau koj los tswj koj tus tswj hwm micro hauv internet. Tom qab ntawd koj yuav tau txais tus lej API uas yuav tshwj xeeb rau koj tus lej nyiaj. Koj yuav siv tus yuam sij no tom qab hauv koj cov cai. Qhov tom ntej no peb yuav tsum ua yog ntxiv ib lub cuab yeej. Qhov no yog ua tiav los ntawm Nyem rau ntawm "Ntxiv" khawm. Tsim lub npe rau koj lub cuab yeej uas koj yuav siv los hu los ntawm Alexa. Hauv hom ntaus ntawv xaiv "Hloov" thiab tom qab ntawd nyem Txuag. Qhov no yuav tsim tus lej ntaus ntawv rau koj lub cuab yeej uas tseem yuav siv rau hauv txoj cai. Hauv Alexa app pab kom Sinric txawj rau koj li Amazon echo kom nws tuaj yeem tshawb pom cov cuab yeej tsim tshiab.

Kauj ruam 2: Txuas lub Circuit Court

Kev tiv thaiv kab mob
Kev tiv thaiv kab mob
Kev tiv thaiv kab mob
Kev tiv thaiv kab mob

Hlau txuas hauv qab raws li hauv qab no lossis ua raws daim duab fritizing txuas nrog:

Txuas- ESP

VCC ----- Vin

IN1 ------ D5

IN2 ------ D4

IN3 ------ RX

IN4 ------ D2

JD-VCCPositive ntawm Cov Khoom Siv Hluav Taws Xob sab nraud

GND ----- GND ntawm Cov Khoom Siv Hluav Taws Xob sab nraud

Txij li NodeMCU tsis tuaj yeem siv lub txhab nyiaj txuas mus ib leeg ntxiv rau lub zog sab nraud xav tau los txhawb nws.

Cov txuas txuas tau txuas nrog nruab nrab ntawm cov cuab yeej siv los ntawm kev ua txhaum cov xov hlau nyob thiab tso lawv rau hauv txhua qhov txuas ib yam li hauv kev hloov pauv.

Kauj Ruam 3: Tshaj Tawm Txoj Cai rau NodeMcu

Txoj Cai tau muab tso rau ntawm no:

Cov tsev qiv ntawv koj yuav xav tau yog ArduinoJson (nruab version 5.13.2) thiab Arduino websockets (tau los ntawm:

Tsis txhob hnov qab teeb tsa Pawg Thawj Coj rau Node MCU v1.0.

Raws li tus naj npawb ntawm kev xa xov uas koj xav tau koj tuaj yeem hloov kho qhov chaws kom ntxiv ntau ntxiv. Cov kev hloov pauv xav tau yuav yog txhawm rau txheeb tus pin tshiab thiab ntxiv lwm qhov yog lub voj nrog tus lej ntaus ntawv tshiab. Koj tuaj yeem hloov pauv tus pin raws li qhov koj nyiam los ntawm kev rov ua dua rau daim duab kab ntawv no ntawm

Qhov no qhia koj tias GPIO yog dab tsi hauv Arduino. Yeej yog tias koj xav hloov koj tus lej txuas ntawm D4 rau D3 qhov kev hloov pauv hauv cov cai yuav yog raws li hauv qab no:

Yav dhau los Code:

#define MYPIN2 2 // D4

Txoj Cai Tshiab:

#define MYPIN2 0 // D3

Nco tseg:

Txhua yam tom qab // yog cov lus tawm ntawm kab ib yam thiab tsis suav nrog los ntawm tus sau.

Kauj ruam 4: Kho lub Amazon Echo

Kev teeb tsa Amazon Echo
Kev teeb tsa Amazon Echo
Kev teeb tsa Amazon Echo
Kev teeb tsa Amazon Echo

Txhawm rau Tswj cov cuab yeej siv Amazon Echo koj yuav tsum xub teeb tsa lawv. Koj tuaj yeem ua qhov no los ntawm kev hais "Alexa, Tshawb Pom Li Cas". Nws yuav siv 20 vib nas this thiab nws yuav tsum pom koj cov keyboards. Tam sim no koj tuaj yeem hais "Alexa, Qhib lub npe ntaus ntawv" kom qhib koj lub cuab yeej thiab hloov pauv. Koj tuaj yeem tswj hwm nws los ntawm Alexa app ib yam los ntawm kev mus rau ntu Cov Khoom Siv ntawm lub app.

Kauj ruam 5: Qhov Kawg

Kuv vam tias koj tsis tau ntsib teeb meem thaum ua raws li Cov Lus Qhia no. Yog tias koj muaj lus nug thov tso lawv hauv qab hauv kab lus.

Yog tias koj xav txhawb kuv txhua txoj hauv kev ntawm no yog kuv li Paypal ID: paypal.me/sahilgoel2001

Pom zoo: