Cov txheej txheem:
- Kauj Ruam 1: Cov khoom siv
- Kauj ruam 2: LoRa Node
- Kauj Ruam 3: Node thiab Sensor Kev Sib Txuas
- Kauj Ruam 4: Xa Cov Ntaub Ntawv mus rau Lub Rooj Vag
- Kauj Ruam 5: MakePython Lora
- Kauj Ruam 6: LoRaWAN Rooj vag
- Kauj ruam 7: Download tau Code
- Kauj Ruam 8: Tau Txais Cov Ntaub Ntawv
- Kauj Ruam 9: Siv ThingSpeak IoT
- Kauj ruam 10: Qhov tshwm sim
Video: Lora Gateway Raws Li MicroPython ESP32: 10 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Lora tau nrov heev nyob rau xyoo tas los no. Qhov kev sib txuas lus wireless siv cov thev naus laus zis no feem ntau pheej yig (siv dawb spectrum), qhov loj me me, kev siv hluav taws xob zoo thiab muaj kev sib txuas lus ntev, thiab feem ntau yog siv rau kev sib tham sib tham ntawm IoT cov dav hlau lossis cov ntaub ntawv sib pauv nrog tus tswv tsev. Muaj ntau ntau LoRa cov qauv ntawm kev ua lag luam, xws li RFM96W, uas tau nruab nrog SX1278 (sib xws) nti, uas yog me me heev. Kuv siv nws nrog MakePython ESP32 ua lub qhov rooj.
Tom ntej no, Kuv yuav siv ob LoRa nodes xa cov ntaub ntawv ntsuas kub thiab av noo mus rau lub qhov rooj, thiab tom qab ntawd xa nws mus rau Is Taws Nem los ntawm lub qhov rooj. Ntawm no koj yuav kawm paub yuav ua li cas upload cov ntaub ntawv nyob deb ntawm ntau LoRa nodes rau huab los ntawm lub qhov rooj.
Kauj Ruam 1: Cov khoom siv
1*MakePython ESP32
MakePython ESP32 yog ESP32 pawg thawj coj nrog kev sib xyaw SSD1306 OLED zaub.
2*Maduino LoRa Xov tooj cua
Maduino Lora Radio yog IoT (Internet ntawm yam) Kev daws teeb meem raws li Atmel's Atmega328P MCU thiab Lora module. Nws tuaj yeem yog txoj haujlwm tiag tiag rau IoT cov haujlwm (tshwj xeeb tshaj yog ntev-ntau, daim ntawv thov qis zog)
2*DHT11
1*MakePython Lora
Kauj ruam 2: LoRa Node
Nov yog qhov txheej txheem ntawm Maduino Lora Radio.
Arduino Lora Radio module ua LoRa node, peb siv nws xa cov ntaub ntawv ntsuas kub thiab av noo mus rau lub qhov rooj.
(Qhov WiKi no qhia yuav siv Maduino Lora Radio li cas thiab xa thiab txais cov ntaub ntawv)
Kauj Ruam 3: Node thiab Sensor Kev Sib Txuas
VCC thiab GND ntawm DHT11 txuas nrog 3V3 thiab GND ntawm Maduino, thiab DATA tus pin txuas nrog D4 ntawm Maduino.
Node 0 nyob hauv lub tiaj ua si, node 1 yog nyob hauv chaw ua haujlwm nyob ze lub tuam txhab, lawv nyob deb li 2 kilometers sib nrug, thiab tom qab ntawd kuv tau txais lawv cov ntaub ntawv ntsuas kub thiab av noo hauv tsev
Kauj Ruam 4: Xa Cov Ntaub Ntawv mus rau Lub Rooj Vag
Rub tawm TransmitterDHT11.ino, qhib nws ntawm Arduino IDE.
Thaum ntxiv ib qho, hloov kho tus lej raws li. Piv txwv li, tam sim no siv 2 cov node, thawj qhov hloov kho nodenum = 0 los khiav qhov haujlwm, qhov thib ob ntawm kev hloov kho nodenum = 1 los khiav qhov haujlwm, thiab ntxiv rau, koj tuaj yeem ntxiv ntau ntxiv.
int16_t pob ntawv = 0; // pob ntawv txee, peb nce ib xmission
int16_t nodenum = 0; // Hloov tus lej naj npawb
Sau cov ntaub ntawv thiab luam tawm
Cov lus xov = "#"+(Txoj hlua) nodenum+"Vaum:"+(Txoj hlua) av noo+"% Kub:"+(Txoj hlua) kub+"C"+"num:"+(String) packetnum; Serial.println (xov); packetnum ++;
Xa lus mus rau rf95_server
uint8_t radioPacket [message.length ()+1];
message.toCharArray (radioPacket, message.length ()+1); radioPacket [message.length ()+1] = '\ 0'; rf95.send ((uint8_t *) radioPacket, message.length ()+1);
Qhib lub ntsuas saib, koj tuaj yeem pom cov ntaub ntawv ntsuas kub thiab av noo, thiab xa tawm.
#0 Vaum: 6.00% Kub: 27.00C tus lej: 0
Kev xa tawm: Xa mus rau rf95_server Xa … Tos rau pob ntawv kom tiav … Tos kom teb … Tsis teb, puas muaj tus mloog nyob ib puag ncig?
Muab nws tso tseg, tam sim no peb yuav tsum ua Lora Gateway.
Kauj Ruam 5: MakePython Lora
Nov yog tus lej sib thooj ntawm RFM96W module thiab MakePython ESP32. Txhawm rau pab txhawb kev sib txuas nrog MakePython ESP32, Kuv tau ua lub rooj tsav xwm hauv Circuit Court nrog RFM96W module. Yog lawm, muaj ob lub RFM96W ntawm nws, uas tuaj yeem xa thiab txais cov ntaub ntawv tib lub sijhawm, tab sis tam sim no kuv tsuas xav tau ib qho.
Kauj Ruam 6: LoRaWAN Rooj vag
LoRaWAN yog lub zog hluav taws xob qis hauv cheeb tsam sib txuas raws li LoRa, uas tuaj yeem muab ib qho: kev siv hluav taws xob tsawg, kev nthuav dav, kev ua haujlwm zoo, thiab muaj kev nyab xeeb nyob deb wireless network.
Sib sau MakePython Lora thiab ESP32 los ua lub qhov rooj uas tuaj yeem txais cov ntaub ntawv nyob deb thiab xa mus rau Is Taws Nem.
Kauj ruam 7: Download tau Code
Rub tawm tag nrho 'xxx.py' cov ntaub ntawv los ntawm WiKi thiab xa lawv mus rau ESP32.
Qhib LoRaDuplexCallback.py cov ntaub ntawv, Koj yuav tsum tau kho qee yam kom koj li ESP32 tuaj yeem txuas rau lub network thiab xa cov ntaub ntawv mus rau server.
Hloov kho API_KEY koj tau txais hauv ThingSpeak (Kuv yuav qhia yuav ua li cas thiaj li tau txais nws tom qab)
#https://thingspeak.com/channels/1047479
API_KEY = 'UBHIRHVV9THUJVUI'
Hloov kho SSID thiab PSW txhawm rau txuas WiFi
ssid = "Makerfabs"
pswd = "20160704"
Kauj Ruam 8: Tau Txais Cov Ntaub Ntawv
Nrhiav qhov on_receive (lora, them nyiaj) ua haujlwm hauv LoRaDuplexCallback.py cov ntaub ntawv, qhov twg koj tuaj yeem qhia ESP32 yuav ua dab tsi tom qab tau txais cov ntaub ntawv. Cov cai hauv qab no cais tawm thiab nthuav tawm cov ntaub ntawv tau txais qhov kub thiab txias.
def on_receive (lora, them nyiaj):
lora.blink_led () rssi = lora.packetRssi () sim: ntev = len (payload) -1 myStr = str ((payload [4: ntev]), 'utf-8') length1 = myStr.find (':') myNum1 = myStr [(length1+1):(length1+6)] myNum2 = myStr [(length1+20):(length1+25)] print ("*** Tau txais cov lus *** / n {}". format (payload)) yog config_lora. IS_LORA_OLED: lora.show_packet (("{}". hom ntawv (payload [4: ntev])), rssi) yog wlan.isconnected (): thoob ntiaj teb msgCount luam tawm ('Xa mus rau network …') node = int (str (payload [5: 6], 'utf-8')) if node == 0: URL = "https://api.thingspeak.com/update?api_key="+API_KEY+"& field1 = "+myNum1+" & field2 = "+myNum2 res = urequests.get (URL) luam tawm (res.text) elif node == 1: URL =" https://api.thingspeak.com/update?api_key= "+API_KEY+" & field3 = "+myNum1+" & field4 = "+myNum2 res = urequests.get (URL) luam tawm (res.text) tshwj tsis yog kev zam li e: print (e) print (" with RSSI {} n ".format (rssi))
Txiav txim tus lej kom paub qhov txawv ntawm cov nodes, thiab xa cov ntaub ntawv mus rau Is Taws Nem los ntawm URL, peb tuaj yeem saib xyuas cov ntaub ntawv nyob deb ntawm cov ntshav sib txawv ntawm txhua lub sijhawm. Koj tuaj yeem ntxiv ntau qhov ntxiv thiab hloov pauv zoo ib yam rau cov cai.
yog node == 0:
URL = "https://api.thingspeak.com/update?api_key="+API_KEY+"& field1 ="+myNum1+"& field2 ="+myNum2 res = urequests.get (URL) luam tawm (res.text)
Kauj Ruam 9: Siv ThingSpeak IoT
Cov kauj ruam:
- Sau npe tus account hauv https://thingspeak.com/. Yog tias koj twb muaj lawm, kos npe ncaj qha.
- Nyem rau Channel Tshiab los tsim qhov tshiab ThingSpeak channel.
- Lub npe nkag, Nqe lus piav qhia, Xaiv teb 1. Tom qab ntawd txuag cov channel hauv qab.
- Nyem rau API Keys xaiv, luam API Key, peb yuav siv nws hauv txoj haujlwm.
Kauj ruam 10: Qhov tshwm sim
Koj tuaj yeem pom cov ntaub ntawv ntawm node 0 thiab node 1 ntawm lub vijtsam, txawm hais tias lawv nyob nrug deb 2 kilometers.
Nkag mus rau hauv koj tus account ThingSpeak thiab nyem rau ntawm cov channel koj tsim, koj tuaj yeem pom cov ntaub ntawv tso tawm qhov kub thiab txias.
Daim teb 1 daim duab thiab daim duab 2 daim duab yog cov av noo thiab cov ntaub ntawv ntsuas kub ntawm Lora node 0, thiab daim teb 3 daim duab thiab daim duab 4 daim duab yog cov av noo thiab ntsuas kub ntawm Lora node 1.
Pom zoo:
Kev Paub Duab Nrog K210 Cov Ntsiab Lus thiab Arduino IDE/Micropython: 6 Cov Kauj Ruam (nrog Duab)
Kev Paub Duab Nrog K210 Cov Thaj Tsam thiab Arduino IDE/Micropython: Kuv twb tau sau ib tsab xov xwm hais txog yuav ua li cas qhib OpenMV qhov kev nthuav qhia ntawm Sipeed Maix Bit thiab tseem tau ua yeeb yaj kiab ntawm kev ntsuas pom qhov pom zoo nrog lub rooj tsavxwm no. Ib qho ntawm ntau cov lus nug tib neeg tau nug yog - kuv tuaj yeem lees paub lub hom phiaj li cas tias neural network tsis yog
Huab Cua Raws Li Lub Tshuab Hluav Taws Xob (ESP8266 Raws Li Midi Generator): 4 Cov Kauj Ruam (nrog Duab)
Huab Cua Raws Li Lub Tshuab Hluav Taws Xob (ESP8266 Raws Li Midi Generator): Nyob zoo, hnub no kuv yuav piav qhia yuav ua li cas thiaj ua rau koj tus kheej me ntsis Huab cua raws li lub tshuab hluav taws xob. thiab lub teeb pom kev zoo.Tsis txhob cia siab tias nws yuav ua txhua zaj nkauj lossis chord progr
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
DIY Ntse Ua Raws Kuv Drone Nrog Lub Koob Yees Duab (Arduino Raws): 22 Cov Kauj Ruam (nrog Duab)
DIY Ntse Ua Raws Kuv Drone Nrog Lub Koob Yees Duab (Arduino Raws): Drones yog cov khoom ua si nrov heev thiab cov cuab yeej niaj hnub no. Koj tuaj yeem pom cov kws tshaj lij thiab txawm tias pib ua haujlwm drones thiab cov khoom siv ya hauv khw. Kuv muaj plaub lub drones (quadcopters thiab hexcopters), vim tias kuv nyiam txhua yam uas ya, tab sis lub davhlau 200th tsis yog