当需要编程操纵硬件时会遇到过这样的问题,就是通过串口来接收硬件发来的数据,或是通过串口向硬件发送某种格式的命令.在C#平台上,可以通过 System.IO.Ports 命名空间下的SerialPort 类来实现. 下面是我做过的一个简单的示例,首先获取本机关联的串行端口列表,然后获取配置文件中配置的COM端口,检查是否在本机串行端口列表中,若在列表中则进一步实例化串口对象,并为串口对象指定数据接收事件来实现监听,示例代码如下: using System.IO.Ports; namespace S
In this article I will show you how to connect yourdesktop and mobile applications to a mobile backend as a service (mBaaS) with Delphi 10.1 Berlin. I normally use Parse.com as a backend but as they announce that they will close their mBaaS service I