Teensy Lc

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
User avatar
crispy_tofu
Posts: 341
Joined: Thu May 05, 2016 1:51 am
Location: Australia
Been thanked: 5 times

Re: Teensy Lc

Post by crispy_tofu » Sat May 07, 2016 6:19 pm

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

Sprockett
Posts: 42
Joined: Thu May 05, 2016 12:39 pm
Been thanked: 1 time

Re: Teensy Lc

Post by Sprockett » Sun May 08, 2016 8:35 am

That's exactly what I was looking for :D

Thanks

User avatar
crispy_tofu
Posts: 341
Joined: Thu May 05, 2016 1:51 am
Location: Australia
Been thanked: 5 times

Re: Teensy Lc

Post by crispy_tofu » Sun May 08, 2016 7:56 pm

You're welcome. :)

samboy555
Posts: 8
Joined: Wed Aug 31, 2016 8:14 am

Re: Teensy Lc

Post by samboy555 » Wed Aug 31, 2016 8:19 am

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);
}
}
}

User avatar
wermy
Site Admin
Posts: 1301
Joined: Tue May 03, 2016 8:51 pm
Has thanked: 579 times
Been thanked: 1289 times
Contact:

Re: Teensy Lc

Post by wermy » Wed Aug 31, 2016 8:23 am

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)?
ImageImageImageImage

samboy555
Posts: 8
Joined: Wed Aug 31, 2016 8:14 am

Re: Teensy Lc

Post by samboy555 » Wed Aug 31, 2016 9:31 am

Yeah, it's all good to go. It's just this code. Line seven. It doesn't like it.

Codeyvh
Posts: 1
Joined: Fri Oct 14, 2016 4:35 pm

Re: Teensy Lc

Post by Codeyvh » Fri Oct 14, 2016 4:38 pm

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.

User avatar
DirtyBullets
Posts: 137
Joined: Tue May 17, 2016 4:05 pm
Location: Lowestoft, UK
Has thanked: 5 times
Been thanked: 42 times
Contact:

Re: Teensy Lc

Post by DirtyBullets » Fri Oct 14, 2016 7:16 pm


samboy555
Posts: 8
Joined: Wed Aug 31, 2016 8:14 am

Re: Teensy Lc

Post by samboy555 » Sat Oct 22, 2016 3:36 am

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.

Ilegalftgrfr
Posts: 1
Joined: Wed Dec 05, 2018 10:42 am

Re: Teensy Lc

Post by Ilegalftgrfr » Wed Dec 05, 2018 10:48 am

Hi, is it me, or the link from wermys guide to the arduino code is broken?
It doesnt open anything to me 😔
Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests