Page 1 of 1

HELP - Soldering and Programming with alternative Teensy Bord

Posted: Tue Aug 16, 2016 9:33 am
by CaptainfutureHD
Hi Guys,

im from Germany and i got different Parts as some are not available in Europe.
I got a massive Problem with my Buttons.

I Use the ATmega Pro Micro from Amazon. It has a different layout.

https://simpledevelopment.de/de/Arduino ... jjenum3km1

Can somebody help me?

Thank You

Re: HELP - Soldering and Programming with alternative Teensy Bord

Posted: Tue Aug 16, 2016 5:34 pm
by ABH
it's similar to teency
I am not sure but try to use pins from Gnd to 15 .

with this code :

Code: Select all

#include <Bounce.h>

#define NUM_KEYS 13

struct Key {
  int keycode;
  Bounce* bounce;
};

Key keys[NUM_KEYS];

Key key(int 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(KEY_UP_ARROW, 0);
  keys[1] = key(KEY_LEFT_ARROW, 1);
  keys[2] = key(KEY_DOWN_ARROW, 2);
  keys[3] = key(KEY_RIGHT_ARROW, 3);
  keys[4] = key('z', 4);
  keys[5] = key('x', 5);
  keys[6] = key('k', 6);
  keys[7] = key('o', 7);
  keys[8] = key(KEY_ESC, 8);
  keys[9] = key(KEY_RETURN, 9);
  keys[10] = key('q',10);
  keys[11] = key('e',11);
  keys[12] = key(KEY_TAB, 12);
}

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);
    }
  }
}
as you see the code use pins from 1 - 12
1 to 12 = buttons
and GND = Ground

Sorry for my bad english
Good luck .

Re: HELP - Soldering and Programming with alternative Teensy Bord

Posted: Wed Aug 17, 2016 12:38 am
by Fleder
Wow, that is nearly the price of a Teensy here. Those are usually around 3€.
Well, if you still need help, hit me up. I've got those, too and will gladly share my sketches and knowledge with you.
Even in german :) Good luck.

Re: HELP - Soldering and Programming with alternative Teensy Bord

Posted: Wed Aug 24, 2016 7:58 am
by CaptainfutureHD
German:
Hallo zusammen.
Danke ihr seid echt super.
Ich versuche es nachdem mein Teensy LC Versuch zu programmieren kläglich gescheitert ist. Das Kompilieren geht einfach nicht.
Ich veruche nun die alternative....

Re: HELP - Soldering and Programming with alternative Teensy Bord

Posted: Sat Sep 24, 2016 4:43 am
by bluebiscuit85
I would love to know how you attached it to the usb hub. I would rather not have a mivro usb cable cuit and soldered to the hub but if thats what I have to do then I will. Are there no D+ D- pin outs?