Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("/charts")
- comp = peripheral.wrap("right")
- monitor = peripheral.wrap("top")
- color = colors.green
- monitor.setTextScale(0.5)
- monitor.setBackgroundColor(colors.black)
- monitor.clear()
- term.redirect(monitor)
- while true do
- pressure = comp.getPressure()
- maxPressure = comp.getCriticalPressure()
- if 100*(pressure/maxPressure) >= 70 then
- color = colors.red
- else
- color = colors.green
- end
- charts.lineColor("",1,1,45,pressure,maxPressure,color,colors.white,false)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement