Posted 02 February 2016 - 10:20 PM
So, currently I am having a very minor issue in my programs that are designed to pass received RedNet messages to a scrolling text display. The issue is the fact that I can only pass ONE message to the scrolling board, once it receives a message from the receiver program it will not accept any further input, is there a way to fix this?
This is the program that receives RedNet messages and passes them to bUpdater
This is the program that displays the received message from RedNet on a scrolling monitor.
This is the program that receives RedNet messages and passes them to bUpdater
Spoiler
rednet.close("top")
rednet.open("top")
print("Waiting for messages to display...")
while true do
id, message = rednet.receive()
shell.run("bUpdater "..message)
sleep(0.5)
end
This is the program that displays the received message from RedNet on a scrolling monitor.
Spoiler
monitor = peripheral.wrap("left")
monitor.clear()
monitor.setTextScale(4)
strtpos = 7
speed = 0.3
local input = {...}
wordCount = #input
i = 1
text = "-"
while i <= wordCount do
text = (text.." "..input[i])
sleep(0.1)
i = i + 1
end
pos = strtpos
poslimit = 0 - string.len(text)
while pos >= poslimit do
monitor.clear()
monitor.setCursorPos(pos, 1)
monitor.write(text)
sleep(speed)
if pos == poslimit then
pos = strtpos
else
pos = pos -1
end
end