Update stall detection params and expand documentation

- Adjust stall current threshold to 4A and detection time to 2500ms
- Add comprehensive README with hardware specs, wiring diagrams
- Include current sensing circuit documentation and math
- Improve motor and webserver implementations
This commit is contained in:
devdesk
2026-02-05 16:59:47 +02:00
parent 6ccbc7faf5
commit e2fe9aa495
5 changed files with 203 additions and 25 deletions

View File

@@ -33,6 +33,12 @@ void setupWiFi() {
}
}
// Stall protection callback - stops motor immediately when stall detected
void onMotorStall(float current) {
Serial.printf("STALL PROTECTION: Stopping motor (current: %.2fA)\n", current);
motor.stop();
}
void setup() {
Serial.begin(115200);
delay(1000);
@@ -44,6 +50,9 @@ void setup() {
// Initialize motor controller
motor.begin();
// Register stall protection callback
motor.setStallCallback(onMotorStall);
// Connect to WiFi
setupWiFi();