Sha256: dbb7cada4e3cc961e5ced5f9b52ac56dbd503092c8e5d79596722eff0b5a6a42
Contents?: true
Size: 410 Bytes
Versions: 7
Compression:
Stored size: 410 Bytes
Contents
# # This is an example of how to use the servo class # require 'bundler/setup' require 'denko' board = Denko::Board.new(Denko::Connection::Serial.new) servo = Denko::Motor::Servo.new(pin: 9, board: board) # Add different angles (in degrees) to the array below to try out your servo. # Note: Some servos may not have a full 180 degree sweep. [0, 90].cycle do |angle| servo.position = angle sleep 0.5 end
Version data entries
7 entries across 7 versions & 1 rubygems