Cov txheej txheem:

NodeMCU Alexa TV Tswj: 6 Kauj Ruam
NodeMCU Alexa TV Tswj: 6 Kauj Ruam

Video: NodeMCU Alexa TV Tswj: 6 Kauj Ruam

Video: NodeMCU Alexa TV Tswj: 6 Kauj Ruam
Video: Smart Home with Google Assistant & Alexa using NodeMCU ESP8266 (Manual + Voice) | IoT Projects 2021 2024, Hlis ntuj nqeg
Anonim
NodeMCU Alexa TV Tswj
NodeMCU Alexa TV Tswj
NodeMCU Alexa TV Tswj
NodeMCU Alexa TV Tswj
NodeMCU Alexa TV Tswj
NodeMCU Alexa TV Tswj

Kawm paub yuav ua li cas Alexa tswj koj lub TV, nrog NodeMCU.

Yog tias koj nyiam txoj haujlwm no, xav tias yuav pov npav rau nws hauv Kev Sib Tw Sensors.

Khoom siv

Cheebtsam:

NodeMCU Esp8266 thiab Micro USB Cable nrog cov kab ntawv

IR Txais thiab IR LED

Arduino Uno rau nyeem IR cov cim

Ob 3mm LEDs (Kuv xaiv liab thiab ntsuab)

Ob 220 Ω Resistors

Ib lub Creadboard thiab Jumper Cables

Yeem: Kev Cai PCB, Cov Ntawv Txiav Laser, Standoffs, JST Cov Txuas, Hlau thiab Ib Leeg Poj Niam Header Pins

Cov Cuab Yeej:

Ib lub Computer

Tsis teb los tau: Ib tug Hlau Soldering, Hlau Cutter thiab PCB Holder

Kauj Ruam 1: Teeb Seem Sinric

Kev teeb tsa Sinric
Kev teeb tsa Sinric

Sinric los ntawm Kakopappa

1. Mus rau Sinric.com thiab sau npe rau tus as khauj.

2. Nkag mus thiab COPY koj tus lej API.

3. Tsim lub Smart Home Device tshiab los ntawm nias Ntxiv, thiab ntaus lub npe, thiab xaiv Hloov hauv Cov Ntaus Ntaus. Tom qab ntawv nyem Txuag.

4. Tam sim no koj yuav tsum pom lub cuab yeej tshiab ntawm lub dashboard. Luam tus ID ntaus ntawv.

Kauj Ruam 2: Teeb Arduino IDE

Teeb tsa Arduino IDE
Teeb tsa Arduino IDE
Teeb tsa Arduino IDE
Teeb tsa Arduino IDE

1. Rub tawm thiab teeb tsa Arduino IDE yog tias koj tsis tau ua dhau los, mus rau

2. Qhib Arduino IDE, thiab mus rau hauv Preferences. Tom qab ntawd hauv qab Tus Thawj Saib Xyuas Haujlwm Ntxiv URLs, ntxiv qhov URL no:

arduino.esp8266.com/stable/package_esp8266com_index.json

3. Rub cov ntawv ArduinoJson-v5.13.2.zip

4. Hauv Arduino IDE, mus rau Sketch → Suav Lub Tsev Qiv Ntawv → Ntxiv Zip Library thiab xaiv cov ntaub ntawv.zip.

5. Rov ua cov txheej txheem nrog cov ntaub ntawv arduinoWebSockets-2.1.1.zip:

6. Tam sim no nkag mus rau Sketch → suav nrog Lub Tsev Qiv Ntawv → Tswj Tsev Qiv Ntawv, thiab tshawb rau IRremoteESP8266. Xaiv Version 2.5.3, thiab nruab.

7. Kuj tseem teeb tsa IRremote lub tsev qiv ntawv, tib txoj kev (qhov hloov tshiab kawg).

8. Tom qab ntawv Tawm thiab rov pib dua IDE.

Kauj Ruam 3: Nyeem IR Cov Cim Los Ntawm TV Chaw Taws Teeb

Nyeem IR Cov Cim Los Ntawm TV Chaw Taws Teeb
Nyeem IR Cov Cim Los Ntawm TV Chaw Taws Teeb
Nyeem IR Cov Teeb Meem Los Ntawm TV Chaw Taws Teeb
Nyeem IR Cov Teeb Meem Los Ntawm TV Chaw Taws Teeb

1. Pib los ntawm kev txuas IR Tus Txais Txais rau Arduino Uno ntawm lub khob cij nrog Jumper Cables, raws li qhia hauv kab lus.

2. Rub tawm IRrecvDump_final.zip, unzip nws, thiab qhib.ino cov ntawv hauv Arduino IDE.

3. Txuas Arduino Uno rau hauv koj lub computer.

4. Hauv Arduino IDE, hauv Cov Cuab Yeej thiab Pawg Thawj Coj xaiv Arduino/Genuino Uno, thiab hauv qab Chaw Nkag, xaiv qhov chaw nres nkoj raug.

