I am relatively new to Arduino, and I am trying to power a DC motor with the L298N dual H-Bridge. I have done as follows: I am powering everything with the Arduino that is connected to the PC. (I know this isn't ideal, but I don't have a better power supply yet) I connected the 5V output from Arduino to the 12V terminal of the L298N, and connected it to the Arduino ground. The red light from the L298N shines brightly. Then, I connected the IN3 and IN4 pins to the Arduino digital pins 7 and 8, respectively. Finally, I connected the Out 3 and Out 4 to my DC motor, but it doesn't turn at all. I use the following code:
int In3=7;
int In4=8; //idem para In2
void setup() {
pinMode(In3,OUTPUT); //avisa que nuestros pines son todos outputs
pinMode(In4,OUTPUT);
digitalWrite(In3,HIGH);
digitalWrite(In4,LOW);
}
void loop() {
}
For the time being I decided to not use the PWM, so that I can start simple. I tried changing all cables and even the motor, but it just won't rotate. The L298N is brand new, so it's unlikely that it is damaged. What could I try next?