Go Down

Topic: what happens if... (Read 629 times) previous topic - next topic


Sep 17, 2012, 06:44 am Last Edit: Sep 17, 2012, 06:48 am by cjdelphi Reason: 1

if the ldr was connected 5v ~~~~ 1k ~~~~ ldr ~~~ A1  

does the voltage divider  no longer work? A1 should act as gnd no?


A1 is not connected tho.
A0 might act as ground if you used
digitalWrite(D14, LOW);
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


Typically, an input pin (analog or digital) will NOT "act as ground"; inputs are almost an open-circuit.


digitalWrite(A1, LOW);  //as suggested should do it though....

Turning the pins to low saves a lot of work using an extra pin :) - ok cool thanks


Also would Guarantee the circuit operation... You would Know what state it was in... just by looking at the sketch.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


Okay - I'll ask - why do you want to use A1 (or A0) as a ground?


Okay - I'll ask - why do you want to use A1 (or A0) as a ground?

I can think of a few examples where one might want to use two output pins to drive a device. Say a two color led that activates one color or the other depending on direction of current flow, or simulate a third combined color be switching the two output pins at significant clocking speed. I've used a small 20ma single coil latching relay where I could select to set or reset the relay depending on current direction, or once set or reset I could place both outputs to the same state to allow for zero current consumption for the relay. There are other applications where it might be useful to 'power' a device via two output pins, it just has to have a maximum current draw less then the output pins are rated for.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131