Close

MQTT Test

A project log for wind weather station

This is a product match the anemometer to measure the wind speed, also provide other interfaces and sensor to measure tem, hum, and so on.

makerfabsMakerfabs 04/16/2021 at 10:300 Comments

Since the first debug, the sensors were working fine, and the measurements could be displayed on the LCD. After it, I would test the A9G module working, I had prepared a SIM card for the A9G module to connect the network.

First, I had to program the board to drive the A9G module running. I spent some time programming for the microcontroller to control the A9G module power on and communicate with it by UART. Used the SERIAL monitor of Arduino IDE to send some AT command, I could get the reply such as ”OK”, that prove the communication between the microcontroller and A9G module is well.

After it, I began to try transmitting the data to MQTT by the A9G module. Referring the guide of A9G module, I use the serial monitor to send the commands for MQTT one by one that is succeed to transmit the data and I could receive the transmitted data by other MQTT client. But it is worth noting that the GSM antenna must be connected, otherwise the module could not be connected to the network that I wasted a lot of time because of it.  

Next, I programmed the commands to the code, to drive the board transmitting data to MQTT automatically.

Discussions