Hilf mir bei meinem Arduino Programm. Es soll 2 Räder bewegen mit je einem Motor. Es bewegt sich nur 1 Rad, bzw Motor. Was hab ich falsch gemacht?
int motor1pin1 = 2;
int motor1pin2 =3;
int speed1 = 9;
int motor2pin1 = 4;
int motor2pin2 = 5;
int speed2 = 10;
void setup() {
pinMode(motor1pin1, OUTPUT);
pinMode(motor1pin2, OUTPUT);
pinMode(motor2pin1, OUTPUT);
pinMode(motor2pin2, OUTPUT);
pinMode(speed1, OUTPUT);
pinMode(speed2, OUTPUT);
}
void loop() {
vorwarts();
}
void vorwarts (){
digitalWrite(motor1pin1, HIGH);
digitalWrite(motor1pin2, LOW);
analogWrite(speed1, 255);
digitalWrite(motor2pin1, HIGH);
digitalWrite(motor2pin2, LOW);
analogWrite(speed2, 255);
}
void ruckwarts() {
digitalWrite(motor1pin1, LOW);
digitalWrite(motor1pin2, HIGH);
analogWrite(speed1, 255);
digitalWrite(motor2pin1, LOW);
digitalWrite(motor2pin2, HIGH);
analogWrite(speed2, 255);
}
void rechts() {
digitalWrite(motor1pin1, LOW);
digitalWrite(motor1pin2, HIGH);
analogWrite(speed1, 455);
digitalWrite(motor2pin1, LOW);
digitalWrite(motor2pin2, HIGH);
analogWrite(speed2, 155);
}
void links() {
digitalWrite(motor1pin1, LOW);
digitalWrite(motor1pin2, HIGH);
analogWrite(speed1, 155);
digitalWrite(motor2pin1, LOW);
digitalWrite(motor2pin2, HIGH);
analogWrite(speed2, 455);
}