Hey everyone,
This is my first ever project but I am having problems getting my motor to run.
This is the sketch I uploaded to the board
// Project 1 - LED Flasher
int input1 = 5;
int input2 = 7;
int enableA = 6;
void setup() {
pinMode(input1, OUTPUT);
pinMode(input2, OUTPUT);
pinMode(enableA, OUTPUT);
}
void loop() {
digitalWrite(enableA, HIGH);
digitalWrite(input1, HIGH);
digitalWrite(input2, HIGH);
delay(1000);
digitalWrite(input1, LOW);
digitalWrite(input2, LOW);
digitalWrite(enableA, LOW);
delay(1000);
}
I have used this diagram for reference L298.jpg (image)
And this is how I have wired it up
I am trying to get my DC motor to run. Can anyone help me out?
As for a side question, can anyone confirm that we do not need to use any resistors for the l298n inputs? The board gives off 40ma for each input/output, is it okay to wire it like this without any resistors?
Thanks in advance