port to pro micro

This commit is contained in:
Valentin Boettcher 2021-08-24 12:45:03 +02:00
parent 2e08c19252
commit 8056e28589
No known key found for this signature in database
GPG key ID: E034E12B7AF56ACE
5 changed files with 72 additions and 32 deletions

View file

@ -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 */

32
keyboard/nano.h Normal file
View file

@ -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;

32
keyboard/pro_micro.h Normal file
View file

@ -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;

View file

@ -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 |

3
upload_pro_micro.sh Executable file
View file

@ -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