Files
projekt-arduino/Config.h
T
GarandPLG 23d5003788 Add PWM motor control and refactor engine update
Introduce ENA pins for both motors and implement rpmToPwm and setMotor.
Replace extensive Serial debug prints with concise motor‑drive logic in
Engine::update. Consolidate sonar pins into a single TRIG_AND_ECHO_PIN.
Update pinMode calls in the sketch to configure the new ENA pins.
2026-06-16 23:35:23 +02:00

41 lines
747 B
C

#pragma once
// RFID
const int SS_PIN = 10;
const int RST_PIN = 7;
const byte AUTH_UID[4] = { 145, 136, 97, 102 };
const byte AUTH_UID_SIZE = sizeof(AUTH_UID);
// // Odległościomierz
const int TRIG_AND_ECHO_PIN = 3;
const long SONAR_MAX_DIST_CM = 400;
// Skrzynia biegów
const uint8_t GEAR_X_PIN = A0;
const uint8_t GEAR_Y_PIN = A1;
const int GEAR_THRESH_LOW = 341;
const int GEAR_THRESH_HIGH = 682;
// LCD
const int LCD_COLS = 16;
const int LCD_ROWS = 2;
// Skrzynia biegów
const uint8_t CLUTCH_PIN = A7;
const uint8_t BRAKE_PIN = A2;
const uint8_t THROTTLE_PIN = A3;
// Silniki
// Prawy silnik
const int IN_1 = 9;
const int IN_2 = 8;
const int ENA_1 = 5;
// Lewy silnik
const int IN_3 = 4;
const int IN_4 = 2;
const int ENA_2 = 6;