Posted 23 July 2013 - 06:31 PM
I've been holding this back a while, because it's by no means finished and I'm a tad nervous about my first contribution to the community, but I'm pleased to finally show you my current project…
I first got into ComputerCraft because I thought it'd be a quick way to quickly test out redstone logic on a large scale, before going to the effort of trying to mash vanilla gate designs together. I was therefore a bit sad when I found relatively little already programmed. Many people seem to have started projects, but then seemingly never gone back to them. The coding for these sorts of things was never going to be too difficult for a newbie, and so I gave it a crack.
The functions are described in the API code, but I am yet to write a getFunctions function. Sorry about that, but I ought to have that done tomorrow afternoon.
So far, my current list of functions is:
Simple
The plan from here is to finish off the analog logic, get this code tidy and documented, and then work on showcasing some of the things I've done with this API. Also, can someone give me a good use of the state cell, invert cell, etc. from RP2? I was considering coding them but came to the decision that as I have never once used them, I'd wait and see if there were any demand.
Also, can anyone advise me on how to have two different references for an API, like the redstone API has redstone. and rs.? Thanks!
I am not an experienced coder, and I've learnt a lot over this project. Therefore, if there are some poor choices made near the top of the API, please forgive me. Any advance, bug reports, or criticisms would be appreciated. i'm going to university in September to study electronic engineering, and coding is something I am really not prepared for. Any general tips would be help me a lot.
Thanks again :)/>
The RedLogic API
I first got into ComputerCraft because I thought it'd be a quick way to quickly test out redstone logic on a large scale, before going to the effort of trying to mash vanilla gate designs together. I was therefore a bit sad when I found relatively little already programmed. Many people seem to have started projects, but then seemingly never gone back to them. The coding for these sorts of things was never going to be too difficult for a newbie, and so I gave it a crack.
The functions are described in the API code, but I am yet to write a getFunctions function. Sorry about that, but I ought to have that done tomorrow afternoon.
So far, my current list of functions is:
Simple
- Gates: And, Implies, Not Implies, Or, Nand, Nor, Xor, XNor
- Full binary adder
- D Flip Flop
- D Latch
- JK Flip Flop
- RS Latch
- T Flip Flop
- Clock
- Sequencer (Not like what RedPower calls a sequencer, has variable time for each output state, and can be programmed to an infinitely long sequence)
- Monostable Circuit
- Pulse Lengthener (Takes a definite pulse as input and multiplies that pulse in the output)
- Pulse Length Detector
- Repeater (If anyone can think of a way of getting this down to zero delay, I'd be very grateful)
- Simple Delay
- Advanced Delay (Can listen to a sequence of pulses and repeats them, even if they are shorter than the delay time)
- Randomizer (Outputs to any side with variable weighting)
- Noise Generator (Outputs pulses at random intervals, between limits)
- Counter
- Multiplexer
- Synchronizer (As a Brit, it pains me to spell that with a Z, but what can a man do?)
- Wireless Send
- Wireless Receive
- Analog Add
- Analog Subtract
- Analog Not Gate
The plan from here is to finish off the analog logic, get this code tidy and documented, and then work on showcasing some of the things I've done with this API. Also, can someone give me a good use of the state cell, invert cell, etc. from RP2? I was considering coding them but came to the decision that as I have never once used them, I'd wait and see if there were any demand.
Also, can anyone advise me on how to have two different references for an API, like the redstone API has redstone. and rs.? Thanks!
I am not an experienced coder, and I've learnt a lot over this project. Therefore, if there are some poor choices made near the top of the API, please forgive me. Any advance, bug reports, or criticisms would be appreciated. i'm going to university in September to study electronic engineering, and coding is something I am really not prepared for. Any general tips would be help me a lot.
Thanks again :)/>