Advertisement
meuced

Affich7digit_bouton

Mar 16th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. local x, y, xsize, ysize
  2. local idChannel = 126
  3. local msg = 0
  4.  
  5. term.setBackgroundColor(colors.green)
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. term.write(msg)
  9.  
  10. modem = peripheral.wrap("bottom")
  11. modem.transmit(idChannel,idChannel,msg)
  12.  
  13. while true do
  14.    
  15.     event, side, xpos, ypos = os.pullEvent("monitor_touch")
  16.    
  17.     if msg == 9 then
  18.         msg = 0
  19.     else
  20.         msg = msg + 1
  21.     end
  22.  
  23.     term.clear()
  24.     term.setCursorPos(1,1)
  25.     term.write(msg)
  26.  
  27.     modem.transmit(idChannel,idChannel,msg)
  28.  
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement