69 posts
Posted 12 August 2014 - 11:51 PM
I would like to know if it is possible to read the contents of a deep storage unit from mfr using a computer. I have a cobble generator pumping cobble into the deep storage unit and i would like to see the amount of cobble on the computer screen. I have Open Peripherals installed if that helps. Thanks If you help.
7083 posts
Location
Tasmania (AU)
Posted 13 August 2014 - 04:03 AM
To see what - if any - functions
OpenPeripheral gives you access to, run its documentation script along with the name of the peripheral (as per the name you'd use to
wrap it):
openp/docs <name>
For specific info on given functions, follow that up with:
openp/docs <name> <functionname>
Note that whether or not OpenPeripheral supports your block may depend on both the version of OpenPeripheral and the version of the mod that block comes from. For older OpenPeripheral builds, you may need to install the documentation script manually (see the
OpenPeripheral thread for info on this).
For further info on wrapping and using peripherals, take a read through
this tutorial.
69 posts
Posted 13 September 2014 - 08:58 PM
thanks but it returns with nothing it just goes to the next line
7083 posts
Location
Tasmania (AU)
Posted 14 September 2014 - 02:46 AM
Where the "it" that does the returning is…?
112 posts
Posted 15 September 2014 - 08:59 AM
For what i tested so far is that the Deep Storage Unit does not count it's main-content as a slot, like f.e. a chest does. You only may interrogate with the input and output slots of the DSU. The main content is not accessible with a computer.
You'll have to count the items, going into the DSU at the input slot, manually with OpenPeripheral or CCSensors, and write the content to a file.
Maybe newer versions of OP or MFR will support the DSU.
Edited on 15 September 2014 - 07:02 AM
112 posts
Posted 15 September 2014 - 05:23 PM
Idea for that:
Put a chest adjacent to the dsu and the computer adjacent to the chest. Use the chest as a buffer and check it with openperipheral for full stacks of cobbelstone. Everytime a stack is full with 64 items, use the method "pushIntoSlot" to push the stack into the dsu. Easy you will count the stacks you pushed and then you'll receive the content of the dsu. Write the content to a file to read it when game is loaded.
Write a inputmethod into your code where you can enter the amount of items that you take out of your dsu.
Use a new dsu and pump the contend of the old dsu through bildcraft pipes into the chest.
69 posts
Posted 18 September 2014 - 01:31 AM
ok im bad at writing code so could someone write some code that's easy to understand?