1
0
tmk_keyboard/keyboard/gnap
di0ib 37d06ecbb7 GNAP keyboard
GNAP dual controller dual matrix reactive LED
2016-09-16 20:25:48 -10:00
..
config.h GNAP keyboard 2016-09-16 20:25:48 -10:00
FLASH.bin GNAP keyboard 2016-09-16 20:25:48 -10:00
GNAP.jpg GNAP keyboard 2016-09-16 20:25:48 -10:00
keymap_common.h GNAP keyboard 2016-09-16 20:25:48 -10:00
keymap_gnap.c GNAP keyboard 2016-09-16 20:25:48 -10:00
LED_FastGPIO.ino GNAP keyboard 2016-09-16 20:25:48 -10:00
led.c GNAP keyboard 2016-09-16 20:25:48 -10:00
Makefile GNAP keyboard 2016-09-16 20:25:48 -10:00
matrix.c GNAP keyboard 2016-09-16 20:25:48 -10:00
pcb-front.png GNAP keyboard 2016-09-16 20:25:48 -10:00
readme.md GNAP keyboard 2016-09-16 20:25:48 -10:00
schematic.png GNAP keyboard 2016-09-16 20:25:48 -10:00

GNAP! keyboard firmware

GNAP! 1.0 Assembled

GNAP! dual matrix, dual controller. Per key LED control, reactive lighting. GNAP! 1.0 PCB Front GNAP! 1.0 PCB Schematic

Dual Pro Micro's. One running TMK, the other running an Arduino sketch driving the LEDs. Pro Micro's are connected to each other via hardware serial UART.

Pinout

Rows D1, D0, D4, C6 
Cols D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4

gnap.c contains functions to send bytes to the LED controller. The Arduino code interprets these to change modes or brightness.

//GNAP keymap functions
void gnaplight_step(void) {
	serial_send(101);
}

void gnaplight_toggle(void) {
	serial_send(100);
}

\tmk_core\common\keyboard.c was modified to send the row/column of the key being pressed encoded as as single byte over the serial link to the LED controller.

#ifdef GNAP_ENABLE
				//send single byte with value of row column
                serial_send((r*16)+c);
#endif

The example Arduino sketch LED_FastGPIO.ino uses the fastGPIO and TimerOne libraries. These can be installed with the Library manager.

FastGPIO TimerOne