forked from jamro/tiny-engineer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpins.h
More file actions
52 lines (37 loc) · 1.34 KB
/
Copy pathpins.h
File metadata and controls
52 lines (37 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include <cstdint>
// =====================================================
// PINOUT
// =====================================================
// I2C -> PCA9685 + OLED
constexpr int I2C_SDA = 0; // GP0
constexpr int I2C_SCL = 1; // GP1
// I2S -> MAX98357A
constexpr int I2S_BCLK = 2; // GP2
constexpr int I2S_LRC = 3; // GP3
constexpr int I2S_DIN = 4; // GP4
// Built-in WS2812 RGB
constexpr int RGB_LED_PIN = 10;
// PCA9685 output enable (active LOW). Optional: wire OE → GP5.
constexpr bool PCA9685_OE_WIRED = false;
constexpr int PCA9685_OE_PIN = 5;
// =====================================================
// AUDIO
// =====================================================
constexpr int SAMPLE_RATE = 44100;
// =====================================================
// PCA9685 / SERVOS
// =====================================================
constexpr uint8_t PCA9685_ADDRESS = 0x40;
constexpr int SERVO_STEP_MS = 10;
// Boot centering / sleep-pose rate (deg/s)
constexpr float SERVO_BOOT_SPEED_DEG_S = 35.0f;
// Servo pulse range
constexpr int SERVO_MIN_US = 800;
constexpr int SERVO_MAX_US = 2200;
// =====================================================
// OLED
// =====================================================
constexpr int OLED_WIDTH = 128;
constexpr int OLED_HEIGHT = 32;
constexpr uint8_t OLED_ADDRESS = 0x3C;