Fensty:
Thanks to you both...is there some special pinMode command in setup to make the pins act as a ground rather than a positive source? Or will they 'detect' the incoming 5V and somehow automatically flip to ground?Sorry, noob questions, if there is a specific tutorial I should be reading, I couldn't readily find it, most Google searches just get all kinds of standard LED situations explained...nothing about this reverse polarity type aspect...
JD
Problem is, I can't fathom what you're talking about. It sounds like you have an incorrect understanding of how this works.
When you set the pin mode to OUTPUT, i.e. like this:
#define DA_PIN 6 // Label Pin 6 as "DA_PIN" -- The choice of pin 6 is arbitrary.
pinMode(DA_PIN, OUTPUT); // Make Pin 6 an Output
The pin becomes an output that can be used to "drive" things by setting the output to either HIGH or LOW.
When you digital write a LOW to this pin, like this:
digitalWrite(DA_PIN, LOW);
pin 6 is pulled to ground. In other words, anything connected to the pin is, essentially, connected to ground.
When you digital write a HIGH to this pin, like this:
digitalWrite(DA_PIN, HIGH);
pin 6 is pulled to +5 [unless this is a 3V Arduino, in which case it's pulled to +3v]. Again, the pin is, essentially, connected to the +5V supply.
These "connections" are limited: for instance, trying to draw more than 40mA through them can damage them. And, I like to limit that to around 20mA.
There's more, but I don't have time to write a textbook ;).
I suggest you check out the various sites that teach electronics, like https://www.allaboutcircuits.com/