This commit is contained in:
navid.sassan 2021-04-02 16:31:36 +02:00
parent b0f5ab492a
commit 6e52b01e74

View File

@ -21,7 +21,7 @@ end
function poll()
if redstone_toggle_id ~= nil then
rednet.send(redstone_toggle_id, "get_state")
rednet.send(redstone_toggle_id, "set_state")
end
if de_store_mon_id ~= nil then
-- todo
@ -47,20 +47,25 @@ function draw_screen()
while true do
-- term.clear()
-- term.setCursorPos(0, 0)
term.setTextColor(colors.white)
term.setBackgroundColor(colors.black)
term.write('Press "R" to toggle the rainbows\n')
term.write('Rainbows state: ')
if redstone_toggle_state == true then
term.blit('On', colors.white, colors.green)
term.setBackgroundColor(colors.green)
term.write('On')
else
term.blit('Off', colors.white, colors.red)
term.setBackgroundColor(colors.red)
term.write('Off')
end
term.setBackgroundColor(colors.black)
sleep(0.5)
end
end
local sides = peripheral.getNames()
local sides = peripheral.setNames()
for i = 1, #sides do
if peripheral.getType(sides[i]) == "modem" then
if peripheral.setType(sides[i]) == "modem" then
modemSide = sides[i]
break
end