Advertisement
Guest User

Pressure

a guest
Apr 7th, 2020
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.20 KB | None | 0 0
  1. p = peripheral.wrap("back")
  2. while true do
  3.    x = p.getPressure()
  4.    print(x)
  5.    if x > 3 then
  6.       rs.setOutput("right", true)
  7.    else
  8.       rs.setOutput("right", false)
  9.    end
  10.    sleep(5)  
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement