What’s up guys welcome back to logical redstone today we’re talking about data transfer it’s obviously a really common thing in redstone to move data from one spot to another so today i’m just going to show you some ways to make it more compact and more elegant let’s just Start with the absolute basics if you have one wire and you want to send it to another location the easiest and most straightforward way to do it is to have a single redstone line you get 15 strength which means it runs out after 15 blocks and at that point you need a Repeater which repeats it for another 15. if you want to get a little bit more strength out of it you can actually put a block at the end and then a block at the start after this repeater again and you’ll get two extra blocks of length Out of it and if you’re sending multiple signals at once where you might have any pattern come in at any time you can just put the lines next to each other as long as they have a block of space in between because the redstone would interfere otherwise but if you really hate that Block of space and for example you want it to be four wide for four lines then you can actually stagger them having two of them on the ground and two of them one up from each other and then blocking off the interference using these blocks So when we do that we can still have four individual lines all sending signal but the input is staggered like this and it’s much closer together and the output looks the exact same way but if that’s still not good enough what you can do is actually use rails because Rails don’t interfere with each other the only problem is you get a signal on the rising edge and the falling edge of your signal which means that you get a signal when you turn it on and when you turn it off and that’s of course because we’re detecting it with an observer and An observer detects a state change and that goes for on to off or off to on okay so four lines is really easy but what if we have a ton of lines how do we make this more compact and more elegant so one way that i’ve actually showed you Already in a previous video is to encode the information and then decode it back out that way if we have seven lines here we can actually encode it into a three-digit code and then that code can get decoded back out into its corresponding lamp out of the seven so If we go one two three and we activate the third lamp it travels across on just three lines and then comes back out on the third lamp so that’s pretty cool you can actually take this a step further as long as you only want one lamp to be on At a time obviously if you have multiple different lights coming in with all different types of codes these are your best options but if you’re only worried about one lamp at a time then what we can do is actually use signal strength so how does this circuit work well we’re Taking 15 different inputs and actually transmitting it just over a three wide pattern that’s fairly simple and fast and then we’re getting the output over here so if we do the one two three four fifth lamp from the end we get the fifth lamp from the end over here the way that It does this is first by getting a signal strength based on these levers so if we flip this lever for example we’re going to get a 7 read by this comparator but if we flip this lever we’re going to get a 12 read by this comparator so each Of these levers corresponds to a certain signal strength anywhere from 1 to 15. after that comparator reads its data it does something very specific it outputs a signal which has the length of that number so notice right now we have four selected and so we’re going to go out 1 2 3 4 and then the signal is dead so what happens is the very last repeater that gets activated in this giant line is going to be the last signal that gets a full strength signal on the other side then when it starts decaying it goes all The way over to here and it perfectly lines up so that this next comparator also reads a four just like that guy then it just repeats the exact same process just mirrored so now this comparator goes out one two three four reaches this repeater which means that Now the strength is going to start dying from here 15 14 13 12 all the way down to four and this last circuit here might seem a little bit complicated but it’s not it’s just the way that we’re actually reading this digit instead of having a pulse that’s equal to the Length of the number we actually want a specific lamp to resemble that number so instead of just getting a signal that’s four long here we actually want four to show the fourth length so since four is coming in here this device gives one two three the fourth lamp and this is just Called a red coder i’m not going to go into the high level details of it right now but i promise it’s really simple i’ll give a link in the description for how it works but basically this is a really fast way to transmit any of 15 signals over a long distance we can Literally take any of these lamps which will all equal different amounts of signal strength it will travel along and get decoded out by the red coder also i just remembered i had carpet mod so let me show you this in slow motion we flip this lever we get a signal of 10 It goes out 10 this should be the last 15 this gives 10 out to 10 15 10 and finally decoded by the red coder into the 10th lamp obviously there’s tons of different ways to send data in minecraft these are not all the different ways but i think these Are the most important and they’ll hopefully be useful but there is one other type of transmission that is fundamentally different from these and i want to go over it because it’s really cool and really useful so what if instead of using separate lines for each signal we just used one line over and Over again but really fast and this is the idea of serial data transmission so we’re going to send a stream of information over one line sequentially serial data transmission involves two parts we have a transmitter and a receiver the transmitter is for inputting your data just like the left Side of those uh circuits over there and when we press this button it’s gonna send it over to the receiver and the receiver is going to receive this information in other words whatever lamps you put into here those same lamps will be on in the receiving lamps this Transmitter sends data at a speed of two ticks per bit which means that every single two ticks this line is going to either send a one or a zero aka on or off so for example if we have one zero one zero then what we want to happen is This line to be on for two ticks off for two ticks and then on for two ticks and then off for ten ticks so when we press this button it’s going to send the data and here’s what’s gonna happen this button generates a two tick pulse and a Two tick pulse is connected to all these torches and of course these torches when they’re depowered they unlock our data to be sent through and since it was only a two tick pulse being generated all of our data is just going to be sent out at two ticks Then after it’s sent out because there’s a bunch of two tick repeaters in between each bit our code no matter what it is is going to gradually shift over at a speed of again two ticks per bit so whatever our code is it’s going to shift To the right and it will be outputted by our final redstone dust here so let’s press this button and watch it but i’m going to turn the tick grate down let’s do about maybe a tick rate of three so we’re going to press this it’s going to unlock all these and we get On off on and that is exactly what we want because that’s the code that we inputted you can also think about it as it reading the code from right to left because that’s literally what it’s doing it’s reading one then zero then one and then all these zeros now the receiver is A way for us to take that information and basically just freeze it take the code that has been sent along this line put it into a bunch of repeaters that are separate from each other and freeze it and the way that we freeze it in minecraft is by powering a repeater into The side of the repeater which locks its state in place so if any of these repeaters are powered when they are locked they will stay powered so when our code comes across and let’s say it’s powering this one and this one when all these lock we will only see This one and this one have retained their power but here’s the question how do we know when to save these repeaters and the first thought is okay well why don’t we just compare it to the first bit because obviously if you send us a code in you can just look at the first Bit and then maybe wait a bit and then save it and that’s true but here’s the problem uh there’s two problems actually the first problem is what if we’re sending all zeros i mean i know it sounds dumb why would you ever send all zeros but Like it’s still a code that you might want to send and so that just doesn’t work it’ll never save uh the second problem is what if the first bit is like way late like the first bit could be up front or it could be all the way back here which Means that the first bit of your code is going to come in at wildly different times it’s not synchronized at all so you’re going to get different answers based on like which was the first bit so the answer is to add another bit out front which comes in before your code And this bit always always always gets sent it’s called the signal bit and it’s very special okay it doesn’t have a lever it just has a torch like that’s it’s always on so now what’s going to happen is when we send this code the signal bit goes first and the signal Bit comes in it comes along on this line and waits a certain amount of time for saving the repeaters so in other words the signal bit comes in and tells the receiver hey wait this amount of time before saving because uh after this amount of time we’re gonna have a code here And this just works perfectly so we input our code let’s just keep it one zero one and when we press this button it gets transmitted as one zero one and it perfectly saves so now let’s watch it in a little bit of slow motion so you Can see the signal bit in action let’s set the tick rate down to three and press this button again so the first thing that comes is our signal bit and it’s being sent on this long pause and in the meantime our regular code is shifting through these repeaters Now when the signal bit finally gets done and says okay time to save we save it at the perfect amount of time so using the signal bit method is amazing because you can literally just adjust the amount of timing and when you adjust the amount of timing you can send As many bits as you want if you wanted this to be a 4-bit transmitter instead of 8-bit you would just make this half as big and you would probably just do something like that but i think that’s pretty much all i’ve got to say about serial data transmission uh there’s Plenty more examples online i’ll link some resources in the description as well and if you have any questions you can just join my discord you can also download the world in the description and play around with it for yourself but that’s pretty much all i got i hope you Enjoyed i hope you learned something i’ll see you next time peace out Um Video Information
This video, titled ‘Data Transfer | Logical Redstone #5’, was uploaded by mattbatwings on 2021-11-08 05:43:26. It has garnered 88458 views and 4299 likes. The duration of the video is 00:11:18 or 678 seconds.
!!! Check out the NEW AND IMPROVED logical redstone series here! https://youtube.com/playlist?list=PL5LiOvrbVo8keeEWRZVaHfprU4zQTCsV4 !!!
In this episode, I go over transmitting data, and showcase a fast serial transmitter design.
Patreon: https://www.patreon.com/mattbatwings Discord: https://discord.gg/V5KFaF63mV My socials: https://linktr.ee/mattbatwings My texture pack: https://github.com/Xyverle/MattPack World Download: (JAVA 1.16.5) https://www.planetminecraft.com/project/data-transfer-from-tutorial-video/
Redcoder: https://youtu.be/ct2zp1RRRcU More serial designs: https://youtu.be/IpF3Su9twvI
————————-
Want to get more involved in the logical redstone community? Learn Logical Redstone! https://youtube.com/playlist?list=PL5LiOvrbVo8keeEWRZVaHfprU4zQTCsV4 Open Redstone Engineers (ORE): https://openredstone.org/
0:00 Welcome to Episode 5! 0:12 Basics of data transfer 2:29 Regular data transfer 5:19 Serial data transfer 11:05 Subscribe!
Music: https://youtu.be/mWebB6zby6Y