This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
SS111's profile picture

[ccSensors][IC2] Reading reactor data?

Started by SS111, 30 September 2012 - 09:20 PM
SS111 #1
Posted 30 September 2012 - 11:20 PM
Ok, so what I want to be able to do is to see if my reactor contains a depleted uranium cell. I have the auto reloader and everything setup, but I can't seem to get the readings from the reactor. Can someone point me in the right direction?
Thanks.

Code:

os.unloadAPI("sensors")
os.loadAPI("/rom/apis/sensors")
ctrl=sensors.getController()
data=sensors.getSensors(ctrl)
sensor=data[1]
data=sensors.getSensorInfo(ctrl,sensor)
sensors.setSensorRange(ctrl,sensor,"3")
data=sensors.getProbes(ctrl,sensor)
--|
--V is ReactorContent, right?
probe=data[5]
--|
--V This returns nil?
data=sensors.getAvaliabeTargetsforProbe(ctrl,sensor,probe)
--|
--V And this sould be the only target inside of it?
target=data[1]
data=sensors.getSensorReadingAsDict(ctrl,sensor,target)
--|
--V Would I do that?
--print(data)
SS111 #2
Posted 02 October 2012 - 02:46 AM
Bump? I could really use some help and ccSensors doesn't have a forum :/