Jump to content




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

peripheral java lua

454 replies to this topic

#41 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 21 March 2012 - 09:31 AM

Build 10 for 1.1 doesnt work for me
And i accidently deleted all the previous working versions i had
Spoiler


#42 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 21 March 2012 - 11:00 AM

 FuzzyPurp, on 21 March 2012 - 09:31 AM, said:

Build 10 for 1.1 doesnt work for me
And i accidently deleted all the previous working versions i had

i re-uploaded the file - try to re-download
not sure why you have this error - might be a spill between mc1.2.3

oh, and i'll keep latest stable version download link from now on.

#43 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 21 March 2012 - 09:51 PM

Works fine now with build 11 :(/>

#44 crimsonknight3

  • Members
  • 39 posts

Posted 23 March 2012 - 01:44 PM

Does the sensor update in realtime? for example i want to run this on a monitor to keep an eye of my energy generation levels and dont want to have to go to the computer to get a fresh reading every time?

[edit] Okay it worked great first time however the console program fails now. It is definately set up properly as it worked first time, but now i cant get any readings on the console program. It can find my sensor fine and i set it to EU reading however every time i press get reading, it just does the reactor readings not the EU. Its stuck on reactor and i cant figure out why Edit that. I just went through all the sensor reading types and setting it to reactor, reactor content, and target info and all of those work (well they show the correct things) but on EU reading i get. Heat nil Maxheat nil Chambers nil. nothing about the mfe

#45 Dreamlash

  • New Members
  • 12 posts

Posted 23 March 2012 - 01:56 PM

 crimsonknight3, on 23 March 2012 - 01:44 PM, said:

Does the sensor update in realtime? for example i want to run this on a monitor to keep an eye of my energy generation levels and dont want to have to go to the computer to get a fresh reading every time?

The ony way I see how, is the console program result are conected to a monitor, I come here for ask about is someone can edit this program for make it compatible with a monitor. I was doing some edits... with no results, I don´t know much about the language yet.

#46 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 23 March 2012 - 10:38 PM

Fairly simple.
monitor = peripheral.wrap("side")
term.redirect(monitor)

Fuck it, i'll make another monitor program for console, or use one of the many ccSensors/monitor
programs i made before monitors or sensors was released.

#47 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 23 March 2012 - 11:08 PM

 crimsonknight3, on 23 March 2012 - 01:44 PM, said:

Does the sensor update in realtime? for example i want to run this on a monitor to keep an eye of my energy generation levels and dont want to have to go to the computer to get a fresh reading every time?

[edit] Okay it worked great first time however the console program fails now. It is definately set up properly as it worked first time, but now i cant get any readings on the console program. It can find my sensor fine and i set it to EU reading however every time i press get reading, it just does the reactor readings not the EU. Its stuck on reactor and i cant figure out why Edit that. I just went through all the sensor reading types and setting it to reactor, reactor content, and target info and all of those work (well they show the correct things) but on EU reading i get. Heat nil Maxheat nil Chambers nil. nothing about the mfe


check that you have the latest console program, (to get actual EU readings instead of reactor)


i started to work on adding monitor support to the console program- but it's not ready yet..

in order for the readings to be automatically refreshed, you need to call the getreading function inside a loop.

since you cannot use interactive programs with the monitor (as far as i know) i'm adding another option to the console program to display an auto refreshed dashboard on the big monitor - if attached.

#48 dark

  • New Members
  • 15 posts

Posted 24 March 2012 - 01:38 PM

can i have a copy of your source code i want to take a shot at porting it to smp to use on my server.

#49 crimsonknight3

  • Members
  • 39 posts

Posted 24 March 2012 - 03:57 PM

I will stick to using the sensor until console is updated :(/> I was trying to do exactly what the other guy said, wanted it to update in real time displayed on a monitor :)/>

#50 6677

  • Members
  • 197 posts
  • LocationCambridgeshire, England

Posted 24 March 2012 - 05:24 PM

 crimsonknight3, on 24 March 2012 - 03:57 PM, said:

I will stick to using the sensor until console is updated :(/> I was trying to do exactly what the other guy said, wanted it to update in real time displayed on a monitor :)/>

while true do
    shell.run("monitor","right","console")
end


#51 crimsonknight3

  • Members
  • 39 posts

Posted 24 March 2012 - 08:05 PM

 6677, on 24 March 2012 - 05:24 PM, said:

 crimsonknight3, on 24 March 2012 - 03:57 PM, said:

I will stick to using the sensor until console is updated :(/> I was trying to do exactly what the other guy said, wanted it to update in real time displayed on a monitor :)/>

while true do
	shell.run("monitor","right","console")
end

but need it run real time plus at the moment console isn't working on my terminal. Going to try and figure it out now

#52 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 24 March 2012 - 09:00 PM

On the sensor itself make sure the reading in the gui is set to what you actually are trying to read.

#53 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 25 March 2012 - 01:21 PM

you can also select which reading you want from the sensor..

sensors.setActiveReading(side,sensor,rtype)

sensor - sensor name
rtype - reading type id - array index  of the result of this:  sensors.getAvailableReadings(side,sensor)



http://imgur.com/a/XW2A6#0

#54 yx33a

  • New Members
  • 8 posts

Posted 25 March 2012 - 06:40 PM

Man, talk about a GODSEND addon! I could really use this. Might even be able to take out a mod or two with this installed.
In fact, I can.

I can't wait for EE support(I'm trying to set up a dark matter factory. One of these days).

#55 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 26 March 2012 - 09:39 AM

 dark, on 24 March 2012 - 01:38 PM, said:

can i have a copy of your source code i want to take a shot at porting it to smp to use on my server.

if i see i can't find the time to complete SMP support in 1-2 weeks, i think i'll publish the source or at least parts of it -for whoever is willing and able to do so.. :o/>

#56 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 26 March 2012 - 09:48 AM

i decided to push forward the 2nd API option
this option is for other modders who wants to add sensor support to their machines/blocks.

just need to implement this interface in the TileEntity you want to retrieve values from.. (like an embedded sensor)
i leave to the modders' imagination the choice of how to enable this behavior (either allow by default, or require a special condition to enable the embedded sensor feature. (redsont signal, energy, extension card...etc....)

This can be used in conjunction with a new sensorModule : SensorModule_Embedded <-- an expensive generic sensorModule card.

any ISensorable block/entity within range of the sensor will be considered as a valid sensor target, and the appropriate methods will be called to retrieve information.




Interface code:
Spoiler


#57 dark

  • New Members
  • 15 posts

Posted 26 March 2012 - 03:25 PM

 yoskaz01, on 26 March 2012 - 09:39 AM, said:

 dark, on 24 March 2012 - 01:38 PM, said:

can i have a copy of your source code i want to take a shot at porting it to smp to use on my server.

if i see i can't find the time to complete SMP support in 1-2 weeks, i think i'll publish the source or at least parts of it -for whoever is willing and able to do so.. :o/>
cool in the mean time guess i'll go back to working on my own mods, not sure why i keep trying to port other peoples mods to smp anyways.

#58 Narathena

  • Members
  • 4 posts

Posted 27 March 2012 - 06:35 AM

Ok After a lot of trial and error I ended up with the following code for turning on and off lights. I know a little about programming and lua is new to me.

Spoiler

Yes I know it needs work (if you can see a way to clean it up please show me) I would like to use one sensor for multiple readings however I can't figure out how to do that. Also how you access sensors without knowing the sensor name as you did in the console program?

*edit

Will you be adding a creatures sensor at some point? ie type, distance, etc?

#59 musznik

  • Members
  • 8 posts

Posted 27 March 2012 - 03:44 PM

maybe its time to release src? - smp cannot waitforever!

#60 gigagames

  • Members
  • 55 posts

Posted 31 March 2012 - 10:18 AM

Hi,
it works whit cc 1.3.1 ^^
but i have a bug :o/>
http://img140.images.../3509/wtfqc.png -> it is confused
http://img256.images.../4672/blubr.png -> it doint check the heat why ? i need this for the heat , and this doint work -.-





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users