Files
projekt-arduino/Config.h
T
GarandPLG 899212d7b9 Remove turn signal & sonar, add RFID auth
Define AUTH_UID and AUTH_UID_SIZE constants.
Introduce motor control pins IN_1‑IN_4 and set them as outputs.
Comment out turn‑signal and sonar pin definitions and related code.
Refactor Display to remove updateDirection functionality.
Extend RFIDReader with reset() and matches() methods; use them to toggle
carEnabled based on RFID authentication.
Update the main loop to operate only when the RFID tag matches the
authorized UID.
2026-06-16 21:56:31 +02:00

41 lines
767 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);
// // Kierunkowskazy
// const int TS_RIGHT = 9;
// const int TS_LEFT = 8;
// // Odległościomierz
// const int TRIG_PIN = 6;
// const int ECHO_PIN = 5;
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
const int IN_1 = 9;
const int IN_2 = 8;
const int IN_3 = 4;
const int IN_4 = 3;