Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added keyboard jkdlab/binary_monkey #12374

Merged
merged 5 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions keyboards/jkdlab/binary_monkey/binary_monkey.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright 2021 JKDLAB. <[email protected]>
* Copyright 2021 Jaehee <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/

#include "binary_monkey.h"
28 changes: 28 additions & 0 deletions keyboards/jkdlab/binary_monkey/binary_monkey.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2021 JKDLAB. <[email protected]>
* Copyright 2021 Jaehee <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/

#pragma once

#include "quantum.h"

#define LAYOUT( \
K00, K01, \
K10 \
) { \
{ K10, K00, K01 } \
}
42 changes: 42 additions & 0 deletions keyboards/jkdlab/binary_monkey/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2021 JKDLAB. <[email protected]>
* Copyright 2021 Jaehee <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/

#pragma once

#include "config_common.h"

#define VENDOR_ID 0x0324
LDobac marked this conversation as resolved.
Show resolved Hide resolved
#define PRODUCT_ID 0x0101
#define DEVICE_VER 0x0001
#define MANUFACTURER JKDLAB.
#define PRODUCT Binary_Monkey

#define MATRIX_ROWS 1
#define MATRIX_COLS 3
#define MATRIX_ROW_PINS { D0 }
#define MATRIX_COL_PINS { D1, D2, D3 }

#define DIODE_DIRECTION COL2ROW

#define DEBOUNCE 5

#define USB_MAX_POWER_CONSUMPTION 100

/* Bootmagic Lite key configuration */
#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 2
16 changes: 16 additions & 0 deletions keyboards/jkdlab/binary_monkey/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"keyboard_name": "Binary_Monkey",
"url": "https://gumroad.com/jkdlab",
"maintainer": "JKDLAB.",
"width": 3,
"height": 1,
"layouts": {
"LAYOUT": {
"layout": [
{"label": "0", "x": 0, "y": 0},
{"label": "1", "x": 1, "y": 0},
{"label": "ENTER", "x": 0, "y": 1, "w" : 2}
]
}
}
}
70 changes: 70 additions & 0 deletions keyboards/jkdlab/binary_monkey/keymaps/ascii/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* Copyright 2021 JKDLAB. <[email protected]>
* Copyright 2021 Jaehee <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/

#include QMK_KEYBOARD_H

char ascii = 0;

enum custom_keycodes {
BIN_0 = SAFE_RANGE,
BIN_1,
BIN_RETURN
};

enum layers {
_BASE = 0
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
BIN_0, BIN_1,
BIN_RETURN
)
};

bool process_record_user(uint16_t keycode, keyrecord_t* record) {
switch (keycode) {
case BIN_0:
if (record->event.pressed) {
ascii = ascii << 1;
}

return true;
case BIN_1:
if (record->event.pressed) {
ascii = ascii << 1;
++ascii;
}

return true;
case BIN_RETURN:
if (record->event.pressed) {
char str[2] = { ascii & 127, '\0' };

send_string(str);

ascii = 0;
}

return true;
default:
return true;
}

return true;
}
30 changes: 30 additions & 0 deletions keyboards/jkdlab/binary_monkey/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2021 JKDLAB. <[email protected]>
* Copyright 2021 Jaehee <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/

#include QMK_KEYBOARD_H

enum layers {
_BASE = 0
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_0, KC_1,
KC_ENTER
)
};
24 changes: 24 additions & 0 deletions keyboards/jkdlab/binary_monkey/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Binary_Monkey

![Binary_Monkey](https://i.imgur.com/0meBVKT.png?1)
LDobac marked this conversation as resolved.
Show resolved Hide resolved

It is 3-Key macropad, inspired by a monkey. 🐵

* Keyboard Maintainer: [JKDLAB.](https://github.com/jkdlab) [yikolden](https://github.com/LDobac)
* Hardware Supported: atmega32u4
* Hardware Availability: [Gumroad](https://gumroad.com/jkdlab)



Make example for this keyboard (after setting up your build environment):

make jkdlab/binary_monkey:default

LDobac marked this conversation as resolved.
Show resolved Hide resolved

If you want switch to bootloader, unplug the keyboard and plug it back while pressing right upper key(Key 1).

Flashing example for this keyboard (You need to keyboard has in bootloader mode) :

make jkdlab/binary_monkey:default:flash

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
19 changes: 19 additions & 0 deletions keyboards/jkdlab/binary_monkey/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# MCU name
MCU = atmega32u4

BOOTLOADER = atmel-dfu

# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
LDobac marked this conversation as resolved.
Show resolved Hide resolved