Advertisement
Virgilcore

Pulse V2 monitor

Aug 1st, 2023 (edited)
1,249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local monitor = peripheral.wrap( "right" )
  2. local chartbl = {"*","%","@"}
  3. local colortbl = {colors.blue, colors.lightBlue, colors.cyan, colors.green, colors.lime, colors.yellow, colors.pink, colors.magenta, colors.purple, colors.blue}
  4.  
  5. local curCol, incCol, reverse, maxx, maxy = 1, 1, false, monitor.getSize()
  6.  
  7. local function advClear( c, b, t )
  8.     monitor.setBackgroundColor( b )
  9.     monitor.setTextColor( t )
  10.     write( "\n" .. c:rep( maxx ) .. "\n" .. c:rep( maxx ) )
  11. end
  12.  
  13. monitor.setCursorPos( 1, maxy )
  14.  
  15. while true do
  16.     for theChar = 1, #chartbl do
  17.         advClear( chartbl[ theChar ], colortbl[ curCol ], colortbl[ curCol + (1) ] or colortbl[ 1 ] )
  18.         sleep( 0.05 )
  19.     end
  20.     for theChar = #chartbl, 1, -1 do
  21.         advClear( chartbl[ theChar ], colortbl[ curCol + (1) ] or colortbl[ 1 ], colortbl[ curCol ]  )
  22.         sleep( 0.05 )
  23.     end
  24.     curCol = curCol + 1
  25.     if curCol == #colortbl then
  26.         curCol = 1
  27.     end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement