The program is designed to run a single bank of 4 engines, shutting them down if the coolant levels fall below a certian level. I currently have 7 sets of engines running on 7 computers all transmiting thier data via rednet. My problem is that I am attempting to code a seperate computer outside my plant to monitor the information from all 7 computers simultaneously. The code I have been using up to this point seems to recieve the messages from 1 or 2 computers ok but bogs down after that. It seems like there are too many messages coming in at once to be processed (but I am a noob so I could be totally wrong). I am new to coding so any pointers would be great.
Here is my code so far. been testing the code on only 3 of the 7 incoming messages.
m = peripheral.wrap("top") -- monitor to view information on
rednet.open("right")
while true do
event, id, msg, dis = os.pullEvent("rednet_message")
if id == 114 then
m.setCursorPos(1,1)
m.write("Unit 1:")
m.setCursorPos(3,2)
m.clearLine()
m.write(msg)
end
if id == 115 then
m.setCursorPos(1,3)
m.write("Unit 2:")
m.setCursorPos(3,4)
m.clearLine()
m.write(msg)
end
if id == 116 then
m.setCursorPos(1,5)
m.write("Unit 3:")
m.setCursorPos(3,6)
m.clearLine()
m.write(msg)
end
sleep(0.5)
end