Cov txheej txheem:

Tswj ESP8266 Siv Telegram App: 7 Kauj Ruam
Tswj ESP8266 Siv Telegram App: 7 Kauj Ruam

Video: Tswj ESP8266 Siv Telegram App: 7 Kauj Ruam

Video: Tswj ESP8266 Siv Telegram App: 7 Kauj Ruam
Video: PIR motion sensor | How do they Work? 2024, Hlis ntuj nqeg
Anonim
Image
Image

Hav, ua li cas, Cov Menyuam! Akarsh nov los ntawm CETech.

Koj puas tau xav tsis thoob txog kev sib tham nrog koj cov cuab yeej siv dhau ntawm app app? Suab txawv txawv, txoj cai. Tab sis hnub no peb yuav ua ib yam zoo ib yam li ntawd. Tsis txhob txhawj koj tsis tas yuav yuav lub xov tooj ntawm tes rau koj cov khoom siv. Txhua yam koj xav tau yog Telegram mobile app, txhua lub microcontroller zoo li Arduino UNO lossis ESP8266/32, thiab koj cov cuab yeej siv.

Peb yuav qhia txoj hauv kev los ntawm kev tswj 8 LEDs los ntawm Telegram App los ntawm kev xa cov lus ON/OFF yooj yim thiab tom qab ua tiav txoj haujlwm, peb tseem yuav tau txais lus teb los ntawm peb tus tswj hwm microcontroller txog qhov ntawd. Sib nrug los ntawm LEDs, koj tuaj yeem tswj hwm lwm yam khoom siv los ntawm kev hloov pauv qhov tsim nyog hauv cov cai thiab kev siv hluav taws xob. Nws yuav muaj kev lom zem yog li cia peb dhia ncaj qha rau nws.

Kauj Ruam 1: Tau PCBs rau Koj Cov Haujlwm Tsim Khoom

Txog Telegram App
Txog Telegram App

Txheeb xyuas PCBGOGO yog tias koj xav tau PCBs tsim lossis sib sau ua ke. Lawv zoo siab tos txais koj li PCB tsab ntawv xaj: PCB tsim kev txiav txim kom muaj nuj nqis los ntawm 5PCS thiab PCB sib dhos txiav txim kom muaj nuj nqis los ntawm 1PC.

Txij li tsim los 5 xyoos dhau los, PCBGOGO tau hloov kho ntau zaus. Nws yog PCB kev tsim thiab tsim khoom sib dhos hauv ntiaj teb hloov pauv. Tam sim no, lawv cov PCBs niaj hnub thiab PCB los ua ke kom muaj nuj nqis ntau dua 3000, thiab kev muag khoom tau nce los ntawm $ 100, 000 txog $ 20 lab ib xyoos. Txawm hais tias PCBGOGO tsuas yog 5 xyoos, lawv cov chaw tsim khoom, nrog ntau dua 400 tus neeg ua haujlwm tam sim no tau muab PCB kev tsim khoom thiab sib dhos rau cov neeg siv khoom hauv Suav teb ntau dua 10 xyoo.

Koj muaj hmoo tau nyeem kab lus no, zoo li lub sijhawm no, PCBGOGO zoo siab tos txais nws lub 5 xyoos thiab muab txiaj ntsig zoo rau lawv cov neeg siv khoom.

Koom nrog PCBGOGO kom tau txais txiaj ntsig tam sim no los ntawm no. Txog $ 150 Daim coupon, Stylish Souvenirs

Campaign Duration: Lub Yim Hli 25 - Sep. 25, 2020

Kauj ruam 2: Txog Telegram App

Txog Telegram App
Txog Telegram App

Telegram yog huab-raws kev xa ntawv tam sim, ua yeeb yaj kiab, thiab lub suab dhau IP kev pabcuam. Telegram cov neeg siv khoom siv muaj rau Android, iOS, Windows Phone, Windows, macOS, thiab GNU/Linux thiab tau pib hauv tebchaws Russia. Cov neeg siv tuaj yeem xa lus thiab pauv cov duab, yeeb yaj kiab, ntawv nplaum, suab, thiab cov ntaub ntawv ntawm txhua yam.

Telegram tus neeg siv-sab chaws yog software pub dawb, qhov nws cov server-sab chaws tau kaw-qhov chaw thiab muaj tswv. Cov kev pabcuam tseem muab APIs rau cov tsim tawm ywj pheej. Raws li lub Plaub Hlis 2020, Telegram muaj 400 lab tus neeg siv txhua hli.

Cov lus tsis raug thiab xov xwm siv cov neeg siv-server encryption thaum hla. Cov ntaub ntawv no tseem tau muab zais thaum so tab sis tuaj yeem nkag los ntawm Telegram cov tsim tawm, uas tuav cov yuam sij encryption. Ib qho ntxiv, Telegram muab qhov kawg-rau-kawg encrypted hu thiab yeem kawg-rau-kawg encrypted "zais cia" sib tham ntawm ob tus neeg siv online ntawm cov neeg siv khoom siv smartphone. Txawm li cas los xij, lub desktop cov neeg siv khoom (tsis suav nrog macOS cov neeg siv khoom) tsis muaj qhov kawg-rau-kawg encryption, tsis yog qhov kawg-rau-kawg encryption muaj rau pab pawg, pab pawg zoo, lossis raws. Telegram tau tiv thaiv qhov tsis muaj qhov cuam tshuam txhua qhov kawg-rau-kawg encryption los ntawm kev thov online-thaub qab uas tsis siv cov neeg siv-sab encryption yog "txoj kev nyab xeeb tshaj plaws" tam sim no ua tau, txawm hais tias muaj ntau lwm yam kev pabcuam sib tham xws li Teeb liab, Matrix, thiab WhatsApp muab qhov kawg-rau-kawg encryption ntawm txhua lub platform.

Kauj Ruam 3: Teeb Kho Sab Kho Vajtse

Teeb Kho Sab Kho Vajtse
Teeb Kho Sab Kho Vajtse

Cov ntaub ntawv xav tau rau txoj haujlwm no: Tus Kws Tswj Xyuas Hluav Taws Xob (Kuv tab tom siv ESP8266 tus qauv), LEDs, Lub Hwj Huam, Lub Caij Nplooj Ntoos Hlav.

Kev sib txuas yuav tsum ua raws li hauv qab no:

1) Txuas 8 LEDs los ntawm tus pin D1 rau D8 ntawm ESP8266. Txuas qhov anode ntawm txhua LED mus rau hauv av thiab Cathode ntawm txhua LED mus rau Digital Pin ntawm D1 thiab D8.

2) Txuas lub Jumper cable rau A0 tus pin ntawm ESP8266 thiab tso nws qhib kom nyeem cov txiaj ntsig sib piv (uas peb tau tsim cov lus txib). Piv txwv li: yog tias peb txuas tus pin no rau 3V tus pin nws yuav tsum qhia 1024 thiab yog tias peb txuas nws mus rau GND nws yuav tsum qhia 0 tus nqi thiab yog tias nws tau qhib qhib nws yuav tsum rov qab tus lej tsis raug.

3) Tom qab xa cov cai ntawm ESP8266 txuas nws mus rau lub zog siv.

Kauj Ruam 4: Rub tawm thiab teeb tsa Arduino IDE

Rub tawm thiab teeb tsa Arduino IDE
Rub tawm thiab teeb tsa Arduino IDE

Rub tawm Arduino IDE los ntawm no

1. Nruab Arduino IDE thiab qhib nws.

2. Mus rau File> Preferences

3. Ntxiv https://arduino.esp8266.com/stable/package_esp8266com_index.json rau Tus Thawj Saib Xyuas Ntxiv URLs.

4. Mus rau Cov Cuab Yeej> Pawg Thawj Coj> Tus Thawj Saib Xyuas Haujlwm

5. Tshawb nrhiav esp8266 thiab tom qab ntawd teeb tsa lub rooj tsavxwm.

6. Rov pib dua IDE.

Kauj Ruam 5: Teeb tsa Telegram App

Teeb tsa Telegram App
Teeb tsa Telegram App
Teeb tsa Telegram App
Teeb tsa Telegram App

Txog qib no, thawj qhov koj yuav tsum tau ua yog teeb tsa Telegram app rau hauv koj lub xov tooj ntawm tes, ntsiav tshuaj, lossis ib qho ntawm lwm yam khoom siv uas koj xaiv. Koj tuaj yeem tau txais app dawb yooj yim los ntawm Google Play Store, App Store, thiab lwm yam.

Tom qab teeb tsa lub app thiab teeb tsa koj tus account. Tshawb Botfather hauv koj li app sai li sai tau thaum koj qhib Botfather koj yuav pom Start lossis Restart khawm qhov no yuav qhib cov npe ntawm cov lus txib thiab lawv daim ntawv thov koj xav tau nyem rau ntawm /newbot hais kom ua. Tom qab cov lus txib no, koj yuav tsum muab koj lub npe bot. Kuv tau muab lub npe "Esp8266 Test". Raws li lub npe ntawm bot tau teeb tsa, koj yuav tsum teeb lub npe siv. Thaum teeb lub npe siv koj yuav tsum nco ntsoov tias lub npe siv yuav tsum yog qhov tshwj xeeb thiab nws yuav tsum xaus nrog lo lus "bot".

Sai li koj teeb lub npe siv koj tus bot yuav raug tsim thiab koj yuav pom tus API token txuag qhov no ib qho vim nws yuav xav tau hauv cov kauj ruam tom ntej.

Kauj Ruam 6: Teeb Kho Qhov Coding Tshooj

Teem Coding Tshooj
Teem Coding Tshooj
Teem Coding Tshooj
Teem Coding Tshooj

Txog tam sim no peb tau ua tiav nrog kev sib txuas thiab tsim bot tam sim no peb xav tau xa cov cai hauv peb ESP8266 rau kev tswj hwm LEDs hla Telegram app.

Txog qhov no, koj yuav tsum teeb tsa lub tsev qiv ntawv Universal-Arduino-Telegram-Bot. Txhawm rau kom tau txais cov ntawv qiv no koj tuaj yeem nkag mus rau kuv nplooj Github los ntawm no.

Tom qab txhim kho lub tsev qiv ntawv koj yuav tsum theej cov cai ntawm txoj haujlwm los ntawm ESP_code.ino cov ntaub ntawv ntawm tib nplooj ntawv GitHub. Muab tus lej ntawd tso rau hauv koj li Arduino IDE. Hauv tus lej, koj yuav tsum hloov kho SSID, Lo lus zais rau ntawm koj li Wifi's SSID, Password, thiab tom qab ntawd, koj yuav tsum hloov kho API Token nrog API Token ntawm bot uas koj tau tsim hauv cov kauj ruam dhau los.

Tam sim no koj tuaj yeem txuas koj li ESP8266 rau lub PC thiab xa cov cai. Sai li sai tau cov cai tau rub tawm koj tuaj yeem txuas koj lub cuab yeej los ntawm koj lub PC thiab txuas nws mus rau txhua lub zog siv.

Kauj Ruam 7: Sijhawm Ua Si

Sijhawm Ua Si
Sijhawm Ua Si
Sijhawm Ua Si
Sijhawm Ua Si
Sijhawm Ua Si
Sijhawm Ua Si

Tam sim no txhua yam koj yuav tsum tau ua yog qhib lub xov tooj app qhib bot tom qab tshawb nrhiav hauv Telegram App los ntawm lub npe koj muab rau bot. Thaum koj qhib lub bot koj yuav pom Start/Restart khawm nyem rau ntawm lub pob ntawd bot yuav pib thiab xa koj cov npe ntawm cov lus txib uas koj tuaj yeem siv los tswj cov LED sib txawv.

Piv txwv li: Muaj qhov hais kom ua /D1ON yog tias koj xa cov lus txib no koj yuav tuaj yeem pom tias LED No. 1 qhib thiab tau txais cov lus hauv app hais tias "D1 yog HIGH" tom qab ntawd yog tias koj xa D1OFF hais kom koj yuav pom tias LED1 tig tawm thiab tau txais cov lus hais tias "D1 yog LOW". Tib yam tshwm sim nrog lwm LEDs ib yam nkaus. Sib nrug los ntawm LED ON/OFF cov lus txib muaj lwm lo lus txib A0 uas rov qab los ntawm Analog Pin piv txwv tias yog A0 txuas nrog GND nws rov 0, yog tias nws txuas nrog 3V nws rov 1024 thiab yog sab laug qhib nws yuav tsum rov qab tus nqi random. Ua li no, koj tuaj yeem tswj hwm yam siv Telegram Messaging app.

Vam tias koj nyiam qhov kev qhia.

Pom zoo: