Pages: [1]   Go Down
Author Topic: Setting Pins to Ground  (Read 473 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33362
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 25, 2010, 03:48:59 pm by Grumpy_Mike » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33362
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: