You give me too much credit @a3k4. I can edit code if I have a good understanding of it but I'm not using teensy. Maybe @popcorn or even weremy himself can help out with that code?a3k4 wrote:I haven't delved into the code yet, maybe @Helder or @hueblo can help?
[GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
- Helder
- Trailblazer
- Posts: 2985
- Joined: Thu May 05, 2016 8:33 am
- Location: Rogers, AR
- Has thanked: 1459 times
- Been thanked: 3114 times
Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
What Teensy are you using? one of the teensies the NON LC version uses Atmega32u4 while the LC version @Wermy used is a different MCU and should work with his code.
If it's the Atmega32u4 version then you can use the code I have in my programming thread in the Other Hardware subforum.
If it's the Atmega32u4 version then you can use the code I have in my programming thread in the Other Hardware subforum.
Chat with me and other members On Discord
Don't contact me about obtaining my board files (as you will not get them). If my Boards or PCB Kits are sold out, they will be restocked as soon as I can get them and there is demand for them. You can join the mailing list on my Website to be notified when they are available.
Helder's Game Tech Website
We will not support any cloned work so don't come to us with technical issues to resolve, go talk to the cloner for help.
Don't contact me about obtaining my board files (as you will not get them). If my Boards or PCB Kits are sold out, they will be restocked as soon as I can get them and there is demand for them. You can join the mailing list on my Website to be notified when they are available.
Helder's Game Tech Website
We will not support any cloned work so don't come to us with technical issues to resolve, go talk to the cloner for help.
- wermy
- Site Admin
- Posts: 1346
- Joined: Tue May 03, 2016 8:51 pm
- Has thanked: 620 times
- Been thanked: 1322 times
- Contact:
Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
@warrell What were you trying to modify the code to do and what problems are you having with it? And which Teensy are you using? I haven't tested the code but off the bat I do see on line 32 you're assigning keys[10] for the second time (should be keys[11] there).a3k4 wrote:I haven't delved into the code yet, maybe @Helder or @hueblo can help?warrell wrote:Im using Helders audio board and have followed the Standard wiring diagram (v2.5) to wire the teensy. This is of course different to Wermys set up so the Arduino Project he wrote won't work. I have amended it but its not working for me ill post the code below can anyone take a look and advise please.
Code: Select all
#include <Bounce.h> #define NUM_KEYS 12 struct Key { char keycode; Bounce* bounce; }; Key keys[NUM_KEYS]; Key key(char keycode, int pin) { Key *ret = new Key; ret->keycode = keycode; ret->bounce = new Bounce(pin, 10); pinMode(pin, INPUT_PULLUP); return *ret; } void setupKeys() { keys[0] = key('w', 14); keys[1] = key('s', 15); keys[2] = key('a', 16); keys[3] = key('d', 17); keys[4] = key('p', 18); keys[5] = key('l', 19); keys[6] = key('o', 20); keys[7] = key('k', 21); keys[8] = key('x', 22); keys[9] = key('z', 23); keys[10] = key('q',24); keys[10] = key('e',25); } void setup() { setupKeys(); Keyboard.begin(); // pinMode(0, INPUT_PULLUP); } void loop() { for (int i = 0; i < NUM_KEYS; i++) { keys[i].bounce->update(); if (keys[i].bounce->fallingEdge()) { Keyboard.press(keys[i].keycode); } else if (keys[i].bounce->risingEdge()) { Keyboard.release(keys[i].keycode); } } }
Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
@wermy My intention was not to modify the codes function. Only to have it work with Helder's Audio board & teensy wiring diagram (v2.5) on the first page of this topic. I noticed the numbered through holes used in the diagram are different from in your video so assumed (maybe wrongly?) that the code would need to reflect this? The only changes I have made are to some of the key numbers.@warrell What were you trying to modify the code to do and what problems are you having with it? And which Teensy are you using? I haven't tested the code but off the bat I do see on line 32 you're assigning keys[10] for the second time (should be keys[11] there).
When connected to my Rpi2 running RetroPie no inputs are recognised i.e. nothing happens
@Helder Im using the Teensy-LC I have attached a picture as I have it currently for your reference.
Any help is much appreciated, thanks for your patience

- Helder
- Trailblazer
- Posts: 2985
- Joined: Thu May 05, 2016 8:33 am
- Location: Rogers, AR
- Has thanked: 1459 times
- Been thanked: 3114 times
Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
If you used Wermy's code like he used in the video then that wiring you have now is incorrect. Follow the video guide and it should work .
Chat with me and other members On Discord
Don't contact me about obtaining my board files (as you will not get them). If my Boards or PCB Kits are sold out, they will be restocked as soon as I can get them and there is demand for them. You can join the mailing list on my Website to be notified when they are available.
Helder's Game Tech Website
We will not support any cloned work so don't come to us with technical issues to resolve, go talk to the cloner for help.
Don't contact me about obtaining my board files (as you will not get them). If my Boards or PCB Kits are sold out, they will be restocked as soon as I can get them and there is demand for them. You can join the mailing list on my Website to be notified when they are available.
Helder's Game Tech Website
We will not support any cloned work so don't come to us with technical issues to resolve, go talk to the cloner for help.
Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
Thanks @Helder I think that's what I will do. Is it worth editing the wiring diagrams in this thread to reflect wermy's as I followed those.
- Tamasco
- Posts: 67
- Joined: Tue Jun 21, 2016 2:37 pm
- Location: Spain
- Has thanked: 34 times
- Been thanked: 10 times
Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
Why are you using those pins in the Teensy? The last time I took the code from wermys, he was using the first ones. This iis what I´m using, and it works.warrell wrote:
Code: Select all
#include <Bounce.h>
#define NUM_KEYS 12
struct Key {
char keycode;
Bounce* bounce;
};
Key keys[NUM_KEYS];
Key key(char keycode, int pin) {
Key *ret = new Key;
ret->keycode = keycode;
ret->bounce = new Bounce(pin, 10);
pinMode(pin, INPUT_PULLUP);
return *ret;
}
void setupKeys() {
keys[0] = key('w', 0);
keys[1] = key('s', 1);
keys[2] = key('a', 2);
keys[3] = key('d', 3);
keys[4] = key('p', 4);
keys[5] = key('l', 5);
keys[6] = key('o', 6);
keys[7] = key('k', 7);
keys[8] = key('x', 8);
keys[9] = key('z', 9);
keys[10] = key('q',10);
keys[11] = key('e',11);
}
void setup() {
setupKeys();
Keyboard.begin();
// pinMode(0, INPUT_PULLUP);
}
void loop() {
for (int i = 0; i < NUM_KEYS; i++) {
keys[i].bounce->update();
if (keys[i].bounce->fallingEdge()) {
Keyboard.press(keys[i].keycode);
} else if (keys[i].bounce->risingEdge()) {
Keyboard.release(keys[i].keycode);
}
}
}
Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
Because if you follow the wiring diagram on this thread those are the pins used.
- wermy
- Site Admin
- Posts: 1346
- Joined: Tue May 03, 2016 8:51 pm
- Has thanked: 620 times
- Been thanked: 1322 times
- Contact:
Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
Do you mean this one? http://i.imgur.com/gQGaU4j.pngwarrell wrote:Because if you follow the wiring diagram on this thread those are the pins used.
If so then that one seems to be for a Teensy 3.1.
You can use any pins, really. There is a pinout diagram here you can reference: https://www.pjrc.com/teensy/teensyLC.html#pinout
Probably easier just to re-wire it to use the expected inputs though, honestly.

Re: [GUIDE] Wiring Diagrams: all-in-one board, graceful shutdowns, audio-only board
I have a micro SD breakout board from another project, I was thinking of using it on in a GBZ. The pin out is different to this diagram though. I can't seem to see how it cross refers. Image here, can anyone help?
https://goo.gl/photos/tELgP8huXnoZbrdS6
Thanks
https://goo.gl/photos/tELgP8huXnoZbrdS6
Thanks
Who is online
Users browsing this forum: No registered users and 1 guest