Jump to content




[MC 1.2.5] - [CC 1.33] ccSensors [SMP/SSP]

peripheral java lua

  • This topic is locked This topic is locked
454 replies to this topic

#141 SimpleMajority

  • Members
  • 26 posts

Posted 26 April 2012 - 08:03 PM

View Postyoskaz01, on 26 April 2012 - 02:26 PM, said:

View PostSimpleMajority, on 26 April 2012 - 05:02 AM, said:

I notice in the SMP side I can see the sensors screen ";" shortcut by default. I saw it and went %#@ YEAH, but when I went to craft it I was quickly disappointed. Now that being said I am using lua as part of a major final and I am not sure how to make the idea work. Idea is the readings are collected via ccSensor and passed via the internet to PHP and translated to the web page with Javascript. My professor said he wanted to see great things from my final and wanted me to challenge myself lol.

great, sounds like an interesting project.
i'm not sure i understood what issue you encountered, can you provide more details?

I haven't hit any issues per say. I am just starting out the project and trying to determine how the http protocol can work for me if at all. I am currently using the http-test tutorial as my base for getting the information out of minecraft and to the web. I also noticed issues inside the console program. I setup a sensor to read a MFE (with correct card installed), but the console keeps closing when I use the getReading option. Even reading the sensor directly produces no results, but I don't have the quick update that was just posted.

#142 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 27 April 2012 - 08:21 AM

View Postthesbros, on 26 April 2012 - 04:32 PM, said:

I would suggest making this your title:
[CC: 1.33][MC: 1.2.5] ccSensors
Might make people less confused.. Cause the title still says 'Cc1.3 Addon:ccSensors', when it's 1.33
P.S: If you don't know how to edit the title, goto your topic, click 'Edit', then click 'Use Full Editor', and you can change the title.

thanks, i was wondering how i can change the topic title :)/>
didn't notice i can do it in the full editor...

#143 SimpleMajority

  • Members
  • 26 posts

Posted 27 April 2012 - 09:59 AM

os.loadAPI("/rom/apis/sensors")
os.loadAPI("/rom/apis/sensorsUI")
while true do
term.clear()
term.setCursorPos(1,1)

local cmb = "chambers"
local cHeat = "heat"
local mHeat = "maxheat"
local cOut = "output"

if cmb == 1 then
  print "Chambers: [1] 2 3 4 5 6"

elseif cmb == 2 then
  print "Chambers: 1 [2] 3 4 5 6"

elseif cmb == 3 then
  print "Chambers: 1 2 [3] 4 5 6"

elseif cmb == 4 then
  print "Chambers: 1 2 3 [4] 5 6"

elseif cmb == 5 then
  print "Chambers: 1 2 3 4 [5] 6"

else
  print "Chambers: 1 2 3 4 5 [6]"
end

print ("Current Heat: "..cHeat)
print ("Maximum Heat: "..mHeat)
print ("Output (EU/t): "..cOut)
sleep(0.1)
end

So I am working on the first steps of my finals project which is the lua and I will admit that this is my second time touching it lol. I don't think a single thing is working here, but the idea is to get a numerical readout out on heat, maxheat, and output. Then using if conditionals have select the number of chambers. I can't be for sure on the if conditionals as it takes forever to get all the junk in the reactor.

Right now my literal display is as follows:
Chambers: 1 2 3 4 5 [6]
Current Heat:heat
Maximum Heat:maxheat
Output (EU/t):output

no numbers or anything shows up. On reactor shutdown there was alread 27 heat on the hull.

#144 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 27 April 2012 - 01:35 PM

where are you actually calling the api to get the readings?

you need this:
-- put your sensor name here
local sensor="Sensor";
local side = sensors.getController();
local targets = sensors.getAvailableTargetsforProbe(side,sensor,"Reactor");

local e = sensorsData.getProbe("ic2","reactor");
local reactor = sensors.getSensorReadingAsDict(side,sensor,targets[1],"Reactor")

local cmb= reactor[e.size.val]
local cout=reactor[e.energy.val]
local cHeat=reactor[e.heat.val]
local mHeat=reactor[e.size.val]*1000+10000

check out /ccSensors/dash_reactor

Also, you don't have to use the sensorsData api - you can just use reactor.heat, reactor.output,reactor.size,reactor.maxheat

#145 SimpleMajority

  • Members
  • 26 posts

Posted 27 April 2012 - 07:03 PM

okay I will do that and thank you for the help

#146 cant_delete_account

  • Members
  • 484 posts

Posted 27 April 2012 - 07:19 PM

