←  Programs

ComputerCraft | Programmable Computers for Minecraft

»

Marikc0's Programs: Base Power/tank/ma...

EnnekPL's Photo EnnekPL 27 Jan 2014

View PostReggie, on 27 January 2014 - 12:57 PM, said:

EnnekPL
This look really interesting, could you maybe put up a post on how you did this or could you send me the bit of code for the status bar at the side. The next big thing would be to implement more mods and if you rewrote the bits from the original code, you could put this program up as your own post
i think when i finish I create new thread.
Edited by EnnekPL, 27 January 2014 - 06:13 PM.
Quote

FireBall1725's Photo FireBall1725 02 Feb 2014

View PostEnnekPL, on 27 January 2014 - 05:46 PM, said:

View PostReggie, on 27 January 2014 - 12:57 PM, said:

EnnekPL
This look really interesting, could you maybe put up a post on how you did this or could you send me the bit of code for the status bar at the side. The next big thing would be to implement more mods and if you rewrote the bits from the original code, you could put this program up as your own post
i think when i finish I create new thread.

I also am interested in seeing your code when you get it completed.
Quote

thesilenton3's Photo thesilenton3 02 Feb 2014

Anyone able to explain to me how to get the tanks to show data.. wired modem is attached to valve and wired into pc and nothing seems to show? Id greatly appreciate some support on the matter
Quote

Lyqyd's Photo Lyqyd 02 Feb 2014

Update OpenPeripheral.
Quote

thesilenton3's Photo thesilenton3 03 Feb 2014

View PostLyqyd, on 02 February 2014 - 04:44 PM, said:

Update OpenPeripheral.

So this is gonna make me look like an idiot most likly but im on a ftb 1.5.2 server running unleashed, thats not owned by me.. so i cant technically update open peripheral can i? if this were my server id be running openccsensors on it lol

Anyway.. Using this program.. i was able to get the mfsu power to show.. and using another program with a computer directly on the valve of the tank with a monitor on top showed tank data.. so why wouldnt this.. i dont see the update as nesscesary just to get this program to show the tanks info since another program was able to do so.. right? btw thx for the approval and the response.. very new to the Computercraft thing and basically just trying to learn from stuff to delve into my own cc adventures at some point

EDIT - So with a lil bit of luck and a small piece of code that i found on this page here on post #22 http://www.computerc...ng/page__st__20

valve = peripheral.wrap("back")
for k,v in pairs(valve) do print(k) end

i had to take lyqyds advice and stopped the program from auto updating by removing lines 66-68 in the main program(not the api)
(Changed From)
-- Load API ---
if fs.exists("marik") then shell.run("rm marik") end
print("Updating API...")
shell.run("pastebin get Th8tne6p marik")
os.loadAPI("marik")
---------------
(Changed To)
-- Load API ---
os.loadAPI("marik")
---------------

I noticed that the code written in the program here used getTanksInfo on line 60 of the api labeled marik which (the reason im unsure of.. maybe marik used a newer/older version?)
to try and pull the into from the tank..

running the code snippet i shared in the lua live thing with the periperhal(tank) behind the advanced computer showed me i guess whats called methods right? correct me if im wrong plz, learning here.. which didnt return getTanksInfo but listed getTanks so i changed the program over to getTanks while also changing line 160 of the program as follows

(Noticing that when i placed the wired modem onto the valve and turning on the modem that is said sumthing dif i Changed From)
if string.find(machines[i], "rcirontankvalvetile")
(Changed To)
if string.find(machines[i], "iron_tank_valve")

And low and behold 4 days later ive got it working :D that lil snippet of code will come is handy as i had no idea how to display each periphs methods(or w/e) which i can use on other periphs the same way to read the info
this has been driving me nuts trying to figure this out and it was super simple lol

