通过网络以最低延迟控制 Arduino
我在某个位置有一块 Arduino 板和一个网络服务器。
我还有一个应该控制 Arduino 的网站。什么技术可以让用户以最少的延迟控制 Arduino 板?
我有 Node.js,socketserver, 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(2)
您应该查看 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!
我很幸运地使用 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.