Page 2 of 2

Re: Teensy Lc

Posted: Sat May 07, 2016 6:19 pm
by crispy_tofu
Sprockett wrote:Thank You...

I can fit the teensy, but I really want to conserve space, I'm even etching my own control pad with extra room for the audio components from the Zero...

I would like to see the GPIO layout, I was worried it would interfere with the sound output...
Check out prerunnerseth's topic on this: http://www.sudomod.com/forum/viewtopic.php?p=525

Re: Teensy Lc

Posted: Sun May 08, 2016 8:35 am
by Sprockett
That's exactly what I was looking for :D

Thanks

Re: Teensy Lc

Posted: Sun May 08, 2016 7:56 pm
by crispy_tofu
You're welcome. :)

Re: Teensy Lc

Posted: Wed Aug 31, 2016 8:19 am
by samboy555
I. NEED. HELP.

I am building a gameboy zero. I have all the components in place. Except for the arduino code on my teensy. I keep getting this error when I try to write it onto my teensy:
Game_Boy_Zero:7: error: 'Key' does not name a type

Here is the code in question: (Please help. I'm going crazy.)

#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.bounce->update();
if (keys.bounce->fallingEdge()) {
Keyboard.press(keys.keycode);
}
else if (keys.bounce->risingEdge()) {
Keyboard.release(keys.keycode);
}
}
}

Re: Teensy Lc

Posted: Wed Aug 31, 2016 8:23 am
by wermy
samboy555 wrote:I. NEED. HELP.
Have you gone through the Arduino IDE setup for getting it to let you write to the Teensy? Are you able to run other example sketches on it (like the "blink" one that just blinks the onboard LED)?

Re: Teensy Lc

Posted: Wed Aug 31, 2016 9:31 am
by samboy555
Yeah, it's all good to go. It's just this code. Line seven. It doesn't like it.

Re: Teensy Lc

Posted: Fri Oct 14, 2016 4:38 pm
by Codeyvh
samboy555 wrote:Yeah, it's all good to go. It's just this code. Line seven. It doesn't like it.

Ever figure out how to fix this error message? Seems like you and I are the only two to have this problem.

Re: Teensy Lc

Posted: Fri Oct 14, 2016 7:16 pm
by DirtyBullets

Re: Teensy Lc

Posted: Sat Oct 22, 2016 3:36 am
by samboy555
Codeyvh wrote:
samboy555 wrote:Yeah, it's all good to go. It's just this code. Line seven. It doesn't like it.

Ever figure out how to fix this error message? Seems like you and I are the only two to have this problem.
I fixed it! Try downloading an older version of the Arduino software.

Re: Teensy Lc

Posted: Wed Dec 05, 2018 10:48 am
by Ilegalftgrfr
Hi, is it me, or the link from wermys guide to the arduino code is broken?
It doesnt open anything to me 😔
Thanks