原地址:c# 从0实现一个温湿度监测的小工具 (1) - 掘金 (juejin.cn)
遇到的问题:
1.使用.NET5.0不能运行会报错:System.IO.Ports is currently only supported on Windows.
需要换成.NET6.0或者.NET7.0
2.测试串口的时候需要查看有没有其他串口占用,然后占用就会报:”Object reference not set to an instance of an object.“,需要吧其他软件或者进程关闭后再运行
目前效果(只做了个半成品):
总结:让我一个出来没接触过Modbus的人看步骤就可以写出来,写的详细,大佬牛逼