使用Celluloid的Ruby机器人框架:artoo

jopen 10年前

Artoo是一个使用Rub开发的机器人微框架。Artoo为机器人和物理计算提供了一个简单,但功能强大的领域特定语言(DSL)。

示例:

Basic

Arduino with an LED and a button, using the Firmata protocol.
require 'artoo'    connection :arduino, :adaptor => :firmata, :port => '/dev/ttyACM0'  device :led, :driver => :led, :pin => 13  device :button, :driver => :button, :pin => 2    work do    on button, :push => proc {led.toggle}  end

项目主页:http://www.open-open.com/lib/view/home/1421395654687