Go Down

Topic: Setting Pins to Ground (Read 558 times) previous topic - next topic

HotRippedAbs

Is there anyway to program one the pins on the Arduino Mega to act as ground?  I'm new to this scene, so I'm not sure this is even possible.  
Thanks

Grumpy_Mike

#1
Mar 25, 2010, 09:47 pm Last Edit: Mar 25, 2010, 09:48 pm by Grumpy_Mike Reason: 1
digitalWrite(pin,LOW);

Puts the output at logic 0 which is ground.

Normal rules apply don't drive more than 3- 40mA through it.

Any reason? You can't run out of grounds just connect things to the same ground point.

HotRippedAbs

Thanks! I tried that before, but I checked my code and made a little mistake.  
I was just messing around with some new LEDs that I got.  A lot of the LED matrix tutorials I looked at require shift registers, but I figured that wasn't necessary with all the pins that the Mega has.  Thanks again, now I'm off to start programming my little 6x5 display.

Grumpy_Mike

Ok just remember that however many pins you have the maximum total for all pins must be less than 200mA.

Go Up