Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/graph")
- os.loadAPI("ocs/apis/sensor")
- mon = peripheral.wrap("right")
- values = {}
- values[0] = 100
- values[1] = 0
- function update1()
- values[0] = values[0] - 5
- return values[0]
- end
- function update2()
- values[1] = values[1] + 5
- return values[1]
- end
- updates = {update1, update2}
- graphInstance = graph.new(mon, updates, "Graph", nil, 0, 100)
- while true do
- graphInstance:draw()
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment