Ruby 串行/并行端口操作
我想知道你们中的一些人是否通过 ruby 中的串行或并行端口使用硬件/电路,而不是使用 arduino 或类似的东西,只是通过端口将接收脉冲发送到面包板?或者如果有人知道一个有据可查的图书馆/宝石或关于该主题的优秀博客文章。
到目前为止,我发现有关“原始”端口操作的博客文章非常酷但很短。
http://blog.stevenocchipinti.com/2011/10/ruby -parallel-port-leds.html
这些库看起来不错,但没有很好的文档:
http://rubygems.org/gems/serialport
https://github.com/hparra/ruby-serialport/
I wonder if some of you are working with hardware/circuitry via serial or parallel port in ruby, not with arduino or something similar, just sending receiving pulses thru the ports to a breadboard? or if someone knows a well documented library/gem or a good blog post on the subject.
So far I've found these the blog post about 'raw' port manipulation is very cool but short.
http://blog.stevenocchipinti.com/2011/10/ruby-parallel-port-leds.html
these libraries seem nice, but don't have very good docs:
http://rubygems.org/gems/serialport
https://github.com/hparra/ruby-serialport/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看到你的博客链接,很高兴它被描述为“非常酷”,哈哈,谢谢。
不确定它是否会对您有帮助,但我在该项目的博客上写了一篇(稍)长的关于该主题的文章:
http://tank.stevenocchipinti.com/2011/11/using-parallel -port.html
主要是我的 github 帐户的链接,其中包含可能对您有用的示例。
我选择这种“原始”方法是因为代码实际上非常简单(如果你有 Linux)并且对第三方 gem 的依赖较少,但我完全可以理解对一个简单库的需求,并且很想看看你能做什么最终使用。
希望有帮助,祝你好运!
I saw your link to my blog and was happy that it was described as "very cool", lol, thanks.
Not sure if it will help you any more, but I wrote a (slightly) longer post on this topic on the project's blog here:
http://tank.stevenocchipinti.com/2011/11/using-parallel-port.html
Mainly it has links to my github account with the examples that may be useful for you.
I opted for this "raw" approach because the code is actually quite simple (if you have linux) and there is less dependence on third-party gems, but I can totally understand the need for a simple library and am keen to see what you end up using.
Hope that helps, good luck!