Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = peripheral.wrap("back")
- m = peripheral.wrap("right")
- x, y = m.getSize()
- m.clear()
- m.setBackgroundColor(colors.black)
- for bg1 = 1,x,1 do
- for bg2 = 1,y,1 do
- m.setCursorPos(bg1,bg2)
- m.write(" ")
- end
- end
- for count=2,25,1 do
- m.setCursorPos(1,count)
- m.setBackgroundColor(colors.white)
- m.setTextColor(colors.black)
- if count/2 == math.floor(count/2) then
- m.setTextColor(colors.white)
- m.setBackgroundColor(colors.lightGray)
- end
- --if count == 2 or count == 4 then
- m.write(" ")
- end
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- if xPos < 4 and yPos <= 25 and yPos > 1 and side == "right" then
- n.setPitch(yPos-1)
- n.triggerNote()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement