Redstone Logic Gates v1 [Computercraft][9 Gates][More Planned]

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

VikeStep

New Member
Jul 29, 2019
1,117
0
0
Hello Everyone!

I have created a program that is 9 different logic gates in 1!

In this program, the computer is the gate and it acts just like the RedPower logic gates except that you can choose your outputs/inputs from all 6 sides.

Features:
  • AND, OR, NOT, NOR , NAND, XOR, XNOR, Repeater and Timer (More is planned in future versions)
  • Choose which sides are inputs/outputs
  • Timer and Repeater Delay is easy to enter
  • Optimised to be less laggy than existing RedPower Gates (especially timers)
  • PLEASE NOTE: Walking away from a computer turns it off, when you walk back in range the computer will resume what it had before
How to install it:
1. Place your computer and type: pastebin get zP73LSsm startup
2. Hold ctrl+r for 2 seconds to reboot your computer
3. Follow the instructions from there

Want to see the code before you download it? View it here

Planned Features:
Toggle Latch
Pulse Former
Multiplexer
Synchronizer
Sequencer
Counter
Comparator
Redstone Torch with toggleable sides
NOR Latch
State Cell
Null Cell
Randomizer
Transparent Latch
Invert Cell
Non-Invert Cell
Light Sensor

Pictures:
Starting Menu:
kvmyOwn.png
Choosing Inputs/Outputs:
cBnd5R7.png
AND Gate with left and front as inputs, right as output. Off
Syy5aho.png
Same gate as above but on
HRIE7rz.png

Changelog:
v1 Initial Release Comes with AND, OR, NOT, NOR , NAND, XOR, XNOR, Repeater and Timer

Other Information/FAQ:
Why should we use this instead of RedPower Logic Gates?
Firstly, some people don't use RedPower, secondly, it adds the ability to input/output from sides of your choice (including on top and bottom of the computer) and thirdly, this is every logic gate in one providing much better ease of access

Will this be any better than RedNet from MineFactory?
It will most likely not be better than it, but while we wait for 1.5 we can use this and if you want you can still use it in 1.5

Will this work with Chunkloaders?
Yes it does work very well with chunkloaders

Will i need to retype the information when the computer shuts down?
If you followed the instructions and saved this to startup it should automatically resume what you had

I have a bug?! or Can you please add this?!
Please post it in this thread or Private Message me or croswat

Why is the conditions in a 3-input XOR gate that it must have an odd number of "on" inputs?
XOR means in literal terms one or the other, but not neither nor both. However this is true for two inputs, a 3 input xor gate is the result of the first two combined with the third input. So if all inputs are on, the first two will combine to create an off value and then this result combines with the third input which is on and since both inputs differ the result is on. This pattern can be summarised to having an odd number of "on" inputs

Can I use this in my YouTube LP or on my server?
Go ahead, as long as you don't claim it as your own work and if possible, link to this page so that others can use it too

by VikeStep & croswat
 

abouttabs

New Member
Jul 29, 2019
17
0
0
Hi what will it do on server restart? I am just wondering, because I set my server to restart every 12 hours (memory). Anyway it's amazing program you are making here and some features even better than RP2, and with less hassle to make it...
 

Slidingmike

New Member
Jul 29, 2019
39
0
0
Another question, is this player detected or detected by chunk loads? If its by chunk ill definitely use it


Sent from my BlackBerry 9810 using Tapatalk
 

abouttabs

New Member
Jul 29, 2019
17
0
0
Chunkloader should behave just like player standing there right? Correct me if I am mistaken...
 

VikeStep

New Member
Jul 29, 2019
1,117
0
0
All Chunkloaders will work but the problem with a server restart is that they forget Chunkloaders are there, all you have to do is walk near them and it will start chunk loading again.
 

Jerome Asich

New Member
Jul 29, 2019
89
0
0
if you were able to make this work on startup with memory, so that after you set a gate, startup becomes that gate, it would work after a restart. I am not sure how you would go about implementing that, but if you were able to, I would be quite impressed with this program.
 

thestarlion

New Member
Jul 29, 2019
104
0
0
Given what you've got in mind, I think an option some would prefer is to make the initial script create others for each logic gate, so one can call whichever one is wanted right away.
 

abouttabs

New Member
Jul 29, 2019
17
0
0
All Chunkloaders will work but the problem with a server restart is that they forget Chunkloaders are there, all you have to do is walk near them and it will start chunk loading again.
And when I get there and i starts chunk loading do I need to restart the gate? Manually input all the data?
I am no master of comutercraft so I don't really know if anything like that is possible, but write in parameters in another file in computer/ disk rive attached and on startup read those parameters? As I said I am really impressed by your work and by the fact you took the effort and now you provide your program to us and I am not trying to seem like ungrateful idiot, I am just trying to get information from people that know more than me...

edit
Also if I put there Chunk loading turtle in the chunk with chunk loader will the chunk loader start chunk loading when the chunk loader turtle start chunk loading? And will it start chunk loading by itself? (The turtle I mean)
 

VikeStep

