diff --git a/keyboard/keyboard.ino b/keyboard/keyboard.ino index 0e0dc55..15edc37 100644 --- a/keyboard/keyboard.ino +++ b/keyboard/keyboard.ino @@ -2,34 +2,7 @@ /* Pins */ /*****************************************************************************/ -// columns -constexpr int KD1 = 14; -constexpr int KD2 = 15; -constexpr int KD3 = 16; -constexpr int KD4 = 17; -constexpr int KD5 = 18; -constexpr int KD6 = 19; -constexpr int KD7 = 2; -constexpr int KD8 = 3; - -// row selectors -constexpr int SA1 = 4; -constexpr int SA2 = 5; -constexpr int SA3 = 6; - -constexpr int SEL_A = SA1; -constexpr int SEL_B = SA2; -constexpr int SEL_C = SA3; - -// range selector -constexpr int SA4 = 7; -constexpr int SA5 = 8; - -constexpr int RS1 = SA4; -constexpr int RS2 = SA5; - -// sustain -constexpr int SSTE = 9; +#include "./pro_micro.h" /*****************************************************************************/ /* Convenience */ diff --git a/keyboard/nano.h b/keyboard/nano.h new file mode 100644 index 0000000..67ce89a --- /dev/null +++ b/keyboard/nano.h @@ -0,0 +1,32 @@ +/*****************************************************************************/ +/* Pins */ +/*****************************************************************************/ + +// columns +constexpr int KD1 = 14; +constexpr int KD2 = 15; +constexpr int KD3 = 16; +constexpr int KD4 = 17; +constexpr int KD5 = 18; +constexpr int KD6 = 19; +constexpr int KD7 = 2; +constexpr int KD8 = 3; + +// row selectors +constexpr int SA1 = 4; +constexpr int SA2 = 5; +constexpr int SA3 = 6; + +constexpr int SEL_A = SA1; +constexpr int SEL_B = SA2; +constexpr int SEL_C = SA3; + +// range selector +constexpr int SA4 = 7; +constexpr int SA5 = 8; + +constexpr int RS1 = SA4; +constexpr int RS2 = SA5; + +// sustain +constexpr int SSTE = 9; diff --git a/keyboard/pro_micro.h b/keyboard/pro_micro.h new file mode 100644 index 0000000..4350e50 --- /dev/null +++ b/keyboard/pro_micro.h @@ -0,0 +1,32 @@ +/*****************************************************************************/ +/* Pins */ +/*****************************************************************************/ + +// columns +constexpr int KD1 = 0; +constexpr int KD2 = 1; +constexpr int KD3 = 2; +constexpr int KD4 = 3; +constexpr int KD5 = 4; +constexpr int KD6 = 5; +constexpr int KD7 = 6; +constexpr int KD8 = 7; + +// row selectors +constexpr int SA1 = 8; +constexpr int SA2 = 9; +constexpr int SA3 = 14; + +constexpr int SEL_A = SA1; +constexpr int SEL_B = SA2; +constexpr int SEL_C = SA3; + +// range selector +constexpr int SA4 = 15; +constexpr int SA5 = 16; + +constexpr int RS1 = SA4; +constexpr int RS2 = SA5; + +// sustain +constexpr int SSTE = 21; diff --git a/project.org b/project.org index 5a1f371..dea961b 100644 --- a/project.org +++ b/project.org @@ -2,10 +2,10 @@ ** Keyboard | Header | Arduino Nano | Pro Micro | PM NR | Name | Function | Color | |--------+--------------+-----------+-------+------+----------+--------| -| 1 | A0 | RX | 0 | KD1 | S1 | | -| 2 | A1 | TX | 1 | KD2 | S1 | | -| 3 | A2 | 2 | 2 | KD3 | S1 | | -| 4 | A3 | 3 | 3 | KD4 | S1 | | +| 1 | A0 | RX | 0 | KD1 | S1 | Grey | +| 2 | A1 | TX | 1 | KD2 | S1 | Purple | +| 3 | A2 | 2 | 2 | KD3 | S1 | Brown | +| 4 | A3 | 3 | 3 | KD4 | S1 | Orange | | 5 | A4 | 4 | 4 | KD5 | S2 | Red | | 6 | A5 | 5 | 5 | KD6 | S2 | Grey | | 7 | D2 | 6 | 6 | KD7 | S2 | Yellow | diff --git a/upload_pro_micro.sh b/upload_pro_micro.sh new file mode 100755 index 0000000..fb7bcc8 --- /dev/null +++ b/upload_pro_micro.sh @@ -0,0 +1,3 @@ +#! /usr/bin/env bash +sudo arduino-cli compile -v -p /dev/ttyACM0 -b arduino:avr:micro keyboard +sudo arduino-cli upload -v -p /dev/ttyACM0 -b arduino:avr:micro keyboard