Go Down

Topic: Uno- out of digitals pins. can i use analog pins ? (Read 5497 times) previous topic - next topic

fca

hi there
after connecting all my alarm zones, led and buzzer, phone etc ... i have only one digital pin left....
Question can i use the analog pins to connect the leds ?
instead of digitalwrite(ledpin1,high ) something like analogwrite(a1, high) ?

can this be done ?
regards.

fca

Hi
I already read that page, i can only see this

Quote
Note

The analog input pins can be used as digital pins, referred to as A0, A1, etc.


so if i do a
pinMode(la0, OUTPUT);
digitalWrite(a0, HIGH);

the a0 pin will have the behavior of a digital pin ?

thanks

Bobnova

You can call 'em 14/15/16/17/18/19 as well, A0 is digitalWrite(14, HIGH), A1 is 15, etc.

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!

Arduino
via Egeo 16
Torino, 10131
Italy