5. Tshaj tawm cov cai rau Arduino, los ntawm nias tus xub (→).

6. Qhib Serial Monitor los ntawm kev mus rau Tools thiab Serial Monitor.

7. Teem tus nqi baud rau 9600.

8. Taw tes rau koj lub TV Chaw Taws Teeb ntawm IR Tus Txais thiab nias cov nyees khawm uas koj xav kom tuaj yeem tswj tau, thiab theej cov Raw input rau tom qab.

9. Thaum koj ua tiav qhov cim tseg, tshem Arduino ntawm koj lub khoos phis tawj, npaj rau kauj ruam tom ntej.

Kauj Ruam 4: Teeb NodeMCU

Teeb NodeMCU
Teeb NodeMCU
Teeb NodeMCU
Teeb NodeMCU

1. Rub tawm Sinric_NodeMCU_Alexa_TV_Control.zip, unzip nws, thiab qhib.ino cov ntawv hauv Arduino IDE.

2. Hauv Arduino IDE, hauv Cov Cuab Yeej thiab Pawg Thawj Coj xaiv NodeMCU 1.0 (ESP-12E Module), hauv Flash Loj xaiv 4M (3M SPIFFS), thiab hauv qab Port xaiv qhov chaw nres nkoj raug.

3. Hauv Sinric_NodeMCU_Alexa_TV_Control.ino nkag rau hauv koj li IR Cov Teeb Meem Teeb Meem, ID Tus Kheej, Api Key, Wifi Npe thiab Wifi Password, hauv qhov chaw tshwj xeeb. Txhawm rau nce tus naj npawb ntawm cov khoom siv, tsis pom zoo cov kab tshwj xeeb ntawm cov cai.

4. Txuas NodeMCU mus rau IR LED, Liab thiab Ntsuab LEDs thiab cov tiv thaiv, ntawm Breadboard, raws li qhia hauv daim duab hluav taws xob. (Cov liab thiab ntsuab LEDs tsis xav tau tab sis zoo kom muaj)

5. Txuas NodeMCU rau koj lub khoos phis tawj nrog Micro USB cable.

6. Tshaj tawm cov cai rau pawg thawj coj saib.

7. Ntsuab LED yuav tsum teeb, thaum twg nws tau txuas nrog Wifi.

Kauj Ruam 5: Teeb Nws Nrog Alexa

Teem Nws Nrog Alexa
Teem Nws Nrog Alexa
Teeb Nws Nrog Alexa
Teeb Nws Nrog Alexa

1. Nruab Amazon Alexa App ntawm koj lub xov tooj, thiab nkag mus nrog koj tus lej Amazon.

2. Mus rau Skills & Games, thiab tshawb nrhiav sinric, xaiv thiab nias Enable, thiab koj yuav raug nug kom nkag mus rau koj tus lej Sinric.

3. Tshawb nrhiav koj lub cuab yeej los ntawm kev mus rau Devices → + → Add Device → Other → DISCOVER DEVICES. (Nco ntsoov koj Alexa txuas nrog tib lub network zoo li NodeMCU.)

4. Cia siab tias nws yuav tsum tau tshawb pom koj lub cuab yeej, yog li txhua yam koj yuav tsum tau ua yog teeb tsa koj lub cuab yeej.

5. Tam sim no sim nws los ntawm kev muab lub khob cij nyob ze TV, taw tes rau IR LED ntawm lub TV, thiab hais qee yam xws li: Alexa, qhib TV. Koj yuav tsum pom lub LED liab ntsais thiab koj lub TV qhib.

Kauj Ruam 6: Tsis teb los tau: Custom PCB thiab Laser Cut Case

Yeem: Kev cai PCB thiab Laser Txiav Case
Yeem: Kev cai PCB thiab Laser Txiav Case
Yeem: Kev cai PCB thiab Laser Txiav Case
Yeem: Kev cai PCB thiab Laser Txiav Case
Yeem: Kev cai PCB thiab Laser Txiav Case
Yeem: Kev cai PCB thiab Laser Txiav Case
Yeem: Kev cai PCB thiab Laser Txiav Case
Yeem: Kev cai PCB thiab Laser Txiav Case

Txhawm rau kom nws saib zoo dua thiab ua kom nws ruaj khov dua, Kuv tau ua tus PCB kev cai, los hloov lub khob cij.

Kuv tau ua PCB nrog EasyEDA (hmoov tsis yog Eagle vim kuv tsis yog tus tshaj lij ntawm kev ua PCBs), thiab xaj PCB los ntawm JLCPCB, thiab pawg thawj coj ua haujlwm thawj zaug. IR LED tuaj yeem txuas nrog JST txuas, yog li rooj plaub tuaj yeem zaum hauv lub txee hauv qab TV, thaum IR LED tau teeb tsa hauv qab TV TV IR Receiver.

Tom qab ntawd kuv tau ua Laser Txiav rooj plaub, kom nyob hauv tsev hauv PCB, tawm ntawm cov ntshiab acrylic.

Pom zoo: