Do you have a LoRa gateway and you want to communicate with another board using MQTT?
How do you have your LoRa gateway set up?
I’m not really sure that I understood your question.
Can you provide more details about what you’re trying to build?
Get data from a car park using ultrasonic sensors to update information about occupancy on the web server.Device (sensor), ES32 Lora to transmit data to another ES 32 receiver which updates the server. Which ever set up is easy ?
The protocol used us MTTQ
If I understood correct, I’ll show you two scenarios:
1) Using LoRa
The ESP32 connected to the sensor sends the status of the sensor to another ESP32 using LoRa. The receiver also shows up a web server with the state of all sensors.
You can follow our ESP32 LoRa tutorial:https://randomnerdtutorials.com/esp32-lora-rfm95-transceiver-arduino-ide/
Then, you just need to add the web server code on the receiver and make the necessary changes to display the sensor status: https://randomnerdtutorials.com/esp32-web-server-arduino-ide/
2) Using MQTT
As a reference, you can take a look at this MQTT tutorial: https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/
If you don’t want to use Node-RED, you can build a web server on the ESP32 that receives the sensor status.
Using one or another will depend on your own project requirements. If you have good Wi-Fi coverage, I would recommend MQTT.
Is they anyway I can see the wiring schematics of the sensor and ESP 32 LORA board.
Which LoRa board are you using?
You can use any pins as long as they are not being used by the LoRa module.
You can take a look at this ultrasonic sensor tutorial with the Arduino. The first code should be compatible with the ESP32, you just need to modify the pins used in the code.
Using the ESP 32 LoRa_WiFi Heltec board v2. Right l have managed to configure a sender and receiver using the two mentioned boards.Now my question is can l just configure the board connected to sensors ( sensor node ) just as a transmitter/ sender then configure the receiver as a gateway cum server instead of having a raspverry pi as a server [ i.e sensor node —— gateway —— server ( Raspberry Pi ) configuration ]. Just have sensor nodes—– Gateway/ Server —- then application. If that is possible can l have links to configure gateway/ server on ESP 32 LoRa_ WiFi boards ?
Here are some links that may help you:
Alternatively, you can add a web server code to your receiver, so it displays the received packets.