Files
projekt-arduino/Config.h
T
GarandPLG b957a0701b Add Engine class and integrate it into Projekt
Add clutch, brake, and throttle pin constants to Config.h.
Implement Engine class in Engine.h/Engine.cpp to read analog inputs,
compute engine RPM, vehicle speed, and apply forces.
Create an Engine instance in Projekt.ino, initialize it in setup,
and update it every 20ms, displaying RPM and speed.
2026-06-16 11:08:56 +02:00

32 lines
555 B
C

#pragma once
// RFID
const int SS_PIN = 10;
const int RST_PIN = 7;
// 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;
// Silnik
const uint8_t CLUTCH_PIN = A7;
const uint8_t BRAKE_PIN = A2;
const uint8_t THROTTLE_PIN = A3;