通过网络以最低延迟控制 Arduino

发布于 2024-12-17 16:36:00 字数 393 浏览 4 评论 0原文

我在某个位置有一块 Arduino 板和一个网络服务器。
我还有一个应该控制 Arduino 的网站。什么技术可以让用户以最少的延迟控制 Arduino 板?

我有 Node.jssocketserver, Jabber 打算尝试一下,但这是正确的方向吗?

I have an Arduino board in a location, and a webserver.
I also have a website that is supposed to control the Arduino. What technique would allow users to take control of the Arduino board with the least amount of latency?

I have Node.js, socketserver, Jabber in mind to experiment with, but is this the right direction?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱本泡沫多脆弱 2024-12-24 16:36:01

您应该查看 Socket.IO 以在服务器端和客户端实现 WebSocket。

有一个名为 duino 的伟大项目,用于使用 Node.js 访问 Arduino,您“只需”通过管道传输所有通信通过 WebSocket。

更新:与此同时,我发布了一个框架,用于使用 Node.JS、JavaScript 和 WebSockets 向 Arduino 发送命令。请务必查看 Noduino

You should have a look at Socket.IO for implementing WebSockets on server- and client-side.

There's a great project called duino for accessing Arduino with Node.js, you "only" have to pipe all communication through WebSockets.

Update: In the meantime I have published a framework for sending commands to an Arduino with Node.JS, JavaScript and WebSockets. Make sure to have a look at Noduino!

冷夜 2024-12-24 16:36:01

我很幸运地使用 node-serialport 与 Arduino 对话。使用串行端口会产生非常低的延迟,我用它来构建一个照相亭。 代码位于 GitHub 上(如果你想查看的话),尽管它的组织结构很差,就像我一样我急于为我的婚礼做这件事,但是……捷足先登。

I had good luck using node-serialport to talk to the Arduino. Using the serial port results in very low latency, and I used it to build a photobooth. The code is on GitHub if you want to check it out, though it's very poorly organized as I was rushing to get this done for my wedding and well... corners were cut.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文