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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user