So, i have OCS i want to do something ilke in this video but.... i am completly lost on how to do it
I know how to retrive the capacity and amounts of the tank I want but how do I make this graph.
OpenCCSensors and Tanks
Started by crameep, Apr 05 2013 06:49 AM
4 replies to this topic
#1
Posted 05 April 2013 - 06:49 AM
#2
Posted 05 April 2013 - 09:27 AM
EDIT:
Ignore anything you might have read here before. I'd ask this particular reply removed, but it would be a waste, because I might have some help in a moment.
Ignore anything you might have read here before. I'd ask this particular reply removed, but it would be a waste, because I might have some help in a moment.
#3
Posted 05 April 2013 - 11:31 AM
You could PM Mikeemoo on these forums and ask if he has the source handy. Otherwise, it's a pretty simple matter of using the tank's capacity and amount values as well as the screen size to determine how many lines to color whatever color you choose.
#4
Posted 05 April 2013 - 03:10 PM
you have to use some weird maths and for loops, basically you do this:
-- insert term.redirect somewhere local Mx,My=term.getSize() local graph_height=math.floor(My*(liquid/max_liquid))rendering the graph itself sould be pretty easy
#5
Posted 06 April 2013 - 05:31 AM
Ideally, one should use `amount * maxY / capacity`.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











