Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Where has my logic gone wrong?

Archive: 19 posts


33745

I'll preface this by saying that I know there's likely a better way to do what I'm trying to do. But what I've set up seems like it should work, but it clearly doesn't when I try it out in game. My eventual goal is to make a row of lights that I can scroll through with the left and right buttons on the D-Pad. Nothing should happen when I'm on the leftmost light and I press left, and nothing should happen when I'm on the rightmost light and I press right. I decided to start with three lights, then expand then expand the idea once I had that smaller model working.


Here's my sort of explanation of how the gates are supposed to work. The first set of interconnected NOR gates has the top output on, the bottom output off. This will from now on be referred to as the "on" position. When an input from the right d-pad button comes, it activates the first upper AND gate because the first set of switches are on. The AND gate sends an output of 1 to the top NOR of the first row, turning that row off, and an output of 1 to the bottom NOR of the second row, turning that row on. The next time the d-pad is pressed, a similar process occurs, which turns the second gate off and turns the third gate on.

A bottom row of AND gates does a similar thing to the top set. They are wired so that the bottom left one monitors the input of the left d-pad button, and the state of the third gate. When the third gate is on and the button is pressed, it is supposed to turn the second gate on and the third gate off. Unfortunately, what happens is the third gate does go off as it is supposed to, but the first gate turns on, not the second one. Actually, the second one does turn on, but only for a split second.

For some reason, going left to right, the d-pad input is finished before the second gate turns on, but this isn't true of going left to right.

It should be noted that the input that comes from the d-pad is modified by "X" which is shown in the lower left hand corner. This switch's default output is 0, but when you step on the switch, the output instantaneously becomes 1 before turning off again.

I believe I've attached a diagram of my logic gates, I'm actually totally new here. If you can't see "Logic Problems final.jpg" let me know.

Again, I know there's probably a better way to do what I'm trying to do, but I'm mostly having fun trying to figure things out by myself at the moment. I've just hit this wall because I can't for the life of me figure out why my circuit is acting the way it is.
2011-05-07 04:19:00

Author:
Unknown User


so i saw the jpg but had a hard time understanding your drawing...here is what id do. place a direction splitter and combiner place 2 AND gates and 2 NOT gates as well as a selector w the same # of ports as there r lights. if you have them lined up horizontally it will be easier to place the selector so the hand points down. now wire your d pad output to the direction splitter.+ goes to 1 AND gate and - goes to the other. now wire the NOT gates into the other open input of the AND gates. wire the selector outputs to its respective lights (furthest right light gets hooked to output 1 and so on right down the line). wire output 1 to the positive NOT gate (the 1 wired to the same AND gate that the positive output of the direction splitter is wired to) and the furthest left output or last # output to the other NOT gate. wire the AND gates to their respective inputs on the combiner then that to the cycle input of the selector. if it goes backwards then just cross the + & - wires of the combiner2011-05-07 04:45:00

Author:
Unknown User


I understand that there are better ways of doing what I'm trying to do, I really do. And I appreciate the time you took to write out another way of doing it. But I want to know why my way didn't work, where the flaw in my reasoning is so that I don't make similar mistakes in the future when trying to construct logic.2011-05-07 04:51:00

Author:
Unknown User


i read the first paragraph..
lets say you have the 3 light
1 -2 -3
use a direction splitter for the analog you choose
for the plus direction, hook the selector slot 3(NOT) with the plus and an AND gate
minus and selector slot 1(NOT) with another AND GATE

put those into a direction combiner plus with plus, minus with minus.
then just hook it up to the selector cycle

EDIT:aww i'm late :/
2011-05-07 04:52:00

Author:
sonofbrave
Posts: 107


i read the first paragraph..
lets say you have the 3 light
1 -2 -3
use a direction splitter for the analog you choose
for the plus direction, hook the selector slot 3(NOT) with the plus and an AND gate
minus and selector slot 1(NOT) with another AND GATE

put those into a direction combiner plus with plus, minus with minus.
then just hook it up to the selector cycle

EDIT:aww i'm late :/

not by much tho... lol @ OP take pic of your MC then export to HDD copy to flash drive then post it here so i may better see ur logic and ill show u the flaw
2011-05-07 05:01:00

Author:
Unknown User


without seeing a proper pic of your setup it's hard to say where you may have gone wrong. other that you tried to make a custom selector when there is already a selector in your tools bag. here is a pic of the setup others have been describing
http://ie.lbp.me/img/ft/19e0b68f23b1d233a07aba3c439f4534a67d8cf9.jpg
i uploaded this pic to help someone else a while back, so it has a wire coming from 2 different buttons, but you could wire from the d pad left and right into a splitter and use those two outputs to replace the wires on the 2 nodes in my pic
2011-05-07 07:48:00

Author:
evret
Posts: 612


Okay, is there a way to take a picture during create mode?2011-05-07 14:09:00

