海萤物联网教程:MicroPython SDK

树莓派Pico|SHELL中microPython命令行|pico sdk开发环境搭建|点灯代码|必备开发工具|gcc涉及的include文件目录 阅读详情

海萤物联网教程:MicroPython SDK

本文博客链接:http://blog.csdn.net/jdh99,作者:jdh,转载请注明.

在线文档地址

简介

海萤物联网的MicroPython SDK是标准Python SDK移植到MicroPython的版本,标准版本可以查看文档:海萤物联网教程:Python SDK

MicroPython版本SDK在esp32中测试成功,esp8266资源太少不能运行。本文主要介绍MicroPython版本与标准版本的不同之处。

开源

安装

MicroPython版本的SDK已上传到pypi,包名是mciropython-tziot。此包依赖micropython-lagan,crcmodbus等若干个包。所以可以新建需求文件,然后一键全部下载。

新建文件requirements.txt,内容:

micropython-tziot
micropython-lagan
micropython-dcompy
crcmodbus
knocky
sbc
utzpy

输入命令下载包到指定目录:

pip install --target=d:/package -r requirements.txt

下载后文件如下图:
在这里插入图片描述
删除掉egg-info等无关文件,将所有文件夹都上传到设备的lib目录下,即可在设备中使用。
在这里插入图片描述

API

MicroPython版本的SDK和标准版本的API接口全部一致,新增了两个函数:

def connect_wifi(ssid: str, key=None, timeout=10) -> bool:
    """
    连接wifi
    :param ssid: wifi热点名
    :param key: wifi密码.不需要密码则填None
    :param timeout: 超时时间.单位:s
    :return: 返回True表示连接成功.False是连接失败
    """

def run(app):
    """运行应用程序.如果没有应用程序,app可填写None"""

connect_wifi:连接wifi

esp32等可通过wifi联网的设备,可调用本函数连接wifi。

run:运行用户应用程序

MicroPython在不同设备上函数嵌套深度各有不同,以esp32为例,主线程的嵌套深度为49,线程中只有10。所以将海萤物联网SDK部署在主线程,然后通过run函数开辟线程运行用户程序。所有用户代码需放在用户程序中。

示例

读取NTP时间

import tziot
import time


pipe = 0


