Ok, everything works for me now. The motors all turn, ticks per revolution are around 1200, but the shaft on the cutter motor is slightly crooked.
Raspberry Pi and TFT also work.
However, every now and then I get the error that the Teensy restarts because the loop takes too long. The mower is on my desk, I haven't found any errors yet.
However, another IRF9540N is already broken. D4 and Q4 seem to be too close together.
The code can be adjusted in the driver.cpp:
Raspberry Pi and TFT also work.
However, every now and then I get the error that the Teensy restarts because the loop takes too long. The mower is on my desk, I haven't found any errors yet.
However, another IRF9540N is already broken. D4 and Q4 seem to be too close together.
The code can be adjusted in the driver.cpp:
Code:
void setBL500W(int pinDir, int pinPWM, int pinEnable, int speed) {
if (speed < 0) {
digitalWrite(pinDir, HIGH) ;
//if (speed >= -4) speed = -4;
analogWrite(pinPWM, ((byte)abs(speed)));
} else {
digitalWrite(pinDir, LOW) ;
//if (speed <= 4) speed = 4;
analogWrite(pinPWM, ((byte)abs(speed)));
}
}