this is my first time i've been messing around with computercraft and touchscreen control. i found it really cool.
i'm creating a program which allows me to automatically turn on/off flux compressors by reading the pressure on a "pressure tube". however, i've encountered a problem: i can't get the monitor to update . In other terms i want the program to get every 2 seconds ( for example ) the amount of pressure and consider turning on/ off the generators. i want also see on the monitor the current pressure. i've tried using a " while true do " loop but i can't get it working because of a computer crash ( i mean that the advanced computer suddenly shut down ). in case of "high pressure" i want also a " restart button " which allows me to repeat the measure and eventually turn on the generators . i post the pastebin code of the program : http://pastebin.com/0MyVLQ9G. i use dw20's button api ( pastebin code of the button api : pastebin.com/99rFvRgE )
sorry for my bad english :unsure:/>
ps. i would like also having a vertical bar showing me the amount of pressure and a red horizontal line indicating the threshold.
thanks a lot :D/>