def main():
    global pipe
    
    print('connect wifi')
    ok = tziot.connect_wifi('JDHOME_MASTER', 'QWERASDFZXCV')
    if ok is False:
        print('connect wifi failed')
        return
    print('connect wlan success')
    
    pipe = tziot.bind_pipe_net(0x2141000000010029, pwd', '0.0.0.0', 12025)
    tziot.run(app)


def app():
    global pipe
    
    while not tziot.is_conn():
        time.sleep(0.1)
    resp, err = tziot.call(pipe, 0x2141000000000004, 1, 2000, bytearray())
    print("err:", err, "time:", resp)


if __name__ == '__main__':
    main()

输出:

connect wifi
connect wlan success
err: 0 time: b'2021-04-06 05:23:00 +0800 CST'

对外提供灯控服务

开发板上有一个灯,通过GPIO2控制的。对外提供灯控服务,控制这个灯的亮灭。

服务号服务
1控制灯状态
  • CON请求
字段字节数
灯状态1
  • ACK应答:空

源码:

import tziot
import time

from machine import Pin


# 服务号
RID_LED = 1

pipe = 0
gpio = None
state = False


def main():
    global pipe, gpio
    
    gpio = Pin(2, Pin.OUT)
    gpio.on()
    
    print('connect wifi')
    ok = tziot.connect_wifi('JDHOME_MASTER', 'QWERASDFZXCV')
    if ok is False:
        print('connect wifi failed')
        return
    print('connect wlan success')
    
    pipe = tziot.bind_pipe_net(0x2141000000010029, pwd, '0.0.0.0', 12025)
    tziot.register(RID_LED, ledService)
    tziot.run(None)
    

def ledService(pipe: int, src_ia: int, req: bytearray) -> (bytearray, int):
    global state, gpio
    
    if len(req) != 1:
        return
    print('src ia:0x%x state:%d' % (src_ia, req[0]))
    
    if req[0]:
        gpio.on()
    else:
        gpio.off()
    
    return None, 0


if __name__ == '__main__':
    main()

用go语言编写一个测试程序控制灯灭然后3秒后亮:

pipe, _ = tziot.BindPipeNet(0x2141000000000401, pwd, "192.168.1.119", 12021)
for tziot.IsConn() == false{}

resp, err := tziot.Call(pipe, 0x2141000000010029, 1, 3000, []uint8{0})
fmt.Println("err:", err, "time:", string(resp))
time.Sleep(3 * time.Second)
resp, err = tziot.Call(pipe, 0x2141000000010029, 1, 3000, []uint8{1})
fmt.Println("err:", err, "time:", string(resp))

设备LED会灭3秒然后亮,并有打印输出:

connect wifi
connect wlan success
src ia:0x2141000000000401 state:0
src ia:0x2141000000000401 state:1
1.3 ESP32-MicroPython高级模块操作 关于ESP32-micropython的modbus串口,wifi,蓝牙,内存管理库gc,mqtt库等的使用 阅读详情

相关推荐

microPython中实现Modbus通信支持各类触摸屏功能码有0x01\0x02\0x03\0x04\0x05\0x06等功能码

microPython中实现Modbus通信支持各类触摸屏功能码有0x01\0x02\0x03\0x04\0x05\0x06等功能码

用micropython写一段Modbus通讯代码

Micropython是一种用于嵌入式系统的Python解释器,支持Modbus协议。你可以使用Micropython的Modbus库来编写Modbus通讯代码。

plumlee的专栏 3728

pico-micropython-examples:“ Raspberry Pi Pico Python SDK”一书随附的示例

MicroPython范例 Raspberry Pi Trading发行的“ ”一书附带示例,该书构成技术文档的一部分,以支持Raspberry Pi Pico和MicroPython移植到RP2040。 会费 虽然我们欢迎请求提供更多示例代码的请求,但请不要链接到个人网站或您的社交媒体。 用AsciiDoc描述和Fritzing接线图完整记录的文稿,例如参见示例,则有更多的被纳入的机会。 我们的示例代码受BSD-3-Clause许可证的约束:任何贡献都必须受同一许可证的约束。

micropython下载及安装编译过程

实现基于Black_F407VE等开发板的micropython移植,为后期 stm32H743的 micropython和OpenMV作准备。

孙冬梅的博客 1万+

Python库 | micropython-modbus-1.0.0.tar.gz

资源分类:Python库 所属语言:Python 资源全名:micropython-modbus-1.0.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

Android TV开发:RecyclerView焦点控制实践与优化

在Android TV应用开发中,焦点控制是提升用户体验的关键技术。不同于移动端触摸交互,TV端通过遥控器方向键导航,需要精确的焦点管理机制。RecyclerView作为动态列表的核心组件,其焦点控制涉及视图复用、导航逻辑和视觉反馈等核心技术点。通过合理配置focusable属性、自定义焦点查找算法以及优化动画性能,开发者可以解决TV端常见的焦点跳转异常、视觉反馈延迟等问题。特别是在视频点播、智能家居控制等场景中,良好的焦点控制能显著提升操作效率。本文结合网格布局焦点环绕、分页加载焦点保持等实战案例,深入解

weixin_34195142的博客 474

十五、W5100S/W5500+RP2040之MicroPython开发<Modbus示例>

在这个智能硬件和物联网时代,MicroPython和树莓派PICO正以其独特的优势引领着嵌入式开发的新潮流。MicroPython作为一种精简优化的Python 3语言,为微控制器和嵌入式设备提供了高效开发和简易调试的当我们结合WIZnet W5100S/W5500网络模块,MicroPython和树莓派PICO的开发潜力被进一步放大。这两款模块都内置了TCP/IP协议栈,使得在嵌入式设备上实现网络连接变得更加容易。无论是进行数据传输、远程控制,还是构建物联网应用,它们都提供了强大的支持。

WIZnet2012专栏 2127

【科研绘图】【数据拟合曲线】:附Origin详细画图流程

拟合曲线图

weixin_50236590的博客 4万+

【亲测免费】 Micropython Modbus库教程

--- ## 1. 项目介绍 **Micropython Modbus** 是一个专为MicroPython设计的Modbus库,支持RTU(串口)和TCP两种通信协议,既可作为Slave也可作为Master运行。这个强大的库使得在微控制器上实现Modbus通讯变得轻松简单,适合于工业自动化、物联网设备等领域。开发团队包括了来自sfera-labs、giampiero7、pycom等社区的贡献...

gitblog_00180的博客 1873

System Verilog学习笔记(十九)——覆盖率

覆盖率是用来衡量验证精度和完备性的数据指标。也可以告诉我们在仿真时设计的哪些结构被触发,哪些没被触发。高质量的验证需要满足以下三个条件。

ljy77882333的博客 2151

LabVIEW Modbus TCP通信避坑指南:解决连接中断、服务器异常与自动重连问题

本文详细解析了LabVIEW环境下Modbus TCP通信的常见问题,包括连接中断、服务器异常等,并提供了自动重连机制的实现方案。通过优化错误处理、超时参数和资源管理,帮助开发者构建更稳定的工业级Modbus TCP客户端,显著提升通信可靠性。

weixin_42525211的博客 431

海萤物联网介绍

文章目录海萤物联网上线背景介绍地址表示方法 海萤物联网上线 本文博客链接:http://blog.csdn.net/jdh99,作者:jdh,转载请注明. 背景 物联网发展多年,通信技术众多,可分为有线和无线两大类。有线技术有基于以太网的;PLC电力线的;485,422等各种总线技术的。无线技术有基于运营商网络2G,4G的;有基于wifi,蓝牙的;有基于各个频段的无线的。在每个场景都有最适合的技术。 这些技术都有对应的协议栈,采用不同技术开发的系统会形成一个个信息孤岛,系统间很难互通。 另外物联网是同时涉及

jdh99的专栏 2万+

CAN信号定义避坑指南:Kvaser Database Editor里Byteorder和Bitpos设置的那些‘坑’

本文详细解析了在Kvaser Database Editor中配置CAN信号时,字节序(Byteorder)和起始位(Bitpos)设置的常见错误及解决方案。通过实际案例和验证技巧,帮助工程师避免DBC文件配置中的陷阱,确保车载电子系统的稳定通信。

weixin_28678831的博客 363

MicroPython开发ESP8266——环境搭建

MicroPython浅玩一下ESP8266。

weixin_45682654的博客 5011

【路径规划】Theta_star算法机器人栅格地图最短路径规划【含Matlab源码 2618期】

Theta_star算法机器人栅格地图最短路径规划 完整的代码,方可运行;可提供运行操作视频!适合小白!

订阅付费专栏Matlab(奶茶价版),可赠送奶茶价版付费专栏指定代码1份; 366

halcon第一讲:基本操作

本文通过Blob分析提取出图片中的硬币,来熟悉halcon的基本操作。 1、读取图像,halcon读取图像有三种方式:1)、文件->读取图像;2)、通过助手;3)、代码 *打开窗口 dev_open_window (0, 0, 512, 512, 'black', WindowHandle) *读取图像 read_image (Image,'1.png') 读取的图像如下: 2...

