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

Chicken farm

Started by shiva_chirr, 19 October 2016 - 02:17 AM
shiva_chirr #1
Posted 19 October 2016 - 04:17 AM
so im trying to get things setup for computer craft to read how many chickens are there and when to kill them. now i know what i want. but my issue is its been so long since i messed with lua and im basically a noob at it only able to do the basics that ive pretty much forgotten everything i learned. so im looking for help here at least to get me started with a basic program that i can expand and improve to help me relearn lua. now i have both openccsensors, and openperiperal installed to use. i also have project red installed for better redstone control. now im doing this because if i dont keep an eye on my farm it will eventually lag the game to death from how many chickens

so what i want is the following

1. uses a sensor to count how man chickens are there and out put the count to a monitor
2. emits a redstone single so i can have a setup to stop the dispenser auto shooting eggs
3. and maybe a way so after a few mc days all the chickens grew up it auto kills them using some method of killing them
Lupus590 #2
Posted 19 October 2016 - 08:55 AM
Break down your problem, work on creating a program which can activate a redstone signal when the user presses a key (You don't have to link it up to your dispenser).

Next learn how to use your sensor, open the lua program and have a play around with the peripheral, see if you can find some documentation for it (some mods have built in documentation - look for a docs folder).

Combine your new knowledge of the sensor into your original program which ran off user input, replace the user input with reading the sensor.

The wiki should be able to help too:
http://www.computerc...i/Category:APIs
http://www.computerc...ent#Event_types
http://www.computerc...ory:Peripherals
Edited on 19 October 2016 - 06:56 AM