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

Getting reading from MFSU tekkit 3.1.2

Started by Randall, 28 November 2012 - 12:04 PM
Randall #1
Posted 28 November 2012 - 01:04 PM
Hey guys I am sorry I looked all over the place, and if I missed it I am sorry.

I am trying to get a readout from mfsu form ccsensors. I have like 20 MFSU's and trying to get a reading from all of them and display them on a lage computer monitor.

I read about this program
total_max_storage = 0
total_curr_storage = 0
local maxStorage = {}
local currStorage = {}

Targets = sensors.getAvailableTargetsforProbe("right",dataSensor,dataProbe)
for i = 1, #Targets do
dataReadings = sensors.getSensorReadingAsDict("right",dataSensor,Targets,dataProbe)
table.insert(maxStorage, tonumber(dataReadings.maxStorage))
table.insert(currStorage, tonumber(dataReadings.energy))
table.insert(tier, tonumber(dataReadings.tier))
end
cp(1, 1, 1)
for i = 1, #maxStorage do
total_max_storage = total_max_storage + maxStorage
end
for i = 1, #currStorage do
total_curr_storage = total_curr_storage + currStorage
end

But I get the error sensors:106: No such method getAvailableTargets

Is there a way to do this on a older version of computercraft? I really would love some help and appreciated any advice.

Thank you
remiX #2
Posted 29 November 2012 - 12:54 AM
Lol, that's part of my Storage program I made. :lol:/>

Have you correctly set up the CCsensor with the Sensor, Sensor Controller and the correct Module? And the Sensor Controller needs to be on the right of the monitor.
Radioaktiv3 #3
Posted 29 November 2012 - 09:13 AM
Can you Post a Screenshot or something i want to learn this it looks cool :D/>
In the Tut section or so
thx would be nice ;D
remiX #4
Posted 29 November 2012 - 02:47 PM
I have it on my server with a friend of mine which he hosts, and it's currently off so I just rebuilt what it looks like in simple:
Spoiler

As you can see the Sensor Controller is on the right of the computer terminal with the monitor situated on the top of the computer. You can change the settings of the code to fit what you need it to be easily, just find the correct code to change.

Steps to setup the CCSensor stuff:

1) Open up the Sensor Controller and click 'new'.
2) Put a blank transmitter card into the Sensor Controller and click 'encode' and the transmitter card will now change colour.
3) Now open up the Sensor (remember that the distance that it can detect MFSU's etc is only about a 10 block radius so don't put it too far away) and put the Transmitter Card from the Sensor Controller in the far bottom left slot.
4) The slot in the Sensor to the right of the Transmitter Card is for the Module, in this case, insert a IndustrialCraft2 SensorModule inside it.

And that's it. Now open the program and it will prompt for you to select a sensor, I did this just to test it out, select it and then select "EUStorage" and you're done.

The program is here on pastebin. and also download this file which is the border and other for the monitor and needs to be in the computer's own ID folder.

For easier access just type these two things into the computer (make sure you have http enabled!):
pastebin get 1UqupYub startup
--
pastebin get vt6Mr8ZR sensorBorder.txt
JamberPilot #5
Posted 10 December 2012 - 03:15 PM
So, I did what you said to do remiX.
I copied to code in, not changed. Just dropped the file into the computer bin, after I had the sensors set up. And I get an error.
Here is the screen shot.
remiX #6
Posted 15 December 2012 - 12:39 PM
Does that happen when you select 'EUStorage' as the probe?