Author Topic: Hi I'm having massive issues can someone lend a hand please ?  (Read 1884 times)

0 Members and 1 Guest are viewing this topic.

Offline phillismable

  • Thread Starter
  • Posts: 13
Hi I'm having massive issues can someone lend a hand please ?
« on: Sat, 16 April 2022, 10:16:26 »
Hi, I've built a Dactyl Manuform 6x6 wired it up with a couple of Nice!Nano V2 and that project is great and working as it should do, fully programmed to my keyboard layout.

Today I'm trying to make a matching NUMBERPAD with ARROWS and the Control keys (pg up ins etc) but using an Arduino Uno clone from HobbyShop.

I've wired it up and tested everything with a multi-meter and all of the switches are working as they should do.

I've got the Arduino software on my PC and can program it with the Blink Demo, then reflash it with something else and then back again. So that part works.

I'm using the NumberPad example, but I cannot for the life of me figure out how to get it to see my keypresses.

I even tied in the Blink code with the key presses code just to make sure that it had flashed correctly, and it blinks to the value I set the light for.

Any help would be greatly appreciated.



#include <Keypad.h>

const byte ROWS = 4; //four rows

const byte COLS = 4; //four columns

//define the cymbols on the buttons of the keypads

char hexaKeys[ROWS][COLS] = {

{'0','1','2','3'},

{'4','5','6','7'},

{'8','9','A','B'},

{'C','D','E','F'}

};

byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad

byte colPins[COLS] = {9, 8, 7, 6}; //connect to the column pinouts of the keypad



//initialize an instance of class NewKeypad

Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);



void setup(){

Serial.begin(9600);

pinMode(LED_BUILTIN, OUTPUT);

}

void loop(){

//digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)

//delay(200); // wait for a second

//digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW

//delay(200); // wait for a second

char customKey = customKeypad.getKey();

if (customKey){

Serial.println(customKey);

}

}

Offline phillismable

  • Thread Starter
  • Posts: 13
Re: Hi I'm having massive issues can someone lend a hand please ?
« Reply #1 on: Sat, 16 April 2022, 10:38:59 »
I've noticed that the RX LED on the board lights up when a key is pressed, so I think that parts working correctly.

Offline phillismable

  • Thread Starter
  • Posts: 13
Re: Hi I'm having massive issues can someone lend a hand please ?
« Reply #2 on: Sat, 16 April 2022, 11:01:05 »
Ok I'm making progress, I can new see the keypresses on the Serial monitor Tool, but how do I print that to the screen ?

Any help please ?????

Offline nevin

  • Posts: 1646
  • Location: US
Re: Hi I'm having massive issues can someone lend a hand please ?
« Reply #3 on: Sat, 16 April 2022, 11:33:24 »
I'd ask the question over on the Arduino forum as well.
I haven't messed with Arduino code to know how to help you.

We mostly use purpose built keyboard firmware. QMK, ZMK, KMK, etc... Like what you have running on your Nice!Nano's.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline phillismable

  • Thread Starter
  • Posts: 13
Re: Hi I'm having massive issues can someone lend a hand please ?
« Reply #4 on: Sat, 16 April 2022, 11:41:39 »
Thanks for the reply...  I also have a teensy+++ 2 if someone can give me a hand programming that then I'd gladly swap projects.....

The Nanos were a pain to program in the beginning but I managed to update the layout, add extra keys, change the mapping, turn off the power saving as I have a 1000 battery in each half.  These Arduino are a massive pain in the arse.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Hi I'm having massive issues can someone lend a hand please ?
« Reply #5 on: Sat, 16 April 2022, 11:53:15 »
I think your problem is you're using keypad which is for reading the buttons, not keyboard which is to send keys to a computer - see the Arduino reference section for keyboards.  Might be as easy as adding include <Keyboard.h> at the top and changing serial.println(customKey) to Keyboard.print(customKey) but it's been a while since I messed with this.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline nevin

  • Posts: 1646
  • Location: US
Re: Hi I'm having massive issues can someone lend a hand please ?
« Reply #6 on: Sat, 16 April 2022, 12:05:21 »
teensy+++ 2 is fully supported in QMK
you were going to do a wired numpad right?

if you're not playing with leds, kbfirmware.com will do fine for your matrix etc. it's a great introduction to QMK for these type of hand wired one off projects.
kbfirmware is based off of a 2017 snapshot of QMK.
- paste your keyboard layout editor code
- indicate how you have the matrix wired, and speicfy the rest of the info, pins, etc...
- the teensy ++2.0 processor is AT90USB1286 (pick that from the controller popdown on the "pins" tab
https://kbfirmware.com/
285006-0

you could also go through the docs & start from scratch on the latest source
https://docs.qmk.fm/#/newbs
https://github.com/qmk/qmk_firmware
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline nevin

  • Posts: 1646
  • Location: US
Re: Hi I'm having massive issues can someone lend a hand please ?
« Reply #7 on: Sat, 16 April 2022, 12:07:57 »
Thanks @suicidal_orange
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68