Search results

  1. A

    Tips for precise timing?

    Thanks for the help! I've managed to get decently consistent timing on both the emulator and console with I2C. I'm still having the problem where sometimes inputs come a frame early or late. I don't understand the solution for it that everyone posted, but I'll go back and read it in more detail...
  2. A

    Tips for precise timing?

    Most of my code is pretty modular and abstracted, so making seemingly large changes can be fairly simple depending on the change. If I were to use a second microcontroller just as a timer, I would like to find some way to keep all of my logic inside the main microcontroller. Telling a...
  3. A

    Tips for precise timing?

    Thank you for the info! I definitely think splitting up the library to its own processor is the way to go. What is the easiest way to communicate between processors? Ideally it would be done using as little pins as possible. How I envision it working is to have a Teensy that communicates via...
  4. A

    Tips for precise timing?

    Just thought of a problem I don't know how to fix for testing. I won't be able to print out how many polls there are per second, because currently it isn't possible to track how long a second is since millis() and micros() are running slowly. EDIT: Did some testing manually, by printing out the...
  5. A

    Tips for precise timing?

    Thanks for the info! I think I would want to stay working with time instead of polls, because I want my controller to work with a few other games of this type, so I'm not sure I want to commit to the concept of changing timing based on different poll rates. I might do that if I have to though...
  6. A

    Tips for precise timing?

    I'm starting to understand a little more what is happening with some reading. I managed to find a link that talks about pretty much my exact problem but with a different library. https://community.particle.io/t/millis-and-micros-lose-time-when-interrupts-are-disabled/15416 My problem is that I...
  7. A

    Tips for precise timing?

    I haven't posted code because my code is spread out among a bunch of different files and it is very class based. A really boiled down version of what I'm doing is the following: - I want to make a macro that when it gets a signal, it pushes an input instantly and then a different one 4 frames...
  8. A

    Tips for precise timing?

    Thank you for the info. I ended up contacting the guy who wrote the library, and he said it was possible that the GameCube console polls more often than the Dolphin emulator. If that were the case, I guess the interrupt-disabling code would be triggered more often, which would lead to slower...
  9. A

    Tips for precise timing?

    Thanks for the help! I'm having a whole new problem now. So this whole time I've been testing this controller on an official GameCube to USB adapter on my PC going to Dolphin (a GameCube emulator). This has been working really well. Today, however, I just tested it on a vanilla GameCube for the...
  10. A

    Tips for precise timing?

    That's a bummer. Fortunately, by exploiting a mechanic within the specific game I'm making this for, I am able to get frame-perfect output on the macro I want about 85% of the time. You say there are limited options on an 8 bit AVR, which unfortunately I am stuck with because of the library I...
  11. A

    Tips for precise timing?

    I'm using the NicoHood Nintendo library. I'm not sure how it works, but it probably has some interrupt routines I'm guessing. The thing is, even when I was testing on a simple padhack of a GameCube controller I was having this problem. I wired a Teensy 3.2 up to a couple GameCube controller...
  12. A

    Tips for precise timing?

    I'm working on a controller for a GameCube game. It uses a Teensy++ 2.0 to act as the controller. When I started experimenting with making macros for the game (chains of inputs that are precisely spaced in time), I found that elapsedMillis() and elapsedMicros() seem to be very loose with their...
  13. A

    Emulating a GameCube controller joystick with arcade buttons?

    So after a bunch of testing I have found that the Teensy++ 2.0 does work with the NicoHood Nintendo library. I now have a new issue. In my controller, I am trying to create a macro system for fun. It would allow me to string together various inputs at different timings. One specific one I am...
  14. A

    Emulating a GameCube controller joystick with arcade buttons?

    I see. Well I would only be using arcade buttons and maybe a potentiometer at some point, so I guess I would be fine. I suppose it would be worth getting a Teensy++ 2.0 and trying it out. Thanks for your help!
  15. A

    Emulating a GameCube controller joystick with arcade buttons?

    Thanks for the info. So the Teensy++ 2.0 should work then is what I'm gathering. Do you know how the Teensy being powered by 5v would affect the data line? Pardon my ignorance, I don't really know how it works. I think the 5v coming from the GameCube is originally intended to power the rumble...
  16. A

    Emulating a GameCube controller joystick with arcade buttons?

    So my controller is working really well, but I've had some ideas to improve the design. I kind of want to experiment with this library (https://github.com/NicoHood/Nintendo) to try to make a version of my controller that requires only a Teensy. The benefits of this are that I don't have to rely...
  17. A

    Emulating a GameCube controller joystick with arcade buttons?

    Thanks for the info. Yeah a relay doesn't seem like what I want if it has moving parts and delay. Transistors seem like more of what I need. I'll look into it and see if it's something worth doing!
  18. A

    Emulating a GameCube controller joystick with arcade buttons?

    Another quick question: I recently had an idea that would require the Teensy to be aware of a button press that is connected directly to the GameCube controller board. So basically I need one of the arcade button to complete two circuits. Would the best thing for this be a DPDT relay? If so...
  19. A

    Emulating a GameCube controller joystick with arcade buttons?

    Thank you for the information. That seems quite a bit more complicated than I hoped it would be. I'll probably just end up sticking with buttons connected to the inputs on the board then and save myself some soldering and potential hair pulling. I will reference this if I change my mind however.
  20. A

    Emulating a GameCube controller joystick with arcade buttons?

    It has taken quite a while, but after a lot of soldering and testing, my design works really well. I have another question however. The GameCube controller has a D-pad, which has four inputs that all share a ground with the rest of the controller. I was originally intending to simply connect...
  21. A

    Emulating a GameCube controller joystick with arcade buttons?

    Thanks for the tips. I have some protoboard that I had ordered before. It isn't quite like the one you posted because it has no default connections, but it will probably work ok. I just need to figure out a good way to connect it all on the board. It looks like I'll have to use a lot of wires...
  22. A

    Emulating a GameCube controller joystick with arcade buttons?

    I did a lot of testing today and I think I solved my problems. The digipots sticking seemed to be a result of updating so frequently. I guess they don't like being updated on the order of MHz. So I added parts to my code that only update the pots when they change, and so far this has been...
  23. A

    Emulating a GameCube controller joystick with arcade buttons?

    Thanks for the suggestions. I will do some more testing when I get the chance and update with my findings. On a fighting game forum, I found a thread that has a similar project to mine. The project uses a digital arcade stick and a modifier button that works on both the x and y axes at the...
  24. A

    Emulating a GameCube controller joystick with arcade buttons?

    Well I did some extensive testing, and I found that there are problems the circuit I made. The circuit works right, but sometimes the x and y axis seem to crosstalk a little somehow. Like if you push up, it will go up and slightly left when it was stationary when no buttons were pushed. Also...
  25. A

    Emulating a GameCube controller joystick with arcade buttons?

    Interesting, I had no idea that was even a factor. Well with my current design all buttons up gives 100k, which is a decent margin about 36k*2, so maybe I should go down a bit. What is that number based off of out of curiosity? Another question I have is, how do I determine the safety of...
  26. A

    Emulating a GameCube controller joystick with arcade buttons?

    Actually, both buttons pushed will happen very frequently for super short intervals on the x-axis of the left stick. There is a technique in Super Smash Bros. Melee called Dash Dancing, where you can run back and forth very quickly, and it is done a lot to trick out your opponent. The way this...
  27. A

    Emulating a GameCube controller joystick with arcade buttons?

    Thanks for the advice. When I checked my circuit originally it seemed to all work properly, but I didn't test anything like pushing additional buttons. I'll have to do some further tests when I get my protoboards in place. Right now it is a pain because there are tons of loose wires and nothing...
  28. A

    Emulating a GameCube controller joystick with arcade buttons?

    Thanks for the tips! I have another question: in my circuit that I posted, there are those 300 ohm resistors on both sides. I know this prevents a short when both direction buttons are pressed, but how low do you think I can go on those without adversely affecting the GC PCB?
  29. A

    Emulating a GameCube controller joystick with arcade buttons?

    Finally got around to removing the left thumbstick from the GC controller board. I verified today that my circuit works as I expected. My plan now is to get some perf board so I can implement 4 of these circuits in a more permanent and clean fashion. If anyone has any tips or suggestions for me...
  30. A

    Emulating a GameCube controller joystick with arcade buttons?

    Well I will order a package of resistors that has a lot of different kinds. That way I can test out my circuit. I'll probably end up needing the resistors anyway and it isn't very expensive. If I can't get my circuit to work, I'll have to try your suggestion. I still don't quite understand it...
  31. A

    Emulating a GameCube controller joystick with arcade buttons?

    I think you might be misunderstanding the modifier system still. That or I am misunderstanding something. I'll try to explain it better, lets consider the X axis again: - There are two modifier buttons that work for both directions. - The modifiers have different percentages. - So lets say...
  32. A

    Emulating a GameCube controller joystick with arcade buttons?

    The way I wanted it to work is like this (just consider one axis, we'll say the X axis): - If you push left, it goes 100% to the left. - If you push right, it goes 100% to the right. - The modifier keys don't do anything unless a directional button is held. - The modifier keys simply scale the...
  33. A

    Emulating a GameCube controller joystick with arcade buttons?

    At the link I sent you you have to import the text that I pasted. The inductor circuit you saw is just there by default. I added some labels to my circuit. It is the circuit you posted before but I added resistors in parallel that are activated by the modifier buttons. At the upper left corner...
  34. A

    Emulating a GameCube controller joystick with arcade buttons?

    I think I have come up with something that might work. If you go to http://www.falstad.com/circuit/circuitjs.html you can import the following text. $ 1 0.000005 19.867427341514983 61 5 43 r 768 352 864 352 0 5000 r 896 352 992 352 0 5000 r 672 384 768 384 0 300 r 992 384 1088 384 0 300 s 768...
  35. A

    Emulating a GameCube controller joystick with arcade buttons?

    Thanks for the informative response! I can see how that system of resistors would work. I think I can get away with not having the full range of motion on the potentiometers. At the very least I can use that for the C-stick since I don't need modifiers for it. I would actually prefer going this...
  36. A

    Emulating a GameCube controller joystick with arcade buttons?

    After some experimentation today, I can't seem to get that GameCube controller library to compile. It needs to use a 16 MHz speed to work, and when you set the Teensy to 16 MHz, it throws tons of strange errors like not knowing what bools are. If you set the IDE to use Arduino Uno, it will...
  37. A

    Emulating a GameCube controller joystick with arcade buttons?

    Unfortunately I don't have nearly enough experience with electronics to work out a system without a microcontroller. Unless someone is willing to provide instructions on exactly how to do it, I am going to have to go the microcontroller route. That gamecube controller library is interesting...
  38. A

    Emulating a GameCube controller joystick with arcade buttons?

    Are you suggesting that I just use the Teensy board? My problem with that is that I want it to be powered by the GameCube board itself. Is there a way to do that without using the USB slot? I am planning on using an existing controller board. When I posted on allaboutcircuits.com, my original...
  39. A

    Emulating a GameCube controller joystick with arcade buttons?

    Thank you for the information! I spent some time today writing the code and I believe I figured out a good way of doing what I need. I have tested my code with serial output, and unless I overlooked something, everything seems to be working. Now I just need to order some digital pots online and...
  40. A

    Emulating a GameCube controller joystick with arcade buttons?

    Hello everyone! I have recently decided to build my own GameCube controller for Super Smash Brothers Melee. I posted a thread about this on a different forum, here is the link if you want to look at it...
  41. A

    SoftPot to Pitch Bend MIDI questions.

    I even saw a suggestion to put a 10k Ohm resistor between the power source and pot and a different 10k Ohm resistor between the ground and pot. I tried that and it made the signal about 3 times more noisy. It did however make the bottom of the pot read about 200 or so, and when you let go it...
  42. A

    SoftPot to Pitch Bend MIDI questions.

    Thanks for the help. This is what I bought https://www.sparkfun.com/products/8681 I don't think it has a capacitive touch line. I'm pretty new to this so I wouldn't know how to check. For the hysteresis, I suppose you would have to linearly increase or decrease to the target value, or else it...
  43. A

    SoftPot to Pitch Bend MIDI questions.

    I'm not sure this is possible or practical, or even the best way to do this, but I guess in my mind I'm sort of looking for an intelligent algorithm that can change how it samples based on how fast potentiometer readings are changing. If you are moving fast it samples faster, if you are moving...
  44. A

    SoftPot to Pitch Bend MIDI questions.

    Thanks for the responses. Would the reference already be set to the right value? Whenever I see example Teensy code I don't see anyone calling analogReference(). I'm putting analogReference(DEFAULT); in my code now but it doesn't seem to make a difference. I think I worded one of my questions...
  45. A

    SoftPot to Pitch Bend MIDI questions.

    Hello everyone. I recently got a Teensy 3.2 along with a SpectraSymbol 500mm SoftPot, which I am hooking up with a breadboard. My goal is to make a ribbon MIDI controller that outputs pitch bend information. I have some noob questions about this: 1. Am I hooking it up right? I have the middle...
Back
Top