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

Send information from computer to pocketpc

Started by Quessith, 25 September 2015 - 02:15 PM
Quessith #1
Posted 25 September 2015 - 04:15 PM
I am working on a automated smeltery from tinkers construct (Smelting armor, horse armor and such)
I want to use my pocket computer to check how much is in the smeltery (So i can activate the draining)
But i got stuck on a certain part…
The draining works perfect when i send a rednet command
But as soon as i send a rednet command for the amount of liquids (Mostly iron/gold is in it)
I only receive 1 message with the gold (at least it did, i did something and its broken again)
Using this in combination with OpenCCsensors (1.7.5)

Fixed it
Code i use on the pc:
http://pastebin.com/pvpeNXWA
Code i use on the pocketpc:
http://pastebin.com/yBdk2PUm

added freezing pocketpc after drain command
made a "list" of the materials in the smeltery

Not the best code, but hey it works for me :)/>
Edited on 25 September 2015 - 09:59 PM
KingofGamesYami #2
Posted 25 September 2015 - 06:17 PM
1. Don't name your variables "table". table is an API, overwriting it is a bad idea.
2. What does line 106 of smelt print when you don't have it commented?
Lupus590 #3
Posted 25 September 2015 - 06:18 PM
Edit: Ninja'd

When sending things via rednet/modems there are two things to check, was it sent correctly and was it received correctly.

Get the sending computer to write out the message to the screen as it sends it.

Get your receiving computer to do the same when it receives the message.
Edited on 25 September 2015 - 04:19 PM
Quessith #4
Posted 25 September 2015 - 10:28 PM
Thanks for the feedback, adjusted a few things (forgot about the table API)
Need to clean up the code a little bit more (removing the comment parts that are not needed anymore)