im using an arduino mega 2560 trying top use pins 3 and 4 for a motor one would be high and the oter low for forward then reversed for reverse allthough i cant get it to move at all unless i attach it to 5v and grnd can i not use two pins for motors like this on mega?
i tried this code and this doesnt work at all
int motorPin1 = 3;
int motorPin2 = 4;
void setup(void)
{
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
}
void loop(void)
{
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
}