Hallo ich hab mal wieder eine Frage:
ich habe die Motorsteuerung VNH3SP30 verbaut. Um das System zu testen verwende ich folgenden Code. Allerdings dreht der Motor nur vorwärts und nicht mehr rückwärts. Woran kann das liegen?
const int MotorAr = 43;
const int DIAGAr = 47;
const int PWMr=45;
const int DIAGBr =51;
const int MotorBr = 53;
const int CSr =49;
const int Akkur=A15;
const int MotorAl = 42;
const int DIAGAl = 46;
const int PWMl=44;
const int DIAGBl =50;
const int MotorBl = 52;
const int CSl =48;
void setup(){
Serial.begin(9600);
pinMode(MotorA, OUTPUT);
pinMode(MotorB, OUTPUT);
pinMode(CS, OUTPUT);
pinMode(DIAGB, INPUT);
pinMode(DIAGB, INPUT);
pinMode (PWM, OUTPUT);
}
void loop(){
digitalWrite (CS, LOW);
digitalWrite(MotorA, HIGH);
digitalWrite(MotorB, LOW);
analogWrite(PWM,50);
delay(50000)
digitalWrite(MotorA, LOW);
digitalWrite(MotorB, HIGH);
analogWrite(PWM,50);
delay(50000)
}
//