Hello everyone,
I am trying to run a dc motor rated(5V)
Whenever i am connecting the motor between 5V and ground of the arduino it works.
Whenever i am connecting the motor between 3.3V and ground of the arduino it still works
when i try to do that using the following code it does not work neither with digital pins or analog ones
void setup() {
pinMode(A4,OUTPUT);
pinMode(A5,OUTPUT);
pinMode(9,OUTPUT);
pinMode(8,OUTPUT);
}
void loop() {
analogWrite(A5,255);
analogWrite(A4,0);
digitalWrite(9,HIGH);
digitalWrite(8,LOW);
}
it doesn't work between the combination of pins
(A5,A4) or (9,8) or (9,gnd) or (5V,8) or (A5,gnd) or (5V, A4) or (5V,8) etc.
Can anyone help me understand this