examples/light-sensor.rb in lignite-0.4.0 vs examples/light-sensor.rb in lignite-0.5.0
- old
+ new
@@ -4,17 +4,16 @@
dc = Lignite::DirectCommands.new
# see 28/31 of Comm dev kit, read light sensor value on port 3
LAYER0 = 0
MODE = 0
-count = 1
pct = dc.with_reply do
# global vars
dataf :light
# TODO: make the block optional if there are no locals. or #with_locals
block do
- input_device_ready_si(LAYER0, Lignite::PORT_3, Lignite::TYPE_KEEP, MODE, count, :light)
+ input_device_ready_si(LAYER0, Lignite::PORT_3, Lignite::TYPE_KEEP, MODE, :light)
end
end
puts "Light sensor percentage: #{pct}"
dc.close