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

Open Peripheral Tank Reading

Started by rawritsdan, 23 August 2013 - 10:00 AM
rawritsdan #1
Posted 23 August 2013 - 12:00 PM
Hi guys, wondering if it is possible to read tank data using a wired modem? I can use this

local tableInfo = valve.getTanks("unknown")
to get get data from a tank on a computers side, but when calling over a wired modem I get errors. Using the tank name(tank_0) gives me: Expected string, where as (unknown) gives me nil. What could I do to get this data? Or will I have to ait until 1.6.2 for it to be fixed?
Thanks, Dan :)/>
theoriginalbit #2
Posted 23 August 2013 - 12:04 PM
Ok you have the wrong idea here, you still need to do

local tableInfo = valve.getTanks("unknown")
The spot that you need to change is where the tank is wrapped into the valve variable. You need to change the wrap from what is currently a side, to the peripheral name… So you would have something like this

local valve = peripheral.wrap("left")
it needs to become

local valve = peripheral.wrap("tank_0")
rawritsdan #3
Posted 25 August 2013 - 09:17 AM
Changed my code, Running it after this update. Let you know if I have it working, 'Tank' you for the help :D/>
Pjevser #4
Posted 04 September 2013 - 12:13 PM
Did you find out how to make it work with wired modem? I'm new to CC and would love to get your code if possible to read from a iron/steel tank :)/>