Browse Source

cleanup and adjust pin numbers

Thomas Buck 8 months ago
parent
commit
00ed8b4002
10 changed files with 27 additions and 26 deletions
  1. BIN
      .DS_Store
  2. 1
    0
      .gitignore
  3. 17
    15
      README.md
  4. BIN
      pcb/.DS_Store
  5. 0
    1
      pcb/~drumkit.kicad_pcb.lck
  6. 0
    1
      pcb/~drumkit.kicad_sch.lck
  7. 5
    5
      src/buttons.c
  8. 1
    1
      src/encoder.c
  9. 1
    1
      src/lcd.c
  10. 2
    2
      src/led.c

BIN
.DS_Store View File


+ 1
- 0
.gitignore View File

1
 build
1
 build
2
 .directory
2
 .directory
3
+.DS_Store

+ 17
- 15
README.md View File

23
 
23
 
24
 ## Hardware Connections
24
 ## Hardware Connections
25
 
25
 
26
-    Pin 1    GP0    I2C SDA
27
-    Pin 2    GP1    I2C SCL
26
+    Pin 1    GP0    I2C0 SDA
27
+    Pin 2    GP1    I2C0 SCL
28
 
28
 
29
-    Pin 4    GP22    Output Channel A
30
-    Pin 5    GP26    Output Channel B
31
-    Pin 6    GP27    Output Channel C
29
+    Pin 29   GP22   Output Channel A
30
+    Pin 31   GP26   Output Channel B
31
+    Pin 32   GP27   Output Channel C
32
 
32
 
33
-    Pin 7    GP8    Button 1
34
-    Pin 9    GP9    Button 2
35
-    Pin 10   GP12    Button 3
36
-    Pin 11   GP14    Button 4
33
+    Pin 34   GP28   Vbat (ADC2)
37
 
34
 
38
-    Pin 12   GP17    Encoder A
39
-    Pin 14   GP18   Encoder B
40
-    Pin 15   GP16   Encoder Click
35
+    Pin 11   GP8    Button 1
36
+    Pin 12   GP9    Button 2
37
+    Pin 16   GP12   Button 3
38
+    Pin 19   GP14   Button 4
41
 
39
 
42
-    Pin 16   GP10   LED 1
43
-    Pin 17   GP11   LED 2
44
-    Pin 19   GP13   LED 3
40
+    Pin 22   GP17   Encoder A
41
+    Pin 24   GP18   Encoder B
42
+    Pin 21   GP16   Encoder Click
43
+
44
+    Pin 14   GP10   LED 1
45
+    Pin 15   GP11   LED 2
46
+    Pin 17   GP13   LED 3
45
     Pin 20   GP15   LED 4
47
     Pin 20   GP15   LED 4
46
 
48
 
47
 ## License
49
 ## License

BIN
pcb/.DS_Store View File


+ 0
- 1
pcb/~drumkit.kicad_pcb.lck View File

1
-{"hostname":"air2015","username":"kauzerei"}

+ 0
- 1
pcb/~drumkit.kicad_sch.lck View File

1
-{"hostname":"air2015","username":"kauzerei"}

+ 5
- 5
src/buttons.c View File

24
 #define DEBOUNCE_DELAY_MS 50
24
 #define DEBOUNCE_DELAY_MS 50
25
 
25
 
26
 static const uint gpio_num[NUM_BTNS] = {
26
 static const uint gpio_num[NUM_BTNS] = {
27
-    5, // BTN_A
28
-    6, // BTN_B
29
-    7, // BTN_C
30
-    8, // BTN_REC
31
-    11, // BTN_CLICK
27
+    8, // BTN_A
28
+    9, // BTN_B
29
+    12, // BTN_C
30
+    14, // BTN_REC
31
+    16, // BTN_CLICK
32
 };
32
 };
33
 
33
 
34
 struct button_state {
34
 struct button_state {

+ 1
- 1
src/encoder.c View File

25
 #define ENCODER_MODE TWO03
25
 #define ENCODER_MODE TWO03
26
 
26
 
27
 static const uint gpio_num[2] = {
27
 static const uint gpio_num[2] = {
28
-    9, 10
28
+    17, 18
29
 };
29
 };
30
 
30
 
31
 static const int8_t KNOBDIR[] = {
31
 static const int8_t KNOBDIR[] = {

+ 1
- 1
src/lcd.c View File

25
 #include "ssd1306.h"
25
 #include "ssd1306.h"
26
 #include "lcd.h"
26
 #include "lcd.h"
27
 
27
 
28
-#define LCD_I2C i2c1
28
+#define LCD_I2C i2c0
29
 static const uint gpio_num[2] = { 0, 1 };
29
 static const uint gpio_num[2] = { 0, 1 };
30
 #define LCD_ADDR 0x3C
30
 #define LCD_ADDR 0x3C
31
 
31
 

+ 2
- 2
src/led.c View File

22
 #include "led.h"
22
 #include "led.h"
23
 
23
 
24
 static const uint led_gpio_num[LED_COUNT] = {
24
 static const uint led_gpio_num[LED_COUNT] = {
25
-    12, 13, 14, 15,
25
+    10, 11, 13, 15,
26
 };
26
 };
27
 
27
 
28
 static const uint ch_gpio_num[NUM_CHANNELS] = {
28
 static const uint ch_gpio_num[NUM_CHANNELS] = {
29
-    2, 3, 4,
29
+    22, 26, 27,
30
 };
30
 };
31
 
31
 
32
 void led_init(void) {
32
 void led_init(void) {

Loading…
Cancel
Save