Uno- out of digitals pins. can i use analog pins ?

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.

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


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 ?


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