49 lines
1.7 KiB
Plaintext
49 lines
1.7 KiB
Plaintext
/*
|
|
* Pin Configuration Reference
|
|
*
|
|
* This file documents all pin assignments for quick reference.
|
|
* To change pins, edit the corresponding header files.
|
|
*/
|
|
|
|
// ===================================
|
|
// MOTOR CONTROLLER (LM18200)
|
|
// Defined in: include/MotorController.h
|
|
// ===================================
|
|
#define MOTOR_PWM_PIN 25 // PWM signal for speed control
|
|
#define MOTOR_DIR_PIN 26 // Direction: HIGH=forward, LOW=reverse
|
|
#define MOTOR_BRAKE_PIN 27 // Brake: LOW=brake, HIGH=release
|
|
|
|
// ===================================
|
|
// DCC GENERATOR
|
|
// Defined in: include/DCCGenerator.h
|
|
// ===================================
|
|
#define DCC_PIN_A 32 // DCC signal output A
|
|
#define DCC_PIN_B 33 // DCC signal output B (inverted)
|
|
|
|
// ===================================
|
|
// LED INDICATORS (WS2812)
|
|
// Defined in: include/LEDIndicator.h
|
|
// ===================================
|
|
#define LED_DATA_PIN 4 // WS2812 data line
|
|
#define NUM_LEDS 2 // LED 0: Power, LED 1: Mode
|
|
|
|
// ===================================
|
|
// AVAILABLE GPIO PINS (ESP32 D1 Mini)
|
|
// ===================================
|
|
// Used: 4, 25, 26, 27, 32, 33
|
|
// Available for expansion:
|
|
// - GPIO 5, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23
|
|
// - GPIO 34, 35, 36, 39 (Input only)
|
|
// Reserved for internal use:
|
|
// - GPIO 0, 2 (Boot/Flash)
|
|
// - GPIO 1, 3 (Serial TX/RX)
|
|
|
|
// ===================================
|
|
// NOTES
|
|
// ===================================
|
|
// - All control pins are outputs except where noted
|
|
// - Ensure adequate current capacity for motor loads
|
|
// - DCC outputs require proper signal conditioning
|
|
// - PWM frequency: 20kHz (defined in MotorController.cpp)
|
|
// - DCC timing follows NMRA standards
|