Good afternoon,
I am utilizing a Mega with ethernet/SD card shield and the pin 13 LED on the shield starts a double blink after ~27sec. while being powered via an external power source. This does not happen while powered via USB. I'm not sure if this is an error code or an operational code I've not yet encountered. But seemingly all forum & web search results yield the standard blink sketch and I don't think its a "garbage in, garbage out" case regarding how I'm searching.
I am getting power to the motor drivers (TB6612FNG) and while probing wires for power I get highs as expected but wires that should be low are not indicating any current. Suspicion this is connected to blinking light issue but not sure.
This is part of a larger project utilizing 4 DC motors and 6 gate valves so I am simply trying to verify correct connections as I go to avoid larger issues down the road. As such, the code I'm using is:
int STBY = 27;
//Motor A
int PWMA = 8;
int AIN1 = 23;
int AIN2 = 25;
//Motor B
int PWMB = 6;
int BIN1 = 29;
int BIN2 = 31;
void setup(){
pinMode(STBY, OUTPUT);
pinMode(PWMA, OUTPUT);
pinMode(AIN1, OUTPUT);
pinMode(AIN2, OUTPUT);
pinMode(PWMB, OUTPUT);
pinMode(BIN1, OUTPUT);
pinMode(BIN2, OUTPUT);
}
void loop(){
digitalWrite(AIN1, HIGH);
digitalWrite(AIN2, LOW);
analogWrite(PWMA, 255);
digitalWrite(BIN1, HIGH);
digitalWrite(BIN2, LOW);
analogWrite(PWMA, 255);
delay(3000);
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, LOW);
digitalWrite(BIN1, LOW);
digitalWrite(BIN2, LOW);
delay(1000);
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, HIGH);
analogWrite(PWMA, 255);
digitalWrite(BIN1, LOW);
digitalWrite(BIN2, HIGH);
analogWrite(PWMA, 255);
delay(3000);
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, LOW);
digitalWrite(BIN1, LOW);
digitalWrite(BIN2, LOW);
delay(1000);
}
Any guidance troubleshooting would be greatly appreciated.