GSM800 mqtt 库 [英] Gsm800 mqtt library

查看:51
本文介绍了GSM800 mqtt 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 sim800 模块,我想从网络服务器控制继电器,所以我需要 mqtt 库和 arduino uno 的示例代码,请帮助我,什么是 AT 命令使用arduino uno在sim800中发布和订阅标签

I have sim800 module ,i want to control relay from webserver so i need mqtt library and sample code for arduino uno please help to me,What is AT command for publish and subscribe the tag in sim800 using arduino uno

推荐答案

我认为您的 SIM800 模块不太可能具有用于 MQTT 的 AT 命令.

I think it is very unlikely that your SIM800 module will have an AT command for MQTT.

Arduino 有几个 MQTT 库:

There are a couple of MQTT libraries for Arduino:

这两个库都应该与实现客户端接口的任何库一起使用.因此,应该可以创建一个与 GSM 模块通信的 TCP 客户端.

Both of these libraries should work with any library than implements the Client interface. So it should be possible to create a TCP client that talks to the GSM module.

如果 SIM800 支持 GSM 库,则实现客户端接口:https://www.arduino.cc/en/Reference/GSM

If the SIM800 supports the GSM library then that implements the Client interface: https://www.arduino.cc/en/Reference/GSM

如果您在 Arduino 中使用硬件串口,那么使用 Leonardo 可能比使用 Uno 更好,因为您可以使用 USB 对 Arduino 进行编程,并使用硬件串口与 GSM 模块通信.

If you are using the hardware serial port in the Arduino, you might be better using a Leonardo than a Uno, because you can use the USB to programme the Arduino, and the hardware serial to talk to the GSM module.

这篇关于GSM800 mqtt 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