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.
This commit is contained in:
2026-06-16 11:08:56 +02:00
parent d26fb721f9
commit b957a0701b
4 changed files with 160 additions and 0 deletions
+5
View File
@@ -24,3 +24,8 @@ 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;