Hello,
I am new to this stuff and try to build my own Super Pi Boy with wermys Tutorial.
I have an Teensy LC programmed with wermys code.
At EmuStation it works quite well and i can configure all buttons.
If i go in the configuration menu the buttons will not work and i dont know why.
I read between the lines that someone have a solution or idea. But i did not find a fix for that.
Could someone help me?
Control Problem Configuration Menu Teensy LC
Re: Control Problem Configuration Menu Teensy LC
I tried this thing, but the teensy is not working. (http://www.sudomod.com/forum/viewtopic. ... 6&start=10)
And one other thing is bad. Retropi says there are 2 controllers but only the teensy is connected?!
And one other thing is bad. Retropi says there are 2 controllers but only the teensy is connected?!
-
- Posts: 226
- Joined: Tue Jan 31, 2017 11:06 am
- Location: Tianjin / China
- Has thanked: 25 times
- Been thanked: 53 times
Re: Control Problem Configuration Menu Teensy LC
I had a similar question in the past during my first Gameboy and took this into account on my second build. I programmed all keys in the Teensy as much as possible as the standard keyboard layout. Finally now I can move through most of the retropie configs.
Here is my adapted script I used to program the Teensy:
#include <Keyboard.h>
#define abutton 2
#define bbutton 3
#define ybutton 4
#define xbutton 5
#define startbutton 6
#define selectbutton 7
#define rightbutton 8
#define downbutton 9
#define upbutton 10
#define leftbutton 16
#define ltbutton 14
#define rtbutton 15
void setup() {
pinMode(abutton,INPUT_PULLUP);pinMode(bbutton,INPUT_PULLUP);pinMode(ybutton,INPUT_PULLUP);pinMode(xbutton,INPUT_PULLUP);
pinMode(startbutton,INPUT_PULLUP);pinMode(selectbutton,INPUT_PULLUP);
pinMode(rightbutton,INPUT_PULLUP);pinMode(downbutton,INPUT_PULLUP);pinMode(upbutton,INPUT_PULLUP);pinMode(leftbutton,INPUT_PULLUP);
pinMode(ltbutton,INPUT_PULLUP);pinMode(rtbutton,INPUT_PULLUP);
Serial.begin(9600);
Keyboard.begin();
}
void loop() {
if (!digitalRead(abutton)){Keyboard.press(KEY_RETURN);}else{Keyboard.release(KEY_RETURN);}
if (!digitalRead(bbutton)){Keyboard.press('b');}else{Keyboard.release('b');}
if (!digitalRead(ybutton)){Keyboard.press('y');}else{Keyboard.release('y');}
if (!digitalRead(xbutton)){Keyboard.press('x');}else{Keyboard.release('x');}
if (!digitalRead(startbutton)){Keyboard.press('s');}else{Keyboard.release('s');}
if (!digitalRead(selectbutton)){Keyboard.press('a');}else{Keyboard.release('a');}
if (!digitalRead(rightbutton)){Keyboard.press(KEY_RIGHT_ARROW);}else{Keyboard.release(KEY_RIGHT_ARROW);}
if (!digitalRead(downbutton)){Keyboard.press(KEY_DOWN_ARROW);}else{Keyboard.release(KEY_DOWN_ARROW);}
if (!digitalRead(upbutton)){Keyboard.press(KEY_UP_ARROW);}else{Keyboard.release(KEY_UP_ARROW);}
if (!digitalRead(leftbutton)){Keyboard.press(KEY_LEFT_ARROW);}else{Keyboard.release(KEY_LEFT_ARROW);}
if (!digitalRead(ltbutton)){Keyboard.press('r');}else{Keyboard.release('r');}
if (!digitalRead(rtbutton)){Keyboard.press(KEY_ESC);}else{Keyboard.release(KEY_ESC);}
}
Here is my adapted script I used to program the Teensy:
#include <Keyboard.h>
#define abutton 2
#define bbutton 3
#define ybutton 4
#define xbutton 5
#define startbutton 6
#define selectbutton 7
#define rightbutton 8
#define downbutton 9
#define upbutton 10
#define leftbutton 16
#define ltbutton 14
#define rtbutton 15
void setup() {
pinMode(abutton,INPUT_PULLUP);pinMode(bbutton,INPUT_PULLUP);pinMode(ybutton,INPUT_PULLUP);pinMode(xbutton,INPUT_PULLUP);
pinMode(startbutton,INPUT_PULLUP);pinMode(selectbutton,INPUT_PULLUP);
pinMode(rightbutton,INPUT_PULLUP);pinMode(downbutton,INPUT_PULLUP);pinMode(upbutton,INPUT_PULLUP);pinMode(leftbutton,INPUT_PULLUP);
pinMode(ltbutton,INPUT_PULLUP);pinMode(rtbutton,INPUT_PULLUP);
Serial.begin(9600);
Keyboard.begin();
}
void loop() {
if (!digitalRead(abutton)){Keyboard.press(KEY_RETURN);}else{Keyboard.release(KEY_RETURN);}
if (!digitalRead(bbutton)){Keyboard.press('b');}else{Keyboard.release('b');}
if (!digitalRead(ybutton)){Keyboard.press('y');}else{Keyboard.release('y');}
if (!digitalRead(xbutton)){Keyboard.press('x');}else{Keyboard.release('x');}
if (!digitalRead(startbutton)){Keyboard.press('s');}else{Keyboard.release('s');}
if (!digitalRead(selectbutton)){Keyboard.press('a');}else{Keyboard.release('a');}
if (!digitalRead(rightbutton)){Keyboard.press(KEY_RIGHT_ARROW);}else{Keyboard.release(KEY_RIGHT_ARROW);}
if (!digitalRead(downbutton)){Keyboard.press(KEY_DOWN_ARROW);}else{Keyboard.release(KEY_DOWN_ARROW);}
if (!digitalRead(upbutton)){Keyboard.press(KEY_UP_ARROW);}else{Keyboard.release(KEY_UP_ARROW);}
if (!digitalRead(leftbutton)){Keyboard.press(KEY_LEFT_ARROW);}else{Keyboard.release(KEY_LEFT_ARROW);}
if (!digitalRead(ltbutton)){Keyboard.press('r');}else{Keyboard.release('r');}
if (!digitalRead(rtbutton)){Keyboard.press(KEY_ESC);}else{Keyboard.release(KEY_ESC);}
}
-
- Posts: 226
- Joined: Tue Jan 31, 2017 11:06 am
- Location: Tianjin / China
- Has thanked: 25 times
- Been thanked: 53 times
Re: Control Problem Configuration Menu Teensy LC
Happy about myself reply... After reinstall my computer operating system I lost the Arduino script... I had a OS backup but unfortunately this was corrupted... So I found my Teensy script here for backup
Who is online
Users browsing this forum: No registered users and 1 guest