从 arduino 到浏览器扩展的通信全部在本地运行
我试图弄清楚如何从 Arduino 获取串行信息,该 Arduino 控制我在计算机本地打开的浏览器中运行的 Javascript 浏览器扩展。看来我需要某种中间人来内部化串行读数并将它们传递到浏览器(以激活我编码的功能)。 Python?非常感谢任何答案、帮助和参考。
I am trying to figure out how I would go about taking serial information from an Arduino which controls a Javascript browser extension I have running in an open browser locally on a computer. It would seem that I would need some sort of middleman to internalize the serial readings and pass them to the browser (to activate the functions I have coded). Python? Any answers, help, and reference is greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
另一种选择是使用浏览器插件从 javascript 访问串行端口:http://code。 google.com/p/seriality/
Another option is to use a browser plug-in to access the serial port from javascript: http://code.google.com/p/seriality/
python 中的一个非常简单的 http 服务器在 do_Get 方法中看起来像这样,
您可以添加访问 arduino 程序所需的代码,
另一个选择是使用 webrick 作为网络服务器部分在 ruby 中进行编码
第三个选项是使用以太网 -屏蔽arduino并完全跳过代理代码
A very simple http server in python would look like this
in the do_Get method you can add the code necessary to access your arduino program
another option would be coding this in ruby by using webrick as the webserver part
a third option would be using an ethernet-shield on the arduino and skipping the proxy code completely