From 95a126953b40aae954b28936a543fefd6ee757d8 Mon Sep 17 00:00:00 2001 From: RubyOn Date: Mon, 21 Apr 2025 10:30:58 +0900 Subject: [PATCH] =?UTF-8?q?on=5Foff=20=EC=A3=BC=EC=86=8C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- on_off.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/on_off.rb b/on_off.rb index 032e304..9dcf8e8 100644 --- a/on_off.rb +++ b/on_off.rb @@ -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