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

ccSensor problems, please help!

Started by Surprisedllama, 14 January 2013 - 10:03 AM
Surprisedllama #1
Posted 14 January 2013 - 11:03 AM
I recently started getting into ccSensors and trying to display EU Storage on monitors. I hooked up an MFSU to a monitor and it worked perfectly like it should but i wanted to go beyond just having one mfsu hooked up to a monitor. I wanted multiple MFSUs hooked up to monitors displaying information. I have 2 problems with doing this, first off i can not find a program that will read only the EU capacity in it and not all the other info that is displayed. I also do not know how to hook up multiple MFSUs to this program. To get a better understanding i would like the screen to look like this.



MFSU 1 - 0% MFSU 5 - 100%
MFSU 2 - 46% MFSU 6 - 93%
MFSU 3 - 32% MFSU 7 - 56%
MFSU 4 - 84% MFSU 8 - 43%


(the numbers would be on a live feed) Could someone write me a LUA script for the computer displaying data like this projected on a monitor. Much appreciated.



~Llama
Surprisedllama #2
Posted 14 January 2013 - 11:42 AM
You do not have to write me a full new program, just help me with the pattern of the program or anything to help me make this program work
theoriginalbit #3
Posted 14 January 2013 - 11:50 AM
what code have you got so far?
Surprisedllama #4
Posted 14 January 2013 - 12:01 PM
Nothing thats working yet… But if you could get me started with anything that would be wonderful because all of the tutorials online are not too great at all!
theoriginalbit #5
Posted 14 January 2013 - 12:21 PM
do you have anything at all? or just not anything in regards to the multiple MFSUs? Yeh the tutorials are pretty non existent… I've only learnt a little bit from reading code people have here… I can code more with it after I have gone through a few debugging steps first…
Edited on 14 January 2013 - 11:22 AM
Surprisedllama #6
Posted 14 January 2013 - 12:50 PM
on the programing sideI do not have anything, The only thing i have accomplished in the last couple hours was get the ccSensors to hook up to an MFSU which transfers to a computer and i can read the stats from there. I am not familiar with LUA at all! lol I have programed server permissions with YAML and other programs but i am clueless when it comes to LUA. I have tried starting a few programs and there was no luck. And what do you mean by a few debugging steps? Would you like more information on how my setup is or anything to help you?
theoriginalbit #7
Posted 14 January 2013 - 12:59 PM
ok. Yes please. Could be very handy.
Surprisedllama #8
Posted 14 January 2013 - 01:23 PM
https://www.dropbox.....14.32%20PM.zip



I put the picture in a dropbox (it was too big to put on the forms :/ but it still works)


Its a really simple setup
theoriginalbit #9
Posted 14 January 2013 - 01:36 PM
-snip-

I put the picture in a dropbox (it was too big to put on the forms :/ but it still works)

Its a really simple setup
could have used something like imgur, most people on these forums don't like downloading files incase of virus' …

now I should have said this first … as discovered here ccSensors didn't seem to work in SMP properly, so if you are going to do this in SMP it seems you will need multiple computers… are you SMP or SSP?
Surprisedllama #10
Posted 14 January 2013 - 01:40 PM
Well i wanted to build it in the server i am hosting with my friends and I, So i was thinking of building it in SMP
theoriginalbit #11
Posted 14 January 2013 - 01:45 PM
ok well test this on your SSP then quickly jump on the server, if you can, and make sure its the same output from the same setup (it may have been localised to his instance)


local control = sensors.getController()
local data = sensors.getSensors()

for _, v in pairs( data ) do
  print( v )
end
Surprisedllama #12
Posted 14 January 2013 - 01:57 PM
in SSP it says bios:206: [string "test"]:5: 'do' expected and nothing shows up on the monitor
Surprisedllama #13
Posted 14 January 2013 - 02:05 PM
do you want me to give you the servers ip and we could work on it in the server?
theoriginalbit #14
Posted 14 January 2013 - 02:14 PM
might be easier… PM it to me :)/> also what it is? Tekkit_lite? Tekkit 3.1.x?