New Member
Jul 29, 2019
1,117
0
0
if you were able to make this work on startup with memory, so that after you set a gate, startup becomes that gate, it would work after a restart. I am not sure how you would go about implementing that, but if you were able to, I would be quite impressed with this program.
its already implemented :D
And when I get there and i starts chunk loading do I need to restart the gate? Manually input all the data?
I am no master of comutercraft so I don't really know if anything like that is possible, but write in parameters in another file in computer/ disk rive attached and on startup read those parameters? As I said I am really impressed by your work and by the fact you took the effort and now you provide your program to us and I am not trying to seem like ungrateful idiot, I am just trying to get information from people that know more than me...

edit
Also if I put there Chunk loading turtle in the chunk with chunk loader will the chunk loader start chunk loading when the chunk loader turtle start chunk loading? And will it start chunk loading by itself? (The turtle I mean)
Yeah I have made it so that on restart it will go to a file which has saved the name of the gate and run it also that last bit confuses me, sorry all i know is that all chunk loaders should work
 
  • Like
Reactions: Jerome Asich

MaryuZ

New Member
Jul 29, 2019
21
0
1
That is an amazing bit of reverse engineering right there...Using a computer to simulate logic gates which will prolly be used to build another computer of sorts....Great job thinking outside the box...kudos to you and thank you for sharing such a brilliant idea (you're actually sharing the good to go code which is even more awesome)
 

VikeStep

New Member
Jul 29, 2019
1,117
0
0
That is an amazing bit of reverse engineering right there...Using a computer to simulate logic gates which will prolly be used to build another computer of sorts....Great job thinking outside the box...kudos to you and thank you for sharing such a brilliant idea (you're actually sharing the good to go code which is even more awesome)
Thanks, I built this primarily for redstone contraptions and such but its cool to thing if its possible to make a computer out of computers. That would be cool, I am thinking of adding comparators in the next update because they aren't in 1.4.7 yet and someone might use them in the meantime
 

croswat

New Member
Jul 29, 2019
14
0
0
to clarify a few things:
  • the gate information is saved, so you only need to enter it once, and it will go off and do its job.
  • when the server resets or chunk is unloaded, the computer will stop obviously, but if the program is set to startup, it will continue as soon as the servers back up, or when the chunk is loaded again
  • it SHOULD work with a chunkloader when the server resets (this depends on if your server loads chunkloaders automatically, or if you need to be in range for it to load)
  • if you have any bugs or suggestions, post them here, or message either me or vikestep
  • this is an initial release, and we will be adding more functionality, and some cool ideas i have.
  • if you put this program on a chunkloading turtle, it will keep it running. (yes, it works on turtles and computers)
 

VikeStep

New Member
Jul 29, 2019
1,117
0
0
to clarify a few things:
  • the gate information is saved, so you only need to enter it once, and it will go off and do its job.
  • when the server resets or chunk is unloaded, the computer will stop obviously, but if the program is set to startup, it will continue as soon as the servers back up, or when the chunk is loaded again
  • it SHOULD work with a chunkloader when the server resets (this depends on if your server loads chunkloaders automatically, or if you need to be in range for it to load)
  • if you have any bugs or suggestions, post them here, or message either me or vikestep
  • this is an initial release, and we will be adding more functionality, and some cool ideas i have.
  • if you put this program on a chunkloading turtle, it will keep it running. (yes, it works on turtles and computers)

I added that stuff to the FAQ, thanks for clarifying that
 

VikeStep

New Member
Jul 29, 2019
1,117
0
0
Ok i was working on the comparator and realised that the function redstone.getAnalogInput() was added in ComputerCraft 1.5.1 so I will be unable to make it. If anyone knows any other way of reading signal strength in 1.4.7 please let me know

does anyone want a specific gate to be made next?
 

Rowlanm

New Member
Jul 29, 2019
21
0
0
Hi, I have an idea, don't even know if its possible or in what possible scenario you could use it.. would you be able to make a program that can do all the gates but push it out from a wireless receiver? or the CC equivalent of that? I guess it could then have 6 possible outputs and be controlled from a remote location
eg:
Key:
[C] - computer
[WT] - wireless transmitter
[WR] - wireless reciever
l
[C][WT] [WR]----------
l

(I cant even code and have never really looked into CC it confussles me :( )
 

VikeStep

New Member
Jul 29, 2019
1,117
0
0
Hi, I have an idea, don't even know if its possible or in what possible scenario you could use it.. would you be able to make a program that can do all the gates but push it out from a wireless receiver? or the CC equivalent of that? I guess it could then have 6 possible outputs and be controlled from a remote location
eg:
Key:
[C] - computer
[WT] - wireless transmitter
[WR] - wireless reciever
l
[C][WT] [WR]----------
l

(I cant even code and have never really looked into CC it confussles me :( )
We can look into adding Modem Support, but it will be difficult to implement rednet because of ID's
 

voidreality

New Member
Jul 29, 2019
117
0
0
We can look into adding Modem Support, but it will be difficult to implement rednet because of ID's

Ran into the same problem with my turtle mining swarm. Ended up using rednet.broadcast with the slave turtles always listening and have each message from the master with the ID encoded in it if I wanted to issue a single slave a command.
 

eningly

New Member
Jul 29, 2019
28
0
0
only 1 thing as you can do it plzz make it cliclebul its not that hard and a propper menu on start whit all the gates that will be good to and a simple menu is not that hard:p