qq_24946843的博客 3万+

基于micropython的ESP8266与codesys进行modbusTCP通讯

目录 在N1小白盒中刷入codesys modbus server 在ESP8266上运行modbus TCP client 在N1小白盒中刷入codesys modbus server 新建程序,设置为“使能1…” 在主程序中定义两个word数组 选择网卡,由于ESP8266只有WiFi模块,因此这里选择N1盒子的无线网卡,如下图 在Ethernet下添加设备,选择“Modbus_Slave_Device”,并进行相关设置 都设置完后,下载至N1盒子中,如下图所示

zhigedali的博客 2074

★教程1:matlab学习教程入门100例目录

★基础入门 1.为什么要学习MATLAB 2.MATLAB安装 持续更新....... ★MATLAB基础编程语言熟悉

FPGA/MATLAB学习教程/源码/项目合作开发 4万+

【亲测免费】 micropython-modbus:强大的MicroPython ModBus库

micropython-modbus:强大的MicroPython ModBus库 项目介绍 micropython-modbus 是一个开源的 MicroPython 库,支持 ModBus TCP 和 RTU 协议,并可以实现客户端和主机模式。该项目基于 PyCom Modbus 和其他功能扩展,旨在成为一个功能强大的 MicroPython 库。micropython-modbus 支持多种...

