Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("back")
- presionmaxima = 3.6
- hola = true
- monitor = peripheral.wrap("top")
- while hola == true do
- os.pullEvent("redstone")
- presionActual = p.getPressure()
- monitor.write(presionActual)
- monitor.setCursorPos(1,1)
- monitor.clear()
- if(presionActual > presionmaxima) then
- print("funciona")
- redstone.setOutput("left",true)
- else
- redstone.setOutput("left",false)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment