Cov txheej txheem:
- Kauj Ruam 1: Teeb Ib puag ncig
- Kauj Ruam 2: Txuas ESP32
- Kauj Ruam 3: Txuas ESP8266
- Kauj ruam 4: Programming
- Kauj Ruam 5: Teeb Tus Neeg Siv Khoom
- Kauj Ruam 6: Qhov Kawg
Video: HiFive1 Arduino Intruder Detection With MQTT Alerts Siv ESP32 lossis ESP8266: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
HiFive1 yog thawj Arduino-tshaj RISC-V raws lub rooj tsavxwm ua nrog FE310 CPU los ntawm SiFive. Lub rooj tsavxwm yog kwv yees li 20 zaug sai dua li Arduino UNO tseem tsis tau zoo li UNO pawg thawj coj, nws tsis muaj kev sib txuas wireless.
Hmoov zoo, muaj ntau qhov qauv tsis kim ntawm kev ua lag luam txhawm rau txo qhov kev txwv no. Hauv qhov kev qhia no kuv siv ESP32 lossis ESP8266 txhawm rau kom tau txais kev sib txuas wireless. Txawm hais tias pheej yig npaum li cas ESP-01 yog, vim xav tau los teeb tsa nws nrog Arduino kos duab, ESP-01 yog qhov daws tau yooj yim dua. Txhawm rau ua haujlwm ESP-01, nws xav tau USB sab nraud rau ESP-01 adapter uas kuv tsis muaj thaum lub sijhawm ua qhov kev qhia no. (Yog tias koj xav siv HiFive1 nrog ESP-01 ua raws qhov txuas no) Kuv kuj xav txog kev siv Arduino Shield tab sis tau xaus nrog ESP8266/32 vim tias tus nqi kim dua tus nqi feem ntau cov ntaub thaiv npog.
Txoj haujlwm no yuav tsom mus rau tsim Kev Tshawb Fawb Kev Tshawb Fawb uas yuav ua haujlwm los ntawm kev xa ntawv ceeb toom mus rau MQTT Broker txhua lub sijhawm Ultrasonic sensor (SRF05) pom cov khoom hla nws txoj kab kev pom.
Cov ntaub ntawv xav tau rau txoj haujlwm no:
- HiFive1 board (Yuav tuaj yeem yuav ntawm no)
- ESP32 Dev Module lossis ESP8266 NodeMCU 1.0
- 10 k resistor x2
- 1 k resistor
- Cov qhob cij
- kab x6
- SRF05 Ultrasonic module
- Txawb ntaus ntawv
Kauj Ruam 1: Teeb Ib puag ncig
Nruab Arduino IDE
1. Ua raws cov lus qhia txhawm rau teeb tsa HiFive1 board Arduino pob thiab USB tsav tsheb.
2. Nruab ESP32 lossis ESP8266 pawg pob los ntawm kev ntxiv qhov URL tsim nyog rau "File-> Preferences-> Tus Thawj Saib Xyuas Ntxiv":
- ESP8266 -
- ESP32 -
Kauj Ruam 2: Txuas ESP32
Yog tias koj siv ESP8266 hla mus rau qib 3.
Ib qho tseem ceeb: SRF05 los rau hauv 2 tus pinout versions uas yog mirrored versions ntawm txhua lwm yam, kom paub tseeb tias koj muaj tib lub module zoo li kuv siv qhov txuas hauv qab no.
Yog xav paub ntau ntxiv ntawm SRF05 ua raws qhov txuas no.
GND (HiFive1) -> GND (SRF05) 5v (HiFive1) -> VCC (SRF05) DI/O 11 (HiFive1) -> Trigger Pin (SRF05) DI/O 12 (HiFive1) -> Echo Pin (SRF05) DI/ O 5 (HiFive1) -> Tx (ESP32) DI/O 6 (HiFive1) -> Rx (ESP32)
Nco tseg: Nco ntsoov tias IOREF jumper tau teeb tsa ntawm 3.3v.
Kauj Ruam 3: Txuas ESP8266
Ib qho tseem ceeb: SRF05 los rau hauv 2 tus pinout versions uas yog mirrored versions ntawm txhua lwm yam, kom paub tseeb tias koj muaj tib lub module zoo li kuv siv qhov txuas hauv qab no.
Yog xav paub ntau ntxiv ntawm SRF05 ua raws qhov txuas no
GND (HiFive1) -> GND (SRF05) 5v (HiFive1) -> VCC (SRF05) DI/O 11 (HiFive1) -> Trigger Pin (SRF05) DI/O 12 (HiFive1) -> Echo Pin (SRF05) DI/ O 5 (HiFive1) -> Tx (ESP8266) DI/O 6 (HiFive1) -> Rx (ESP8266)
Nco tseg: Nco ntsoov tias IOREF jumper tau teeb tsa rau 3.3v.
Kauj ruam 4: Programming
Txoj Cai HiFive1:
Ua ntej kev teeb tsa teeb tsa "Cov Cuab Yeej-> Pawg Thawj Coj" rau HiFive1 pawg thawj coj, "Cuab Yeej-> CPU Clock Zaus" rau "256MHz PLL", "Cuab Yeej-> Tus Kws Ua Haujlwm" rau "SiFive OpenOCD" thiab qhov chaw nres nkoj raug xaiv raug xaiv.
Koj kuj tseem yuav tsum rub lub tsev qiv ntawv Ultrasonic no, thiab PubSubClient no thiab rho tawm lawv rau hauv koj li Arduino Libraries nplaub tshev pom hauv "Tus Neeg Siv-> Cov Ntaub Ntawv-> Arduino-> Tsev Qhua".
ESP32/8266 Txoj Cai:
Thaum lub khoos phis tawj, ESP pawg thawj coj yuav tsum muaj kho vajtse Rx thiab Tx pins txuas.
Rau ESP32-Teeb tsa "Tools-> Board" rau "ESP32 Dev Module", "Tools-> Programmer" mus rau "AVRISP mkll" thiab xaiv qhov tseeb Serial Port.
Rau ESP8266-Teeb tsa "Tools-> Board" mus rau "NodeMCU 1.0 (ESP-12E Module)", "Tools-> Programmer" mus rau "AVRISP mkll" thiab xaiv qhov tseeb Serial Port.
Cov duab kos tau qiv los ntawm no nrog kev hloov kho kom hloov nws mus rau hauv kev nkag mus rau cov neeg nkag mus.
Kauj Ruam 5: Teeb Tus Neeg Siv Khoom
Kuv siv huab-based MQTT Broker (qhov no) thiab Android Phone nrog rau daim ntawv thov no.
Txhawm rau teeb tsa txhua yam, koj yuav tsum qhib tus account.
Siv cov screenshots uas tau muab los ntawm kev teeb tsa CloudMQTT thiab App.
Kauj Ruam 6: Qhov Kawg
Nco tseg: Koj yuav tsum teeb tsa koj li Serial Monitor tus nqi baud rau 115200 vim tias yog tus nqi baud peb siv hauv peb daim duab.
Koj qhov txiaj ntsig kawg yuav tsum zoo ib yam li cov screenshots zaum kawg
Pom zoo:
Tswj Cov Khoom Siv Hauv Tsev Los Ntawm Alexa Nrog ESP8266 lossis ESP32: 8 Cov Kauj Ruam
Tswj Cov Khoom Siv Hauv Tsev Los Ntawm Alexa Nrog ESP8266 lossis ESP32: Hav, ua li cas, Cov Menyuam! Akarsh ntawm no los ntawm CETech Qhov phiaj xwm no ntawm kuv yuav pab koj lub neej dhau los yooj yim thiab koj yuav zoo li huab tais tom qab tswj cov cuab yeej hauv koj lub tsev los ntawm kev muab lus txib rau Alexa
Yuav Siv Neopixel Ws2812 LED lossis LED Sawb lossis Led Ring Nrog Arduino: 4 Kauj Ruam
Yuav Siv Neopixel Ws2812 LED lossis LED Sawb lossis Led Ring Nrog Arduino: Nyob zoo cov menyuam txij li Neopixel coj Sawb tau nrov heev thiab nws tseem hu ua ws2812 coj sawb ib yam. Lawv yog cov neeg nyiam heev vim tias hauv cov kab coj no peb tuaj yeem hais qhia txhua tus thiab txhua tus coj sib cais uas txhais tau tias yog koj xav tau ob peb lub leds kom ci hauv ib xim
Kev Tswj Lub Suab Hauv Tsev Automation (zoo li Alexa lossis Google Tsev, tsis xav tau Wifi lossis Ethernet): 4 Cov Kauj Ruam
Kev Tswj Lub Suab Hauv Tsev Automation (zoo li Alexa lossis Google Tsev, tsis xav tau Wifi lossis Ethernet Xav Tau): Nws yog qhov yooj yim SMS raws li arduino tswj kev xa xov nrog google tus pabcuam teeb tsa xa cov lus ntawm kev qhia lub suab. Nws yooj yim heev thiab pheej yig thiab ua haujlwm zoo li Alexa tshaj tawm nrog koj cov khoom siv hluav taws xob uas twb muaj lawm (yog tias koj muaj Moto -X ntse
Tsis Siv Neeg Cov Dej Tswj Qib Siv Transistors lossis 555 Timer IC: 5 Kauj Ruam
Tsis Siv Neeg Tus Kheej Tswj Dej Siv Siv Transistors lossis 555 Timer IC: Taw Qhia: Hii Txhua tus neeg ntawm no peb yuav kawm txog Kev Txuag Dej kom zoo. yog li mus dhau cov kauj ruam thiab kab lus ua tib zoo. Cov dej ntws hla dej yog ib qho teeb meem tshwm sim uas ua rau cov dej tsis huv. Txawm hais tias muaj
MacBook Tablet lossis DIY Cintiq lossis Homebrew Mac Tablet: 7 Cov Kauj Ruam
MacBook Tablet lossis DIY Cintiq lossis Homebrew Mac Tablet: Kev tshoov siab los ntawm c4l3b qhov tshwj xeeb qhia tau, leej twg yog, tig los, tau tshoov siab los ntawm bongofish, Kuv txiav txim siab sim ua qhov zoo ib yam ntawm kuv Core 2 Duo MacBook. Cov kauj ruam tsuas yog sib txawv txaus uas kuv xav tias kev qhia cais tau lees paub. Tsis tas li