Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Get the monitor on the left
- local monitor = peripheral.wrap("left")
- -- Redirect terminal output to monitor
- term.redirect(monitor)
- -- Clear and set text color
- term.setTextColor(colors.white)
- -- Set how long each color stays (in seconds)
- local delay = 1 -- Changed to 1 second
- -- Flash loop
- while true do
- -- Blue screen
- term.setBackgroundColor(colors.blue)
- term.clear()
- term.setCursorPos(1, 1)
- print("Blue")
- sleep(delay)
- -- Red screen
- term.setBackgroundColor(colors.red)
- term.clear()
- term.setCursorPos(1, 1)
- print("Red")
- sleep(delay)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement