Sha256: 6b17ca6c405d95a02c50d1b9362cdcdd267d8a5562aa79f3a5634a651442f769

Contents?: true

Size: 428 Bytes

Versions: 5

Compression:

Stored size: 428 Bytes

Contents

#!/usr/bin/ruby
require "lignite"

dc = Lignite::DirectCommands.new

layer = 0
nos = Lignite::PORT_B | Lignite::PORT_C
speed = 100
step_begin = 0
step_do = 360
step_end = 0
brake = Lignite::COAST
dc.output_step_speed(layer, nos, speed,
                     step_begin, step_do, step_end, brake)
dc.output_ready(layer, nos)

speed = -100
m = Lignite::Motors.new(layer, nos, dc)
m.step_speed(speed, step_begin, step_do, step_end)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lignite-0.6.0 examples/motors.rb
lignite-0.5.0 examples/motors.rb
lignite-0.4.0 examples/motors.rb
lignite-0.3.0 examples/motors.rb
lignite-0.2.0 examples/motors.rb