Once I get some money to host a server, I'm gonna install this on it (when it's SMP), and have a section on my website where you can make a page on it that shows your reactor status through the HTTP API :)/> So, if you're not on the server and your reactor is overheating you can jump on and stop it from blowing up, it'll also send a e-mail notification about 1-2 minutes before its gonna explode.

#147 minecrafter1134

  • New Members
  • 8 posts

Posted 28 April 2012 - 05:42 PM

I used your dash reactor program to create a program that monitors depleted isotope cells for breeder reactors. btw, 3*5 monitor is the perfect size for the dash reactor program.

#148 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 30 April 2012 - 01:34 AM

View Postminecrafter1134, on 28 April 2012 - 05:42 PM, said:

I used your dash reactor program to create a program that monitors depleted isotope cells for breeder reactors. btw, 3*5 monitor is the perfect size for the dash reactor program.

great :)/>
let me know if while creating your program you needed a feature that is currently not there.

meaning, would you like to see any new feature/functionality that could make your program better/easier?

#149 MrGraphic

  • Members
  • 7 posts

Posted 30 April 2012 - 04:55 PM

Hello.
Question about ccSensors and APS. Are they compatibile ? When I try to put the APS card I get "Card is disabled" message but APS is installed and working properly.
Thanks.

#150 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 01 May 2012 - 05:20 AM

View PostMrGraphic, on 30 April 2012 - 04:55 PM, said:

Hello.
Question about ccSensors and APS. Are they compatibile ? When I try to put the APS card I get "Card is disabled" message but APS is installed and working properly.
Thanks.

ill test it with aps 1.2.5 today and fix

#151 MrGraphic

  • Members
  • 7 posts

Posted 01 May 2012 - 07:04 PM

View Postyoskaz01, on 01 May 2012 - 05:20 AM, said:

View PostMrGraphic, on 30 April 2012 - 04:55 PM, said:

Hello.
Question about ccSensors and APS. Are they compatibile ? When I try to put the APS card I get "Card is disabled" message but APS is installed and working properly.
Thanks.

ill test it with aps 1.2.5 today and fix
Thanks :)/>

#152 minecrafter1134

  • New Members
  • 8 posts

Posted 01 May 2012 - 11:06 PM

View Postyoskaz01, on 30 April 2012 - 01:34 AM, said:

great :)/>
let me know if while creating your program you needed a feature that is currently not there.

meaning, would you like to see any new feature/functionality that could make your program better/easier?

there's an issue with dash_reactor that it can't measure fuel ratings under 10%, but other than that, it's fine. Equivalent exchange could use with a few more sensor details though.

#153 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 02 May 2012 - 11:47 AM

View Postyoskaz01, on 01 May 2012 - 05:20 AM, said:

View PostMrGraphic, on 30 April 2012 - 04:55 PM, said:

Hello.
Question about ccSensors and APS. Are they compatibile ? When I try to put the APS card I get "Card is disabled" message but APS is installed and working properly.
Thanks.

ill test it with aps 1.2.5 today and fix

ok, fixed.

re-download.

#154 MrGraphic

  • Members
  • 7 posts

Posted 03 May 2012 - 09:54 PM

Thanks for up but still doesn't work, still "Card is disabled" for aps.

#155 sk_2013

  • New Members
  • 5 posts

Posted 04 May 2012 - 04:49 AM

I've been attempting to run this with tekkit, but I'm getting this error.
Spoiler

:/ Rather confused, as everyone else seems to be running it just fine.
Thanks.

#156 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 04 May 2012 - 05:25 AM

The most recent tekkit version doesn't contain computercraft - Don't ask me why.

#157 theubie

  • New Members
  • 9 posts

Posted 04 May 2012 - 06:30 AM

No clue about the most recent tekkit version, but the most recent dev version of technic pack (7.0.1) doesn't have ComputerCraft because they pushed that release before the 1.2.5 compatible CC version was released. I'm moderately positive it'll be in the next technic push.

#158 musznik

  • Members
  • 8 posts

Posted 04 May 2012 - 06:54 PM

Where is my SMP version? :)/> My whole server is waiting only for ccs since 19 February 2012 bump :)/> )

#159 sk_2013

  • New Members
  • 5 posts

Posted 04 May 2012 - 09:28 PM

I know computercraft is in the new version of tekkit, but I can't find any of the associated files.


EDIT: sorry, that wasn't much use. I have been using the new version of tekkit, and computercraft is still installed and works fine, but its the older version (immediately preceding the monitors update).

EDIT2: I also realize that its mostly tekkits problem, not yours. Pretty much wondering what everyone else is doing on this.

#160 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 05 May 2012 - 01:49 AM

since i'm not really using tekkit or any other mod packs - can't help you much there.

as for SMP,
Cloudy did a really good job at adding SMP support, we just need to iron out a few more issues and then i'll release it.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users