Pages: [1]   Go Down
Author Topic: Uno- out of digitals pins. can i use analog pins ?  (Read 4267 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 138
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Full Member
***
Karma: 0
Posts: 138
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Humboldt, CA
Offline Offline
Full Member
***
Karma: 2
Posts: 223
Arduino BBB
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: