protocol handler of PNS commands for PATLITE NH-FV series
See: https://www.patlite.jp/download/NH-FV-ManualT95100208-C.pdf
Add this line to your application's Gemfile:
gem 'net-pns'
And then execute:
$ bundle
Or install it yourself as:
$ gem install net-pns
require 'net/pns'
Net::PNS.new(192.168.0.10, 10000) do |patlite|
patlite.light({red: :blink1, yellow: :on, green: :blink2})
puts patlite.stat #=> [2, 1, 3, 0, 0, 0]
sleep 10
patlite.clear
puts patlite.stat #=> [0, 0, 0, 0, 0, 0]
end
patlite = Net::PNS.new(192.168.0.10)
patlite.light({buzzer: :buzz1}) #=> buzzer start
sleep 3
patlite.clear #=> buzzer stop after 3sec
patlite.close
- Fork it ( https://github.com/tdtds/net-pns/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request