• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

MQTTP

Q&A Forum › Category: Arduino › MQTTP
0 Vote Up Vote Down
MosQuitto asked 6 years ago
8 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi Hicks.
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?
Regards,
Sara

0 Vote Up Vote Down
MosQuitto answered 6 years ago

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

0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi Hicks.
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.
Regards,
Sara

0 Vote Up Vote Down
MosQuitto answered 6 years ago

Is they anyway I can see the wiring schematics of the sensor and ESP 32 LORA board.

0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi.
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.
https://randomnerdtutorials.com/complete-guide-for-ultrasonic-sensor-hc-sr04/
Regards,
Sara

0 Vote Up Vote Down
MosQuitto answered 6 years ago

HI Sara
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 ?
Regards,
MosQuitto

0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi.
Here are some links that may help you:

  • https://learn.sparkfun.com/tutorials/esp32-lora-1-ch-gateway-lorawan-and-the-things-network/all
  • https://github.com/things4u/ESP-1ch-Gateway-v5.0
  • https://www.thethingsnetwork.org/community/berlin/post/making-a-1-channel-lora-gateway-with-esp32-from-ttgo

Alternatively, you can add a web server code to your receiver, so it displays the received packets.
Regards,
Sara

0 Vote Up Vote Down
MosQuitto answered 6 years ago

I appreciate your response. Regards
MosQuitto

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.