local targets = sens.getTargets()
with these two lines:
local targets, err = sens.getTargets()
if err then print("Error: "..tostring(err)) return end
Only the sonic sensor output is needed this time.
Posted 25 February 2013 - 01:02 PM
local targets, err = sens.getTargets()
if err then print("Error: "..tostring(err)) return end
Posted 25 February 2013 - 02:35 PM
Lyqyd, on 25 February 2013 - 01:02 PM, said:
local targets, err = sens.getTargets()
if err then print("Error: "..tostring(err)) return end
Sensor found on top side. Sensor type is: openccsensors.item.sonicsensor
Edited by TheGeek, 25 February 2013 - 02:37 PM.
Posted 25 February 2013 - 04:20 PM
Posted 25 February 2013 - 04:42 PM
Lyqyd, on 25 February 2013 - 01:02 PM, said:
local targets, err = sens.getTargets()
if err then print("Error: "..tostring(err)) return end
Posted 25 February 2013 - 07:33 PM
immibis, on 25 February 2013 - 04:42 PM, said:
Lyqyd, on 25 February 2013 - 01:02 PM, said:
local targets, err = sens.getTargets()
if err then print("Error: "..tostring(err)) return end
Posted 26 February 2013 - 03:10 PM
Lyqyd, on 25 February 2013 - 04:20 PM, said:
Posted 26 February 2013 - 03:37 PM
Posted 26 February 2013 - 04:32 PM
Posted 26 February 2013 - 04:34 PM
jewelshisen, on 26 February 2013 - 04:32 PM, said:
Posted 26 February 2013 - 04:44 PM
Kye_Duo, on 26 February 2013 - 04:34 PM, said:
jewelshisen, on 26 February 2013 - 04:32 PM, said:
Posted 27 February 2013 - 06:32 AM
ihatetn931, on 26 February 2013 - 03:37 PM, said:
jewelshisen, on 26 February 2013 - 04:32 PM, said:
Posted 27 February 2013 - 07:03 AM
os.loadAPI("ocs/apis/graph")
os.loadAPI("ocs/apis/sensor")
local sensor = sensor.wrap("right")
local details = sensor.getTargetDetails("1,1,0")
function update()
return (peripheral.call("right","getTargetDetails",reactor))
end
graphInst = graph.new(peripheral.wrap("top"), update,"Temp "..details.Heat,nil,1,108000,true)
graphInst:draw()
end
Posted 27 February 2013 - 07:50 AM
Posted 27 February 2013 - 08:06 AM
os.loadAPI("ocs/apis/graph")
os.loadAPI("ocs/apis/sensor")
local mon = peripheral.wrap("top")
local reactorsensor1 = "right"
local reactor1 = "1,1,0"
local getdetails = "getTargetDetails"
function update()
local tab = (sensor.call( reactorsensor1 , getdetails , reactor1))
return tab.Stored
end
graphInst = graph.new(mon , update , "Heat " , 1 , 0 , 108000 , false)
graphInst:draw()
graph:20: attempt to compare table with numberIf needed line 20 of graph
if self.history[trace][#self.history[trace]] > self.max[trace] thenI'll have a look back to see if I can find the multi graph.
Posted 27 February 2013 - 08:34 PM
Lyqyd, on 27 February 2013 - 06:32 AM, said:
jewelshisen, on 26 February 2013 - 04:32 PM, said:
Posted 28 February 2013 - 03:35 AM
os.loadAPI("ocs/apis/sensor")
local prox = sensor.wrap("back")
local targets = prox.getTargets()
for name, details in pairs(targets) do
print("Raining: " ..details["Name"])
end
Posted 28 February 2013 - 06:27 AM
os.loadAPI("ocs/apis/graph")
os.loadAPI("ocs/apis/sensor")
local mon = peripheral.wrap("top")
local reactorsensor1 = "right"
local reactor1 = "1,1,0"
local getdetails = "getTargetDetails"
function update()
local tab = sensor.call(reactorsensor1, getdetails , reactor1)
return tab.Heat
end
graphInst = graph.new(mon , update,"Heat", nil , 1 , 10800)
graphInst:draw()
Posted 28 February 2013 - 06:39 AM
while true do graphInst:draw() sleep(0.5) end
Posted 28 February 2013 - 06:53 AM
Posted 28 February 2013 - 10:52 AM
0 members, 2 guests, 0 anonymous users