cost 161 ms
webAPI - 通过 USB 转换器的串口设备 - webAPI - Serial Device via USB converter

我第一次尝试通过 webAPI 连接设备。 我正在购买一套带有体重指示器的秤。 计划是将它连接到我的 webApp 并使用 javascript 直接将重量读入我的应用程序。 它有一个 RS232 串口 output,但作为新计算机,这些没有串行输入,我打算通过 USB 转换器将它连接到我的计算机。 ...

如何从 web 串行 api 写入器读取字节响应 - How to read bytes response from web serial api writer

我正在尝试使用 Web Serial API。我想将字节写入设备并从中读取字节响应。 我可以将字节和字符串写入设备 - 这里一切都按预期工作。 我可以从设备读取字节和字符串 - 这里我有问题。 示例显示您可以创建一个while(true)循环,并且 stream 将返回{ value, done } ...

Web Serial Api ->{value,done} -> 即使在读取了串口设备发送的全部数据后,done 也没有变为 true - Web Serial Api ->{value,done} -> the done is not getting true even after reading the whole data sent by the serial port device

const { value, done } = await reader.read(); 文档( https://web.dev/serial/ )中使用了上面的这一行来读取来自串行端口的数据。 文档说,当串行设备发送的所有数据都被读取时,done 将变为 true。 但事实并非如此,因为它在 ...

如何关闭通过 TransformStream 传输的 Web 串口? - How can I close a Web Serial port that I've piped through a TransformStream?

我有一个 Web 串行端口,我想从中读取一些数据。 我想使用TransformStream通过使用pipeThrough来转换数据来进行一些处理(例如,将字节解码为字符串、分离出逻辑消息等)。 但是,一旦我这样做,我就不能再通过调用reader.releaseLock()来释放端口上的锁。 我在这 ...

在javascript中用web串口api读取USB串口数据 - Read USB serial port data with web serial api in javascript

-我从事温度和湿度读取设备的开发。 我们有自己的温度和湿度读取设备(基于 USB 的 COM(串行)端口设备)。 目前,我们使用独立软件获取,该软件使用虚拟 com 端口驱动器与设备通信。 但是,我想使用“网络串行 API”在我的 web 应用程序中读取这些记录的数据。 在编写读取该数据的代码时, ...

如何使用 Web 序列号 API 发送文件? - How would I send a file with Web Serial API?

我是一个完全的新手,我今天才开始研究这个。 我有一个运行 chrome 版本 96.0.4664.111(官方构建)(64 位)的 chromebook,还有一个树莓派 pico,我已经在(拖放)上加载了 python 引导加载程序。 我试图从我的浏览器串行访问 pico 以加载我的源代码,因为我 ...

带Arduino的电位器送Javascript - Potentiometer with Arduino sent to Javascript

我目前正在做一个练习,通过 Arduino 将电位器数据发送到网页中。 我宁愿通过 Web 串行 API 而不是节点服务器或类似的东西来做到这一点。 我的 Arduino 代码是 这表明串行监视器中的值没有问题。 javascript 代码是这样的(在脚本中,嵌入在 html 中): 这意味着我 ...

Google Chrome Web 序列号 API:如何使用十六进制代码寻址 Modbus 设备? - Google Chrome Web Serial API: How do I address a Modbus device with a hex code?

我打算通过 Google Chrome 内置的 Web 串行 API 使用 Modbus 寻址设备。 我想用十六进制代码寻址我的设备。 下面的截图证明我的设备可以使用这样的工具成功寻址。 因此,该接口使用以下十六进制值寻址:01 03 00 01 00 02 95 CB 我现在的问题是。 本教程仅 ...

Google Chrome Web Serial API:如何配置Modbus RTU的参数? - Google Chrome Web Serial API: How do I configure the parameters for Modbus RTU?

我打算在 Google Chrome 中使用 Web 串行 API 来寻址具有 Modbus RTU 的设备。 必须指定波特率才能开始设置 - 因此这已经完成。 以下链接指向描述如何设置参数的文档部分:Googhttps://wicg.github.io/serial/#serialoptions ...

尽管提供了 vendorId,但 Web 串行 API 仍显示“未找到兼容设备” - web serial api shows “no compatible devices found” despite being given the vendorId

Windows 8.1,Chrome v91.0.4472.164。 我已针对设备管理器验证了供应商和产品 ID。 该设备是使用 Ch340 驱动程序的 Arduino UNO,它在端口(COM 和 LPT)下的设备管理器中列为“USB-SERIAL CH340(COM7)”我的代码如下所示; ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM