From efac21833552407a1154fac4d4ed481d5ee70bb5 Mon Sep 17 00:00:00 2001
From: LDobac <ljh34210329@gmail.com>
Date: Thu, 25 Mar 2021 11:43:47 +0900
Subject: [PATCH 1/5] New keyboard added, jkdlab/binary_monkey

3-Key macropad
---
 .../jkdlab/binary_monkey/binary_monkey.c      | 19 +++++
 .../jkdlab/binary_monkey/binary_monkey.h      | 28 ++++++++
 keyboards/jkdlab/binary_monkey/config.h       | 42 +++++++++++
 keyboards/jkdlab/binary_monkey/info.json      | 16 +++++
 .../binary_monkey/keymaps/ascii/keymap.c      | 70 +++++++++++++++++++
 .../binary_monkey/keymaps/default/keymap.c    | 30 ++++++++
 keyboards/jkdlab/binary_monkey/readme.md      | 24 +++++++
 keyboards/jkdlab/binary_monkey/rules.mk       | 19 +++++
 8 files changed, 248 insertions(+)
 create mode 100644 keyboards/jkdlab/binary_monkey/binary_monkey.c
 create mode 100644 keyboards/jkdlab/binary_monkey/binary_monkey.h
 create mode 100644 keyboards/jkdlab/binary_monkey/config.h
 create mode 100644 keyboards/jkdlab/binary_monkey/info.json
 create mode 100644 keyboards/jkdlab/binary_monkey/keymaps/ascii/keymap.c
 create mode 100644 keyboards/jkdlab/binary_monkey/keymaps/default/keymap.c
 create mode 100644 keyboards/jkdlab/binary_monkey/readme.md
 create mode 100644 keyboards/jkdlab/binary_monkey/rules.mk

diff --git a/keyboards/jkdlab/binary_monkey/binary_monkey.c b/keyboards/jkdlab/binary_monkey/binary_monkey.c
new file mode 100644
index 000000000000..bdbcac18eef4
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/binary_monkey.c
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
+ * Copyright 2021 Jaehee <ljh34210329@gmail.com>
+ * 
+ * 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"
diff --git a/keyboards/jkdlab/binary_monkey/binary_monkey.h b/keyboards/jkdlab/binary_monkey/binary_monkey.h
new file mode 100644
index 000000000000..598886b781bc
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/binary_monkey.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
+ * Copyright 2021 Jaehee <ljh34210329@gmail.com>
+ * 
+ * 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 } \
+}
diff --git a/keyboards/jkdlab/binary_monkey/config.h b/keyboards/jkdlab/binary_monkey/config.h
new file mode 100644
index 000000000000..20756a2716ed
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/config.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
+ * Copyright 2021 Jaehee <ljh34210329@gmail.com>
+ * 
+ * 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 
+#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
diff --git a/keyboards/jkdlab/binary_monkey/info.json b/keyboards/jkdlab/binary_monkey/info.json
new file mode 100644
index 000000000000..e15b43e70c64
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/info.json
@@ -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}
+            ]
+        }
+    }
+}
diff --git a/keyboards/jkdlab/binary_monkey/keymaps/ascii/keymap.c b/keyboards/jkdlab/binary_monkey/keymaps/ascii/keymap.c
new file mode 100644
index 000000000000..e10df7ce08c6
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/keymaps/ascii/keymap.c
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
+ * Copyright 2021 Jaehee <ljh34210329@gmail.com>
+ * 
+ * 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;
+}
diff --git a/keyboards/jkdlab/binary_monkey/keymaps/default/keymap.c b/keyboards/jkdlab/binary_monkey/keymaps/default/keymap.c
new file mode 100644
index 000000000000..629dfd3b2f60
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/keymaps/default/keymap.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
+ * Copyright 2021 Jaehee <ljh34210329@gmail.com>
+ * 
+ * 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
+    )
+};
diff --git a/keyboards/jkdlab/binary_monkey/readme.md b/keyboards/jkdlab/binary_monkey/readme.md
new file mode 100644
index 000000000000..283437e0213e
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/readme.md
@@ -0,0 +1,24 @@
+# Binary_Monkey
+
+![Binary_Monkey](https://i.imgur.com/0meBVKT.png?1)
+
+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
+    
+    
+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).
diff --git a/keyboards/jkdlab/binary_monkey/rules.mk b/keyboards/jkdlab/binary_monkey/rules.mk
new file mode 100644
index 000000000000..3e651d2af036
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/rules.mk
@@ -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
\ No newline at end of file

From 3278cbdd903ec09979c7bdb8720d8e99914a734a Mon Sep 17 00:00:00 2001
From: Jaehee <ljh34210329@gmail.com>
Date: Sat, 3 Apr 2021 19:06:42 +0900
Subject: [PATCH 2/5] Update keyboards/jkdlab/binary_monkey/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>
---
 keyboards/jkdlab/binary_monkey/rules.mk | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/keyboards/jkdlab/binary_monkey/rules.mk b/keyboards/jkdlab/binary_monkey/rules.mk
index 3e651d2af036..a90eef1fc65a 100644
--- a/keyboards/jkdlab/binary_monkey/rules.mk
+++ b/keyboards/jkdlab/binary_monkey/rules.mk
@@ -1,19 +1,22 @@
 # MCU name
 MCU = atmega32u4
 
+# Bootloader selection
 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
+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
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
 # 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
\ No newline at end of file
+NKRO_ENABLE = no            # USB Nkey Rollover
+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no       # Enable Bluetooth
+AUDIO_ENABLE = no           # Audio output

From 5110d1c2ff79b5e029935ce5fbb6a05d216c25b8 Mon Sep 17 00:00:00 2001
From: Jaehee <ljh34210329@gmail.com>
Date: Sat, 3 Apr 2021 19:06:48 +0900
Subject: [PATCH 3/5] Update keyboards/jkdlab/binary_monkey/readme.md

Co-authored-by: Ryan <fauxpark@gmail.com>
---
 keyboards/jkdlab/binary_monkey/readme.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/keyboards/jkdlab/binary_monkey/readme.md b/keyboards/jkdlab/binary_monkey/readme.md
index 283437e0213e..bc15230d547c 100644
--- a/keyboards/jkdlab/binary_monkey/readme.md
+++ b/keyboards/jkdlab/binary_monkey/readme.md
@@ -1,6 +1,6 @@
 # Binary_Monkey
 
-![Binary_Monkey](https://i.imgur.com/0meBVKT.png?1)
+![Binary_Monkey](https://i.imgur.com/0meBVKTh.png)
 
 It is 3-Key macropad, inspired by a monkey. 🐵
 

From f453683e2a879f2f89e105fcb00e0b2dd783edea Mon Sep 17 00:00:00 2001
From: Jaehee <ljh34210329@gmail.com>
Date: Sat, 3 Apr 2021 19:06:53 +0900
Subject: [PATCH 4/5] Update keyboards/jkdlab/binary_monkey/readme.md

Co-authored-by: Ryan <fauxpark@gmail.com>
---
 keyboards/jkdlab/binary_monkey/readme.md | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/keyboards/jkdlab/binary_monkey/readme.md b/keyboards/jkdlab/binary_monkey/readme.md
index bc15230d547c..7a787c76d941 100644
--- a/keyboards/jkdlab/binary_monkey/readme.md
+++ b/keyboards/jkdlab/binary_monkey/readme.md
@@ -8,13 +8,10 @@ It is 3-Key macropad, inspired by a monkey. 🐵
 * 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
     
-    
 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) :

From 3e216a15015a4f5f94b9ab20ed9e60ea7df38d6d Mon Sep 17 00:00:00 2001
From: Jaehee <ljh34210329@gmail.com>
Date: Mon, 19 Apr 2021 17:46:39 +0900
Subject: [PATCH 5/5] Update config.h

Edit VENDOR_ID not used
---
 keyboards/jkdlab/binary_monkey/config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/keyboards/jkdlab/binary_monkey/config.h b/keyboards/jkdlab/binary_monkey/config.h
index 20756a2716ed..ba8bfcd8d15d 100644
--- a/keyboards/jkdlab/binary_monkey/config.h
+++ b/keyboards/jkdlab/binary_monkey/config.h
@@ -20,7 +20,7 @@
 
 #include "config_common.h"
 
-#define VENDOR_ID       0x0324 
+#define VENDOR_ID       0x4934
 #define PRODUCT_ID      0x0101 
 #define DEVICE_VER      0x0001
 #define MANUFACTURER    JKDLAB.