Closed mmmries closed 10 years ago
I could not find a way to pass a custom safe angle range to a servo. I experimented with code like this:
device :servo, :driver => :servo, :pin => 1, :range => {:min => 0, :max => 180}
But the params I specify get nested under :additional_params like this:
:additional_params
{ :parent=> #<Device @id=2165082460, @name='name', @driver='driver'>, :additional_params=> { :name=> :servo, :driver=> :servo, :pin=> 1, :range=> {:min=>0, :max=>180}, :parent=>#<Robot 2164657460> } }
I followed the pattern found in https://github.com/hybridgroup/artoo-gpio/blob/master/lib/artoo/drivers/motor.rb#L14
I could not find a way to pass a custom safe angle range to a servo. I experimented with code like this:
But the params I specify get nested under
:additional_params
like this:I followed the pattern found in https://github.com/hybridgroup/artoo-gpio/blob/master/lib/artoo/drivers/motor.rb#L14