gitblog_00320的博客 1265

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

【亲测免费】 探索MicroPython与Modbus的完美结合:micropython-modbus项目推荐

`micropython-modbus` 是一个专为MicroPython ESP32设备设计的Modbus主库。该项目基于`pycom-modbus`,由Pycom开发并开源,旨在为开发者提供一个高效、易用的Modbus通信解决方案。通过`micropython-modbus`,开发者可以轻松地在ESP32设备上实现Modbus通信,从而实现设备间的数据交换与控制。 ## 项目技术分析 ##...

gitblog_00040的博客 691

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

micropython教程modbus_modbus_tk与Modubs Slave结合使用

下载两个软件:Modbus Slave/PollModbus Slave(用来模拟客户端(从))和Modbus Poll(用来模拟服务端(主))Modbus Poll是非常流行的Modbus Master模拟器,用于测试和调试从设备。支持Modbus RTU/ASCII和Modbus TCP/IP。一、模拟器的使用1.1 配置Modbus Poll配置Modbus Poll的连接配置Modbus ...

weixin_39939601的博客 2074

InTheHand.Net.Personal+BlueTooth4,蓝牙开发

项目中有蓝牙开发的必备dll,现在网上相关的文档博客不少,有的说的多有的说少,但是却很少有这两个dll,分享一下。

ESP8266基于MicroPython的Modbus TCP client实现案例

由于默认刷入ESP8266的固件包内不包含modbus库,因此需要自行导入相关库。 首先想到的采用upip指令进行库安装,但是未成功,记录如下 import upip upip.install("库名称") 试了upip.install("modbus ")和upip.install("umodbus ")等都报错, 网上一般都是介绍在python中使用modbus_tk库进行实现,而关于microPython实现modbus资料却很少,查找一番未果后,进到microPython论坛中进行搜索

zhigedali的博客 4191

esp32 MicroPython Modbus RTU协议的测试 以及 micropython-modbus 库的使用

Modbus RTU 是工业自动化领域常用的通信协议,使用 MicroPython 在 ESP32 上实现 Modbus RTU 功能可以方便地与各种工业设备进行通信。通常需要手动将库文件复制到 ESP32 中。

weixin_46158019的博客 1715

MicroPython Modbus library v2.3.7使用笔记1

1、线程:modbus slaver TCP协议,做电力仪表数据采集、处理、转发单元,配300个寄存器regs,二十几台表一次性轮询存入lista,再一次性写modbus slaver的set_ireg(0, lista)。modbus slaver TCP接收上位机查询,如果轮询完成正在写内存,一读一写会资源冲突么?2、中断:每3秒定时轮询电表,因为存在超时未完成情况,设置标志位,轮询未完成时,不进行新任务。

iot2022的博客 472

python 与设置连接通信(modbus)

Modbus协议 Modbus协议是应用于电子控制器上的一种通用语言。通过此协议,控制器相互之间、控制器经由网络(例如以太网)和设备之间可以通信。它已经成为一通用工业标准。有了它,不同厂商生产的控制设备可以连成工业网络,进行集中监控。 Modbus同时支持TCP和RTU协议 Modbus master 主机,连接远程从机来采集数据 Modbus slave 从机,有监听端口,从机一般为PLC。 步...

qq_25562743的博客 8316
上一篇: 海萤物联网教程:物联网RPC框架MicroPython DCOM
下一篇: 海萤物联网介绍
jdh99
jdh99 领域专家: 嵌入式与硬件开发技术领域 领域专家: 嵌入式与硬件开发技术领域
博客等级 码龄18年 1468粉丝 228原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址