on_off 주소 변경

This commit is contained in:
RubyOn 2025-04-21 10:30:58 +09:00
parent 30aa429c76
commit 95a126953b
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ value = ARGV[0]&.to_i
ModBus::RTUClient.new("/dev/ttyUSB0", 9600) do |cl|
cl.with_slave(7) do |slave|
regs = slave.holding_registers
regs[16] = value
regs[22] = value
sleep 0.1
end
end