Author:
Unknown User


if you select your sticker/decoration tool from the pop-it, the option to take a picture should be right at the top. you can then press square on the picture and upload (when psn is up) or export to xmb, and you will find it in the pictures part of the xmb when not in a game, and from there you can transfer it to pc with a usb flash drive,2011-05-07 15:13:00

Author:
evret
Posts: 612


All right, the top input corresponds to the right input, the bottom to the left. The inputs are a very quick flash on then off again, I believe that it is as fast as a not gate plugged into itself, but only turns on once (until the button is pressed again), but there is a chance I'm wrong on that. If you have any other questions, just ask.


33793
2011-05-07 20:32:00

Author:
Unknown User


http://i.imgur.com/72rz8.jpg

Here you go.

This is a selector with 6 channels. You feed your d-pad signal into the signal splitter on the left; it gets split up. The + bit gets evaluated with the maximum channel (6). If channel 6 is not on (ergo, maximum has not been reached yet), the NOT gate gives off a signal into the AND gate with the + bit. Similar to channel 1 and the - bit. Signal gets combined again and fed into the cycle input of the selector.

I did not display a controlinator or a set of lights here. I think you get the idea.
2011-05-07 21:11:00

Author:
Antikris
Posts: 1340


All right, the top input corresponds to the right input, the bottom to the left. The inputs are a very quick flash on then off again, I believe that it is as fast as a not gate plugged into itself, but only turns on once (until the button is pressed again), but there is a chance I'm wrong on that. If you have any other questions, just ask.

the fastest pulse to use would be wiring into counter set to 1 and wired into it's own reset input then a second wire going to what ever you need the pulse for. I looked at your pic and at a glance it looks like it should work, i might have to recreate it to try and debug it properly

@Anticris- thanks for taking the time post a pic of the same logic in my pic..........
2011-05-08 03:43:00

Author:
evret
Posts: 612


I just tried it with your fastest pulse suggestion instead of mine, and got the same result; pressing right works as intended, turning on the next light in the row while turning off the previous light, but pressing left always turns off all sets except the first, essentially acting as a reset to position one. And that's my problem, I'm not sure why left to right works, but right to left doesn't. For some reason, in going left to right, the next is never on at the same time as the input, but for right to left, this isn't the case, which I can't make any sense of.2011-05-08 04:11:00

Author:
Unknown User


off of looking at it ...it looks as though you may have miswired something or even used a wrong gate. what output goes to the lights so i may wire this myself.2011-05-08 10:00:00

Author:
Unknown User


The green NOR gates would go to the lights.

Here's a rundown of why I chose the gates I did, to help you make sense of what I was trying to do and so you'll be able to better show me exactly where I went wrong. I'll describe it as it is supposed to work. I'll start with the NOR gates, then logically proceed. The NOR gates were chosen to act as memory. When a signal is sent to green, red gets turned on, and vice versa. So, when d-right is pressed, AND the first light is on, the first light is turned off and the second light is turned on. This happens again until light 4 is on, and then a d-right input will do nothing. Then for the same thing is wired up for right to left. When d-left is pressed AND light 4 is on, light 4 is turned off and light 3 is turned on, and so on and so forth until light 1 is on. The OR gates, in retrospect, could have been removed by increasing the number of inputs for the NOR gates. They're there because middle NOR gates have one input occupied by the input of the other NOR gate (to make it serve as memory), but there were still two ways that it could be turned off.
2011-05-08 14:28:00

Author:
Unknown User


i think i just found your issue possible try wire both the red & green to the lights. this will turn all the lights on though with no other logic. try to work it out i have to go to work but will wire all this up when i get back home2011-05-08 17:27:00

Author:
Unknown User


ok, just remade this in create mode and to be honest it seems to be an issue with what lbp2 chooses to calculate per frame, because it calculates the all 3 backwards selections within the same frame the 1-shot counter pulses, so all 3 AND gates are activated within the same frame, it should not be doing this and i dont understand why it is. however i found an easy workaround for the issue, i just added 3 forwards/backwards timers set to 0.1 seconds as you can see in this pic, and it solved the issue and it behaves as you wanted
http://img199.imageshack.us/img199/8780/aphotop.jpg
2011-05-09 08:52:00

Author:
evret
Posts: 612


Thank you VERY much. I'm trying to limit the use of logic gates other than the basic logic gates so I have a better understanding of what's really going on, but I have no trouble breaking this rule if its LBP2's issue rather than an issue with how I was understanding things.

If you ever find out why its calculating all gates in one frame, I'd be very interested to know why, but thank you very much!
2011-05-09 14:02:00

Author:
Unknown User


I think Mm should make an option of "allow continuous scrolling > no"2011-05-09 15:29:00

Author:
nunsmasher
Posts: 247


i took a nice little action shot of it all going down. as soon as i get on my comp ill upload it2011-05-10 09:43:00

Author:
Unknown User


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.