c# - RS232 via USB with UnoPlatform and C#
问题描述
i want to control my power amplifier for my music box with my Raspberry pi 4 and a Uno GUI. this device has a subd9 socket using rs232 serial communication protocol. i use a usb to serial converter cable and want to use the raspberrys USB port for this.
the command i need to send is hex and looks like ´ 02 00 00 00 01 03
i searched for solutions but i wasn't able to find something suitable. Does anyone have an idea how i can achieve that?
Thank you for any help
解决方案
我已经安装了 system.io.ports V5.0.1,没有任何错误。我将 Using System.IO.ports 添加到我的 Mainpage.cs。并在智能中出现警告(图片)
对不起,它是德国人,
Nicht verfügbar = 不可用 verfügbar = 可用
当我添加来自 jdweng 的代码示例时,就会出现(图 2)
它说:错误 CS1069 在命名空间 System.IO.Ports 中找不到类型名称“SerialPort”。此类型已转发到 Assembly System.IO.Ports,Version=0.0.0.0,Culture=neutral,PublicKeyToken=cc7b13ffcd2ddd51。您应该添加对程序集的引用。Test.Skia.Gtk C:"Users"User-source-repos-Test-Test-Test.Shared-MainPage.xaml.cs 54 活动
编辑 26.05.2021 15:20 我在 Projekt 的每个 Header 上安装了 Nuget 包,现在所有错误都消失了。但是现在当我尝试发送 jdweng 时,我遇到了一个异常:
推荐阅读
- python - 将虚拟环境保存在 Anaconda 中并与其他同事共享
- python - 向递归斐波那契程序添加计数器
- html - highcharts datetime 类型在 bootstrap 4 列中不起作用
- django - 具有多个条件的 order_by 导致不同的行为不端
- firebase - 使用 collectionGroup 更新集合中所有文档的 HTTP 函数
- javascript - 重命名对象键
- java - 如何从字符串中删除符号并将它们放回去?
- node.js - 如何让 docker 下运行的 nodejs 服务器通过 mongoose 连接到 mongodb?
- sql - 通过 SQL 在 Access 数据库上批量运行 UPDATE 语句的方法
- macos - 远程 SSH 管道到本地文本编辑器