Hello everyone. I am trying to run four motors with L298N. And I am using the code below stored in my Arduino Nano 33 BLE Sense. I cannot read 3.3 V or 5 volt between the input pins and ground. So I thought the problem is about my code activating the arduino and haven't reached the motor driver yet. Is there anyone who has an idea what is the problem?
int enB=23;
int in1=20;
int in2=22;
int in3=24;
int in4=25;
void setup() {
pinMode(enA, OUTPUT);
pinMode(enB, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);
}
void loop() {
delay(2000);
analogWrite(enA, 40);
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
delay(2000);
analogWrite(enB, 40);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);
}
now i can read the 3.3 volt value on multimeter between the pins and ground. thank you. but i have a further question. the source is instantly decreases from 12 volt to 3.5 volt and the motors are still not working. you have any idea?