Sha256: 2668b37664b77ac021b5e24aefa0d0fa21299acae3ac9d8bc672c05ee3a4c488

Contents?: true

Size: 407 Bytes

Versions: 2

Compression:

Stored size: 407 Bytes

Contents

#
# This is an example of how to use the button class
# You must register helpers and have the main thread
# sleep or in someway keep running or your program
# will exit before any callbacks can be called
#

require File.expand_path('../../lib/dino', __FILE__)

board = Dino::Board.new(Dino::TxRx.new)
servo = Dino::Components::Servo.new(pin: 9, board: board)

loop do
  servo.position += 9
  sleep 0.5
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dino-0.9.1 examples/servo.rb
dino-0.9 examples/servo.rb