Advertisement
realrivals

Radio

Jun 22nd, 2014
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. local modem = peripheral.wrap("back")
  2. modem.open(14112)
  3. local r = true
  4. while r do
  5.     local event, modemSide, senderChannel, replyChannel, message , senderDistance = os.pullEvent("modem_message")
  6.     term.clear()
  7.     term.setCursorPos(1, 1)
  8.     volume = message
  9.         if volume=="e" then
  10.             r= false
  11.         else
  12.             volume = tonumber(volume)
  13.             redstone.setAnalogOutput("right", volume)
  14.             sleep(1)
  15.         end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement