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

Night/Day Sensor help

Started by Dr_Epicfruit, 12 July 2012 - 01:43 AM
Dr_Epicfruit #1
Posted 12 July 2012 - 03:43 AM
I play tekkit, and since my quarry can't operate at day because it runs off of solar power, I have a splitter cable to allow some saved energy to go to the quarry if i flick a switch. However, I want to use a computer to turn it on manually at night. I tested with Lamps, but two problems occur. Either the lamp will turn on and not turn off, or the program will stop with the message: "Too long with out yielding." Any ideas?
Pinkishu #2
Posted 12 July 2012 - 09:08 AM
Too long without yielding means you're doing it wrong (usually while loops with no sleeps and such), how does that program look?

For simple day/night setting an alarm using os.setAlarm and waiting for it with pullEvent would probably be best
xuma202 #3
Posted 12 July 2012 - 10:20 AM
Yes. But keep in mind that IC2 Solar Cells also not operate if it's raining. If you also want to power the querry when it's raining you'll have to use a mechanism to detect rain or a mod (ccSensors) since CC computers can't serve the needed information.
Lyqyd #4
Posted 12 July 2012 - 06:13 PM
Doesn't tekkit include RedPower? Why not use the light detector?