Skip to content

Commit

Permalink
fix issue with low-level relays activating on reboot; always explicit…
Browse files Browse the repository at this point in the history
…ly set to off
  • Loading branch information
heythisisnate committed Mar 19, 2020
1 parent 06bce9a commit d52b649
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lfs/application.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ end

-- initialize actuators
for i, actuator in pairs(actuators) do
print("Heap:", node.heap(), "Initializing actuator pin:", actuator.pin)
local initialState = actuator.trigger == gpio.LOW and gpio.HIGH or gpio.LOW
print("Heap:", node.heap(), "Initializing actuator pin:", actuator.pin, "on:", actuator.trigger or gpio.HIGH, "off:", initialState)
gpio.write(actuator.pin, initialState)
gpio.mode(actuator.pin, gpio.OUTPUT)
table.insert(actuatorGet, actuator)
end
Expand Down

0 comments on commit d52b649

Please sign in to comment.