Edit 2 - Now i need to figure out how to define ic2 machines.. when i place a wired modem on a compressor or macerator or other ic2 machines the modem says machine_block.. the only one i can manage to get to show on the monitor is the electric furnace because its labeled electric_furnace.. idk why the others wont show yet -.-
Edited by thesilenton3, 04 February 2014 - 06:16 PM.
Quote

blackarchan's Photo blackarchan 08 Feb 2014

View PostFireBall1725, on 02 February 2014 - 12:51 PM, said:

View PostEnnekPL, on 27 January 2014 - 05:46 PM, said:

View PostReggie, on 27 January 2014 - 12:57 PM, said:

EnnekPL
This look really interesting, could you maybe put up a post on how you did this or could you send me the bit of code for the status bar at the side. The next big thing would be to implement more mods and if you rewrote the bits from the original code, you could put this program up as your own post
i think when i finish I create new thread.

I also am interested in seeing your code when you get it completed.

Can i also have a pm with the code pls??
Quote

MaGe's Photo MaGe 11 Feb 2014

Yea, EnnekPL, this looks really interesting and exactly what i'm looking for, for monitoring my base.

Any update on the coding maybe?
Quote

apoc123's Photo apoc123 12 Feb 2014

hes an awesome coder im have the code but its for openperipherals build#112 i have newest version so there are issues because of changes to methods ive tried to fix it but sadly im a noob at lua.
Quote

MrEmielH's Photo MrEmielH 17 Feb 2014

i cluld use that piece of code to, can you please send it? maybe i can fix the problems due to the update
Quote

apoc123's Photo apoc123 18 Feb 2014

Im waiting for ennekPl to answer he has stated he was going to start a new post so.. But if he dosnt come back i will publicly post the code and of course credit marik and ennekPL

I wont wait to long lol but he did do the work and its an awesome program it worked perfectly for build 112 openp but the new update changed a few methods l

Edited by apoc123, 18 February 2014 - 12:39 AM.
Quote

MrEmielH's Photo MrEmielH 18 Feb 2014

View Postapoc123, on 18 February 2014 - 12:36 AM, said:

Im waiting for ennekPl to answer he has stated he was going to start a new post so.. But if he dosnt come back i will publicly post the code and of course credit marik and ennekPL

I wont wait to long lol but he did do the work and its an awesome program it worked perfectly for build 112 openp but the new update changed a few methods l
ok, thanks, how long do you think its gonna take?
Quote

MrEmielH's Photo MrEmielH 18 Feb 2014

I have found the code and i was able to fix it (not the version with terminal glasses, i realy dont know how the work and they mess everything up)
Quote

apoc123's Photo apoc123 20 Feb 2014

mrEmieIH i sent you a pm
Quote

JoeNoIce's Photo JoeNoIce 21 Feb 2014

i keep getting an error at line 52 with the program
Quote

apoc123's Photo apoc123 21 Feb 2014

have to be more detailed 10xephos01 what ftb version what openperipheral if using what type of error specifically
Quote

JoeNoIce's Photo JoeNoIce 22 Feb 2014

i am using Wired's Server client with OpenPeripherals 0.2.1
Quote

apoc123's Photo apoc123 23 Feb 2014

DEtAIL man like going to the doctor ah my midsection hurts whats wrong!! are you using the original code in the OP what is the error saying exactly. line 52 did you read and follow directions for set up more information pls
Quote

dabz80's Photo dabz80 23 Feb 2014

have some problem with original program

when i launch it, he found each peripheral exept energy storage but he stay blocked on " checking peripheral connections" and do nothing.

someone know how to fix this ?
Quote

MrEmielH's Photo MrEmielH 27 Feb 2014

i fixed a lot of the bugs,
have a try: http://pastebin.com/kqPBeucx
Quote

Tomcat94's Photo Tomcat94 28 Feb 2014

View PostMrEmielH, on 27 February 2014 - 09:12 PM, said:

i fixed a lot of the bugs,
have a try: http://pastebin.com/kqPBeucx

I tried running this but I get an error at line 79 calling nil, can we get an example of a setup?
Quote