Tech Note 111 - ESP32 LoRa Modules - Sending and Receiving Data

  Переглядів 52,380

G6EJD - David

G6EJD - David

День тому

ESP32 based LoRa modules are relatively easy to use. Here I show examples of sending and receiving data, how to setup up the ESP32 sketch for the LoRa modules and provide examples in G6EJD GitHub.
You can get the products from here: www.banggood.com/Wholesale-Ar...
Code Examples: github.com/G6EJD/ESP32_LoRa_E...

КОМЕНТАРІ: 160
@0miker0
@0miker0 5 років тому
Excellent video as always. Very well put together and informative. I look forward to every new one and I hope you never stop.
@BizumED
@BizumED 5 років тому
As usual, a simple explanation with only essential information and very informative. Thank you David!
@korbinbrayan4794
@korbinbrayan4794 2 роки тому
I know Im asking the wrong place but does anybody know a trick to get back into an instagram account..? I was stupid lost the account password. I love any help you can offer me.
@pedroemmett3509
@pedroemmett3509 2 роки тому
@Korbin Brayan instablaster =)
@korbinbrayan4794
@korbinbrayan4794 2 роки тому
@Pedro Emmett Thanks so much for your reply. I found the site through google and im in the hacking process now. Looks like it's gonna take a while so I will reply here later when my account password hopefully is recovered.
@korbinbrayan4794
@korbinbrayan4794 2 роки тому
@Pedro Emmett it worked and I now got access to my account again. Im so happy:D Thank you so much, you saved my ass!
@pedroemmett3509
@pedroemmett3509 2 роки тому
@Korbin Brayan happy to help =)
@quaternion-pi
@quaternion-pi 5 років тому
Excellent as usual.
@tonysicily2687
@tonysicily2687 4 роки тому
A really great tutorial, thank you for sharing. Very much appreciated. I would love to see you add to this, to explain how you would connect the receiver to the Cloud (any cloud service). Thank you again Subscribed and Bookmarked 👍👍👍
@MehrdadGivehchi
@MehrdadGivehchi 5 років тому
Great and vey informative video. Many thanks!
@JosefZvolanek
@JosefZvolanek 5 років тому
Very nice example David! :-)
@G6EJD
@G6EJD 5 років тому
Thank you Josef, good to hear from you.
@satrepo123
@satrepo123 5 років тому
Excelent.... thanks for sharing
@sureshkumarmadevan3011
@sureshkumarmadevan3011 5 років тому
Excellent as usual. I have a pair as well, without OLED display. I am getting about 900m with line of sight. Based my sketch on yours.
@G6EJD
@G6EJD 5 років тому
What sort of terrain though? You can’t expect long range in urban areas as buildings absorb much of the RF energy, try an experiment out in the open. Also what frequency are you using? Don’t expect long range at 918mhz it’s the laws of physics that prevent long range. Check your antenna type too, you may have a 918mhz antenna and are using a mismatched 433mhz signal.
@sureshkumarmadevan3011
@sureshkumarmadevan3011 5 років тому
David, I'm using 915Mhz and operating the receiver from the 2nd floor of my home. The terrain is quite flat, it's actually an open field with a single building in between as the only obstruction. Will check the antenna and see if there's any mis-match there too or loose connections.
@G6EJD
@G6EJD 5 років тому
Most people get an easy 10km range so you need to determine if the antenna is actually a 915mhz unit a quarter wave at that frequency will be about 30cm physical length or electrical length could be extended with a coil to make a compact physical length. Try running the experiment at 868mhz.
@sureshkumarmadevan3011
@sureshkumarmadevan3011 5 років тому
Yes, will take note of the antenna length and repeat the test at 868Mhz.
@G6EJD
@G6EJD 5 років тому
Also try 433mhz
@cad3175
@cad3175 4 роки тому
...excellent thank you :)
@xbmcnut
@xbmcnut 4 роки тому
Nice, thank you. How easy is it to modify the sketch to receive a basic input from say a tilt or reed switch? Looking to Lora up my mailbox which is just out of WiFi range!
@G6EJD
@G6EJD 4 роки тому
Pete, well you’d need a spare Gpio pin with say the reed switch wired to pull it low when actuated and set the pull-up resistor on that pin high to save extra wiring, then on activation send a zero via Lora, on reception the change of state would signify mail. A Lora transmitter takes about 50mA and an esp the same, so maintaining power will be your challenge unless there is a local power source. You could sleep the esp but unfortunately many combined esp and Lora boards don’t allow the Lora unit to sleep thereby consuming power all the time.
@xbmcnut
@xbmcnut 4 роки тому
@@G6EJD Thanks, appreciate the feedback.
@Sacarinoish
@Sacarinoish 3 роки тому
@@G6EJD You and Pete got me interested so I picked up two of the non-OLED dev boards usa.banggood.com/LILYGO-TTGO-2Pcs-ESP32-SX1276-LoRa-915MHz-bluetooth-WI-FI-Internet-Antenna-Development-Board-p-1466793.html to have a go at a mailbox sensor. I'm having a heck of a time trying to use a GPIO input (ie, 34/35) on them, though. Neither a direct ground or one w a 10k resistor toggle the bit. Any tips?
@firetel392
@firetel392 3 роки тому
you can configure lora esp32 in point to mulipoint mode
@huaminghuang
@huaminghuang 3 роки тому
Hi, thanks for your efforts! In your video tutorial, it‘s point-to-point communication. Do you have any recommendations for point-to-multi-point communication via LoRa? I.e, how to make sure delivery from each node. As far as I know, LoRa only allows for receiving messages from one node at once. So that would be a problem.
@G6EJD
@G6EJD 3 роки тому
You can broadcast using an addressing scheme and LoRa supports that but there is no protocol for guaranteeing delivering like TCP/IP so you’d have to engineer your own in software. You could do that with a simple broadcast to all nodes and then wait for a confirmation from each. There are problems though much like Ethernet called carrier sense multiple access because all the receiving nodes will try to respond with a reception confirmation at the same time so there will be clashes and simultaneous transmissions meaning some responses won’t be received. You could use FEC forward error correction whereby the message to all broadcast receivers is sent with redundancy say 3 copies of the same message then statistically the chances of all 3 not being received are very small then receivers only request a resend if not received that greatly increases throughout and gives almost guaranteed delivery.
@huaminghuang
@huaminghuang 3 роки тому
@@G6EJD Thanks for the reply! Unfortunately I am not mastered enough to understand your tips...It would be great if you can provide some code examples or tutorial sources regarding this topic. What I am trying to do in my project is that, I have 3 slave ESP32s as wifi sniffers to listen to nearby wifi packets of mobile devices, then the 3 slaves will send the captured data via LoRa to the master ESP32, which will receive data. My problem is simply how to make sure the data flow from slave to master smoothly (no data loss, no collosion of data if all slaves want to send data to the master at the same time) If I understand well, the simple LoRa is only suitable for point-to-point communication as you did in this video. For point-to-multi-point communications, I need to instead build a LoRaWAN gateway on one of the cores of the master ESP32. Am I thinking right?
@G6EJD
@G6EJD 3 роки тому
@@huaminghuang yes your thinking is correct, but a Lorawan does not implement end-to-end protocols either only between the lorawan access point and internet. So you still have the same problems, for example two stations could send at the same time and their messages won’t get through thereby needing resends but they won’t know to resend unless told to do so. This is why tcp/ip via WiFi provides a much better solution but if range is an issue than you need Lora and so the problem continues there is no simple answer.
@huaminghuang
@huaminghuang 3 роки тому
@@G6EJD Ok! Thanks for your hints and interests. I think I need to reorganize my project in a more proper way. For tcp/ip via WiFi, can you provide some useful learning links? TBH I didn't even know how to get started with tcp/ip via WiFi on ESP32...
@G6EJD
@G6EJD 3 роки тому
There isn’t much to learn as the handling of tcp/ip transfers is handled for you. You can also use UDP for broadcasting and that uses a reasonably good protocol for your application there are examples the IDE
@celsocialla6935
@celsocialla6935 2 роки тому
Boa tarde, gostaria de fazer um relato, comprei três módulos desse Lora ESP-32 - 915 Mhz, e estou tendo um problema comum aos três, ao gravar o programa na IDE do Arduino depois de duas ou três vezes ele para não aceita mais gravar, preciso esperar até o dia seguinte para que ele funcione novamente, se alguém tiver alguma dica fico agradecido pois estou frustrado com os módulos ESP32
@Mr._Tony
@Mr._Tony 3 роки тому
Excellent and very clear video. Question: Video at 05:00, in the LoRa receiver, you check if any data are available, if not the program stops right away. Perhaps you only wanted to show the concept, wouldn‘t a loop with checking/sleeping, waiting for data be more realistic?
@G6EJD
@G6EJD 3 роки тому
I looked at the examples and apart from the sleeping version they are all checking for reception continuously
@Mr._Tony
@Mr._Tony 3 роки тому
@@G6EJD: I was refering to the video for example at 05:22, it says: void main() { String packet = ""; int packetSize = LoRa.parsePacket(); if (packetSize) { to me, that would only check LoRa.parsePacket() when the program starts. If no data are available at that time, the program will stop and not wait for data to arrive at a later point in time. If that code bit were in loop() or Check4Data() etc., then it would be clear. I see that the code at GitHub is different, there you got a setup() and a loop() routine, which I then assume you mean to be called from the main().
@G6EJD
@G6EJD 3 роки тому
It was a C leftover rather than Arduino, yes it needs to be in a loop or use the event mechanism of onreceive then no loop required
@trickamathematica1843
@trickamathematica1843 4 роки тому
Thanks alot. I need to get data from an sensor in carpark to server so l can use an application via internet or webpage. Its like get data using an ESp 32 lora sender to a gateway to a server. Whats the proper way of setting this up.I will greatly appreciate your timely response
@G6EJD
@G6EJD 4 роки тому
Well you have WiFi range LoRa is not necessarily the best solution and a simple WiFi client is all you need. LoRa will introduce unnecessary complexity. At the webserver after reception you then have the ability to display the data on a webpage or send it elsewhere. Don’t underestimate the climatic effects on a remote link, electrical noise, humidity, water ingress so your client needs good protection or it will only work for a short time maybe 1-2 weeks. Sensors - there are few if any sensors that are designed to be used outside so you will need to consider non water permeable sensor covers.
@Bellmatik
@Bellmatik Рік тому
Hi David. Excellent work. Before I purchase anything would you please answer one question (if you know - or give your best guess). If I transmit at 38400 baud how long range could I expect ?👍
@G6EJD
@G6EJD Рік тому
Little to nothing as LoRa can only operate between 0.3kb/s and 27kb/s and to achieve the higher rate you’d need to set the spreading factor accordingly meaning each packet will take a long time to send, you can’t get something for nothing and can’t send synchronous data.
@taufik460
@taufik460 Рік тому
is it possible if there are more than one TX LoRa module with one RX LoRa module?
@G6EJD
@G6EJD Рік тому
You can have as many LoRa TX as you need with just one LoRa RX but you will need to manage the TX’s to stop TX clashes that is when TX send data at the same time thereby preventing a successful transfer. Maybe allocate a time slot to each TX unit.
@TonyLing
@TonyLing 3 роки тому
I'd like to play with this in the data segment of the 70cms band. I'm currently playing with this on SRD 868
@G6EJD
@G6EJD 3 роки тому
Yes will work OK, the chip can be set for any frequency.
@TonyLing
@TonyLing 3 роки тому
@@G6EJD I'm wondering where to plonk its centre frequency. My spectrum analyser shows it as 6 MHz wide
@G6EJD
@G6EJD 3 роки тому
Well, you can vary the spreading factor which is a 6-12 value, varying data rate speed and bandwidth, but it’s transmission mode is spread spectrum / chirp, so strictly speaking you just have to keep within the band edges and other channels will be largely unaffected other than noise. I’m not sure if the mode is allowed undo the licence conditions I have not checked.
@zimenglee9744
@zimenglee9744 3 роки тому
Hey, thx so much for this video! and can you tell me if this work on BMP180? Because i got the problem with the I2C when i use the oled board :(, didnt find the solution to resolve it... error:"no matching function for call to 'Adafruit_BMP085::begin(int, TwoWire*)'"
@G6EJD
@G6EJD 3 роки тому
Yes the bmp085 works with the bmp180 start the sensor with bmp.begin(0x77); if using a 3rd party sensor bmp.begin(); if Adafruit version. Go to to examples Adafruit bmp085 and try those
@G6EJD
@G6EJD 3 роки тому
yes it will work with the TTGO board too.
@zimenglee9744
@zimenglee9744 3 роки тому
@@G6EJD thx very much Sir its worked!💪👏
@lbs4you
@lbs4you 3 роки тому
very good example.. but how didt you get it to sent over 1 km ??? max range here is 500m
@G6EJD
@G6EJD 3 роки тому
Depends on the terrain here and with you, in open space you should easily get 5-7km. Did you orientate your antennas vertical to vertical or horizontal to horizontal? I can’t remember if I set the example to high power, but that’s possible too. The range I got was an easy 1Km as measured by google earth. What is around you? There is an effect called the fresnel zone the size and effect of is determine by antenna height and obstacles to name a few.
@Drakanx
@Drakanx 3 роки тому
I need some help to recive data form acelarometer i send X.Y.Z and recive this in one line. then i try change code and get overlaid text like this X= 3.4 y(overlaid)=-2 z(overlaid)=0 so i assume i'm using code for recive 1data like counter, and not mutiple data display.print("X"); display.setCursor(0,40); display.print("Y"); display.setCursor(0,50); display.print("Z"); display.setCursor(10,30); display.print(LoRaData);
@G6EJD
@G6EJD 3 роки тому
Copy here a single line of text from the lora
@georgizhelyazkov8624
@georgizhelyazkov8624 4 роки тому
very imformative ,respect for you ! Do you have idea for project "'monitoring beehive"' ? project with two esp32 lora ,sender with weight sensor and temperature and humiduty ,deep sleep ,solar powered and receiver with WIFI and blynk example .
@G6EJD
@G6EJD 4 роки тому
All of that is possible with just one ESP32, a single bme280, LoRa module for long range transmission and a 3W solar panel, I can’t see the need for LoRa if in WiFi range? The hardest part of the project is weather proofing the components
@georgizhelyazkov8624
@georgizhelyazkov8624 4 роки тому
G6EJD the beehive located in the wood , esp32 lora in beehive communicate with esp32 lora in the home . the esp 32 in the home with wifi and blynk server . that's enables monitoring via smartphone. sorry for my bad english . i give an idea and suggestion
@G6EJD
@G6EJD 4 роки тому
georgi zhelyazkov, OK understand the requirement now, but there is a lot of coding and design to implement all that!
@dhiamakhlouf9933
@dhiamakhlouf9933 Рік тому
can this code run on an arduino uno !! and what should i change in order to make it work with an atmega328p
@G6EJD
@G6EJD Рік тому
The basic code would be unaltered but do you have LoRa modules connected to the UNO?
@dhiamakhlouf9933
@dhiamakhlouf9933 Рік тому
@@G6EJD i am building my own pcb and using atmega328p , sim800c , rfm95(lora) I am receiving sensor data from a lora device and sending it with grps to a firebase server
@G6EJD
@G6EJD Рік тому
@@dhiamakhlouf9933 yes that will all work
@science4allworld587
@science4allworld587 5 років тому
I have same module with display. It hardly goes to 500m range. With those antennae. I had transmitter on 4th floor terrace.
@G6EJD
@G6EJD 5 років тому
What frequency though, at 868 and 915 you’ll get huge attenuation and what’s called fresnel zones that make propagation difficult, at 433Mhz these problems diminish markedly. Yes the antenna at 433 could be larger and for a correct match would need to be physically 70cm long or electrically shorter with some loading coils in series with it. Yes antennas need to be matched and you can vary RF power so maybe turn it up, but 500m is a very poor range that is almost certainly the outcome of a number of factors to do with matching the frequency to the terrain and as you say the antenna.
@AndreaZeta
@AndreaZeta 5 років тому
Same here! Esp32 with his WiFi and high operating frequency is a great wave pollutant, that saturates lora receiver; a cozy design like this doesn't help!
@science4allworld587
@science4allworld587 5 років тому
@@AndreaZeta issue is antennae, they are not at right resonant frequencies. There is nice video about these antennae by Andreas _ swiss guy.
@G6EJD
@G6EJD 5 років тому
The WiFi is switched off so there is no crosstalk or blocking of the Lora.
@yukiosamu2664
@yukiosamu2664 Рік тому
my lora module can't transfer data more than 1 meter, someone who can show me TTTGO LORA32 data sheet, i want to know the maximum lora range for that module
@G6EJD
@G6EJD Рік тому
Do you have an antenna fitted? Are both modules tx and rx on the same frequency? Sounds like there’s a fault, should get at least 5km range
@jerryl6611
@jerryl6611 Рік тому
Battery won't power up the board. Any setting for that?
@G6EJD
@G6EJD Рік тому
No settings, it’s either a hardware fault; unlikely, or the polarity of the battery is wrong for the board design, there is no standard. Sometimes the + and - are marked on the board check that the battery is correct in that Red is to the positive, if not carefully unclip the cables from the plug and reverse them both. Or the battery can’t provide sufficient power under load.
@gautombose4172
@gautombose4172 2 роки тому
How much difficult is it to add a display to the Tansmitter to show what it is sending ?
@G6EJD
@G6EJD 2 роки тому
It would be very easy. The most simplest approach would be to use a low cost OLED display 0.9” or 1.3” using the I2C bus connections the library would work alongside the LiEa if you have the modules with the display already fitted then the examples are already provided.
@MrAllthatremainsrock
@MrAllthatremainsrock 5 років тому
@G6EJD : Can you please tell me the model number of the devices used in this video?
@G6EJD
@G6EJD 5 років тому
Kaustubh Kundu, m.banggood.com/Wemos-TTGO-2Pcslot-ESP32-SX1276-LoRa-868-915MHz-Bluetooth-WI-FI-Lora-Development-Board-p-1295045.html?rmmds=search You can get them with or without oled displays
@MrAllthatremainsrock
@MrAllthatremainsrock 5 років тому
@@G6EJD Thanks a lot. Amazing video.
@s.husain6125
@s.husain6125 4 роки тому
How to monitor battery of this board sir it has jst battery connector i have shown your video on battery monitoring but not able to use in this board
@G6EJD
@G6EJD 4 роки тому
Just because the board has an on-board battery connector does not mean it has a battery monitor built in only the London D32 has that. To do this you need 2 resistors of value 100K then connect as follows: Battery - - 100K - - VN - - 100K - - Gnd Where VN is the ADC input 36 or 39
@s.husain6125
@s.husain6125 4 роки тому
@@G6EJD many thanks sir.... Why you have stopped making tutorials on Lora we are always love your tutorials sir.... Love from India
@G6EJD
@G6EJD 4 роки тому
Saddam Husain , unfortunately I have been diagnosed with cancer and I’m currently being treated for the condition makes me feel very unwell giving no time or inclination to make more, hopefully I’ll be able to make some more soon.
@s.husain6125
@s.husain6125 4 роки тому
@@G6EJD ....ohh God I will pray for you sir ...for your better health and and early recovery from cancer....... Get well soon..... Sir
@MeWho-kj4dj
@MeWho-kj4dj 2 роки тому
I have a warehouse about 5km away from my house and I need a camera will this work? :)
@G6EJD
@G6EJD 2 роки тому
Not at video rates but occasional still images would work, the data rate is not high enough.
@G6EJD
@G6EJD Рік тому
@Harold Reasonswith the supplied antennas I got a range of 2.4kM in an urban area, if in green field conditions it should approach 5-6kM
@Deadgray
@Deadgray 5 років тому
What about bandwidth you can get at reasonable distances?
@G6EJD
@G6EJD 5 років тому
The LoRa protocol does have provision for bandwidth adjustment, but on the whole you leave the protocol to handle to that and transfer your payload across the link in whatever time (and bandwidth) is available. Typically 10KHz.
@Deadgray
@Deadgray 5 років тому
@@G6EJD Thanks, so it could be possible with microphone attached to make small bug device with it, right? :-)
@G6EJD
@G6EJD 5 років тому
I don’t think anyone has done that. First you have to sample the audio at say 10khz and then stream that data to the receiver. It could work but timing and conversion at the receiver end might be a challenge. You would have to receive the data packet and then play the bytes to the DAC but the resolution needs to be matched as close as possible or the audio quality will be poor. Try a google for real-time Lora audio transfer.
@SamratDuttabdn
@SamratDuttabdn 3 роки тому
I am getting "Starting LoRa failed! " inspite of having the right pin config for LoRa.setPins(NSS, RESET, DIO0);
@G6EJD
@G6EJD 3 роки тому
Which board type, which library?
@bassemgatowani8387
@bassemgatowani8387 3 роки тому
Thanks can we used like telemetry for drone
@G6EJD
@G6EJD 3 роки тому
LoRa is relatively slow about 1-2 secs per packet so for drone work maybe too slow
@bassemgatowani8387
@bassemgatowani8387 3 роки тому
@@G6EJD give me device
@bassemgatowani8387
@bassemgatowani8387 3 роки тому
@@G6EJD what i can use for system radio for drone
@G6EJD
@G6EJD 3 роки тому
@@bassemgatowani8387 most TX eg Taranis have an RF link built-in for that role
@bassemgatowani8387
@bassemgatowani8387 3 роки тому
@@G6EJD thanks what i can used for system radio for drone
@MiG-25IsGOAT
@MiG-25IsGOAT 3 місяці тому
Hello! Good video, how can I send this data to a web server using POST? I'm stuck in here because I can't do both things at the same time, and if I put the data sending to the other core, I don't recieve the data in the other core, I already tried freeRTOS, but it doesn't work. Can you help please? thanks in advance
@G6EJD
@G6EJD 3 місяці тому
You can communicate Ethernet cores with shared variables, that’s quite straightforward. Similarly if you receive data via Lora you can POST it to a client or wherever. You’d need to use a flag (say) to know when new data has been received between the two cores.
@G6EJD
@G6EJD 3 місяці тому
Lora is not a duplex system, well it’s very difficult to implement duplex with Lora
@MiG-25IsGOAT
@MiG-25IsGOAT 3 місяці тому
​@@G6EJDI think I didn't understand clearer sorry, I use sender and reciever, both with ESP32 and LoRa, not only the LoRa, and the reciever needs to recieve the data, to send it into the server.
@G6EJD
@G6EJD 3 місяці тому
@@MiG-25IsGOATso the LoRa receiver gets the data, that could be on one core or another (passed to the other via common variables) and then sent to the WebServer for onward sending. So get the WebServer running and tested. Next get the lora running and tested. Then programme them both to each core as required.
@MiG-25IsGOAT
@MiG-25IsGOAT 3 місяці тому
​@@G6EJDHello! Thanks for the response, I already have the server running and sending data on core 0, and the LoRa on core 1, but the problem is I don't recieve the data of the lora, and I somehow can't send the data to the core 0, even using freeRTOS that is the most used method
@s.husain6125
@s.husain6125 4 роки тому
I have attached bme 280 sensors sir but value read by sender module is temperature -121, humidity 100% , and pressure 11000 what is the problem sir with your code or sensor problem
@G6EJD
@G6EJD 4 роки тому
What pins have you used for the I2C bus and have you selected the correct address for the bme280 if your using an Adafruit board the address is null if a 3rd party then 0x76 you must also start the I2C bus on the correct pins - there is nothing wrong with the code. Have you run an I2C bus detector program to check you have it wired correctly?
@s.husain6125
@s.husain6125 4 роки тому
@@G6EJD thanx for quick reply sir I have used third party bme sensor and put x76 value in void setup 12c pins are 21 and 22 so what is the problem if I'm correct
@s.husain6125
@s.husain6125 4 роки тому
@@G6EJD I have put 0x76 value in void setup as I'm using third party bme sensor but values are incorrect as I mentioned above
@G6EJD
@G6EJD 4 роки тому
You added bme.begin(0x76); and on that board I’m not sure if all I2c pinsare 21 and 22 add some lines that print out the SDA and SCL values e.g. Serial.println (SDA) same for the SCL and check your wiring of the sensor. Try an I2c bus scanner too. There is one on my GitHub under general, make sure you change wire.begin( to wire.begin(21,22) or whatever way round you have yours sda,scl is the syntax.
@s.husain6125
@s.husain6125 4 роки тому
How I can send upcoming data to Cloud or firbase sir means how to use receiver as Lora gateway to send sensor value to firebase
@G6EJD
@G6EJD 4 роки тому
Once your LoRa receiver has the data packet it would use the variable to then upload the data to e.g. firebase there are examples of firebase uploads so thelora receiver and firebase sketches would need to be combined into one.
@s.husain6125
@s.husain6125 4 роки тому
@@G6EJD yes sir but Lora sender send value in packet if we send packet to the firbase then it will not send individual sensor value to firbase because multiple sensor value in in packet that is recived from sender device so how can we separate different sensor value from the incoming data packet and send to firbase my problem is that if i send packet as variable this method will not show my all individual value to firbase database so what is the solution sir
@G6EJD
@G6EJD 4 роки тому
@@s.husain6125 You can sperate the sensor values easily enough, say you send to a LoRa receiver a packet that looks like this, you need to define it so your sure about its format: packet = "temp","22.6","humi","50.1","pres","1000.1" and so on, then you extract the sensor values accordingly: float temperature = packet.subString(8,12); Then send your value to Firebase Repeat for the others.
@s.husain6125
@s.husain6125 4 роки тому
@@G6EJD great sir thank you for your nice support you are always very supportive thats way i like the channel more if it is possible please make video on send lora data to thingspeak or firebase..... Many thanx
@s.husain6125
@s.husain6125 4 роки тому
@@G6EJD what is( 8,12) in above code sir that you have suggested
@TaeheonK
@TaeheonK 3 роки тому
I tried to connect same way but Bme280 wasnt detected. I change address 0x77for 0x76.. but It still isn’t working. How can I resolve this?
@G6EJD
@G6EJD 3 роки тому
First you have to determine which pins are the SDA and SCL, these are determined by the board type you selected in the IDE, which type of board is it your using? Also write a short programme that displays the value of the I2C pins like serial.println(SDA) and the same for SCL. If you have a test programme for a board with a display check that for hints on the connections or look for a pin-out diagram
@michaels8297
@michaels8297 3 роки тому
hi whenver I run the esp32 lora sender/receiver examples I see characters like this on my serial monitor "⸮sS⸮0c⸮#S⸮d⸮⸮⸮⸮*=⸮⸮U⸮v+⸮⸮". I am just using the standard examples and cant figure out how to turn these characters into strings/numbers so i can perform logic on them
@G6EJD
@G6EJD 3 роки тому
What serial port speed are you using? I only use 115200 baud in my examples so when the serial port monitor is open is it set to the correct speed?
@michaels8297
@michaels8297 3 роки тому
@@G6EJD I appreciate your response so much thank you. I can now see the messages in readable form after changing the baud rate. Do you know why I had to do that? I had it previously set to 9600?
@michaels8297
@michaels8297 3 роки тому
@@G6EJD maybe it had to do with this line in void setup... " Heltec.begin(true /*DisplayEnable Enable*/, true /*Heltec.LoRa Disable*/, true /*Serial Enable*/, true /*PABOOST Enable*/, BAND /*long BAND*/);"""". its possible that the true value for "Serial Enable" enables the baud rate on 115200?
@G6EJD
@G6EJD 3 роки тому
Well it enables the serial output yes as part of Heltec’s setup. 9600 baud is an old school speed thats not required for the ESP32. Best to always use what is now the de-facto speed of 115200
@G6EJD
@G6EJD 3 роки тому
The baud rate is explicitly set in the programne
@grizzbeeuno2242
@grizzbeeuno2242 5 років тому
Banggood link does not work
@G6EJD
@G6EJD 5 років тому
Unfortunately Banggood change their products frequently, just follow the link and enter ‘lora’ in the search box it shows them straight away, sorry about that
@s.husain6125
@s.husain6125 4 роки тому
Hello sir please make tutorial on send sensor value to cloud or the things network I have tried all the things but not succeed yet please guide sir
@G6EJD
@G6EJD 4 роки тому
Saddam Husain, you just need to use the sketch example I did for Thingspeak uploads but get data from the LoRa receiver
@s.husain6125
@s.husain6125 4 роки тому
@@G6EJD i did all but error showing that string can not convert to float during initialization so how i can put the incoming string Lora packet to float value and save to variable and send to things speak or firbase please make tutorial on that sir please please
@G6EJD
@G6EJD 4 роки тому
You would have received a string representation of a number e.g. “3.141” in say a variable called receivedValue then float value = receivedValue.toFloat(); But you do t need to do that just leave the received number as a string and parse to e.g. Thingspeak as a string. No need for any conversions.
@s.husain6125
@s.husain6125 4 роки тому
@@G6EJD many thanks sir love with respect......
@yachalupson
@yachalupson 2 роки тому
Great walk-through, but after watching many videos; reading guides and documentation; trawling through lib code.. I can't seem to find anything on sending and receiving 'fixed' (direct, addressed) transmission frames between a sender and receiver, in the standard LoRa data frame format (ie. []. Ebyte's E32 Lora modules (with simplified serial communication) do such a clean job of this, while ?unfortunately? abstracting the process. I've had no issue there. Moving to Arduino-compatible chips, ESP etc I've run into a world of hurt where all examples seem to be either LoRaWAN or non-addressed messages; your video here is another example. The library's seem to have no provision for address filtering. Sending a structured frame seems to be easy enough. But assigning a 2 byte receiver address to a node has me stumped. Help!
@G6EJD
@G6EJD 2 роки тому
It’s really very simple to implement just add (example): setSyncWord(0x34); then the receiver will only react to a LoRa packet which was sent from a LoRa module where the same synchword was set. So setSyncWord(0x34); then send data and only modules with the same address will process the packets. Or use setSyncWord(0xFF); for a broadcast to any receiver.
@yachalupson
@yachalupson 2 роки тому
@@G6EJD Brilliant. Thanks so much for replying, I won't know immediately but it sounds like you've 'unblocked' me on this. I think I've probably been put off track by returning to a project that started with ES32 modules and their abstracted documentation/language. I hadn't picked up that the "address" field I was looking for might actually be the SyncWord. Happy new year.
@G6EJD
@G6EJD 2 роки тому
It does work although slows down packet speed a little and for lots of devices you need careful address management. I tend to go for a one-to-many topology otherwise it’s gets very complicated to manage. In practice I’ve never found a need to use addressing unless there are very many master devices.
@halukyilmaz9621
@halukyilmaz9621 4 роки тому
whats your best rssi ?
@G6EJD
@G6EJD 4 роки тому
At very close range you get a value of -30dbm and at extreme range -120dbm, a typical value might be -90dbm and don’t forget it’s a logarithmic scale so it compresses values
@halukyilmaz9621
@halukyilmaz9621 4 роки тому
@@G6EJD I have ttgo Lora sx1276 and typically I got -50 I just set power to 20 and sf 11 I need to coverage city and I just problem when behind buildings do I have something wrong ?
@G6EJD
@G6EJD 4 роки тому
Haluk YILMAZ, your problem is signal strength and trying to do something LoRa was not designed to do, that is cover an urban area. When RF signals go above ~300MHz they tend to exhibit optical line of sight characteristics, so if a building is in the way the signal will not penetrate it or be bent around it, it applies to any radio communication links, data or voice. The best you can do is use 433MHz rather than 868/915 as this will give extended coverage and range. There are other effects than come into play the main one is the Fresnel zone (google it) which results from reflections from the ground and surrounding objects and results in a reduction or received signal strength. If you use 433MHz make sure your antennas are designed for that frequency (70cms wave length) so not the supplied antennas which are for 868/915. The receiver and transmitter antennas need to be reciprocal/ identical and may well be directional to get the required range /coverage your trying to achieve.
@halukyilmaz9621
@halukyilmaz9621 4 роки тому
Thanks so much for replying can I get your email or Skype I would be so happy
@G6EJD
@G6EJD 4 роки тому
Haluk YILMAZ, go to G6EJD.dynu.com its there under contact
@RaadYacu
@RaadYacu 5 років тому
i doubt these antennas can achieve such - lucky if 1km. Judging by the size of the antenna that this was 915 Mhz Frequency?
@G6EJD
@G6EJD 5 років тому
You are maybe comparing the antenna size and modulation techniques with now old methods, Lora uses Chirp Spread Spectrum modulation and there are many examples of ranges exceeding 10km with the same antennas
@mr.unusual16
@mr.unusual16 3 роки тому
Tuguy
Rutgers University Confirmed: Meshtastic and LoRa are dangerous
13:27
Andreas Spiess
Переглядів 719 тис.
Try these 16 Brilliant ESP32 projects!!!
11:18
ToP Projects Compilation
Переглядів 508 тис.
GADGETS VS HACKS || Random Useful Tools For your child #hacks #gadgets
00:35
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
GreatScott!
Переглядів 460 тис.
It’s Been a Good Run, Phone Providers.
26:31
Data Slayer
Переглядів 3,6 млн
TTGO ESP32 LoRa OLED review
4:18
Vortecks
Переглядів 22 тис.
JOIN THIS EXCITING OFF GRID NETWORK!!!
14:13
andy kirby
Переглядів 364 тис.
Getting Started with Meshtastic - Devices
15:01
The Comms Channel
Переглядів 167 тис.
021 New and Cheap APRS using LoRa Technology
13:31
HB9BLA Wireless
Переглядів 51 тис.
New! Heltec V3 ESP32 LoRa OLED Step By Step
12:16
ShotokuTech
Переглядів 36 тис.
How to use LoRa with Arduino
12:43
learnelectronics
Переглядів 120 тис.
#186 SMS over LoRa: Long distance SMS without 4G // Project
4:39
MickMake
Переглядів 100 тис.
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Ремонтяш
Переглядів 369 тис.
It's embarrassing how much I like this thing.
12:19
Linus Tech Tips
Переглядів 815 тис.
Vortex Cannon vs Drone
20:44
Mark Rober
Переглядів 12 млн
Первый рабочий день HappyPC Старый Оскол! 🔥
9:51
Герасимов Live
Переглядів 19 тис.
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Ремонтяш
Переглядів 369 тис.