Pages: [1]   Go Down
Author Topic: need 13 outputs from arduino uno  (Read 1419 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm working on a project that requires thirteen outputs (LEDs and a push-button), and I was wondering, is there any way to turn the analog pins or pins #1 and 0 (TX and RX, respectively) into regular digital output pins?
Logged

Copenhagen, Denmark
Offline Offline
Edison Member
*
Karma: 32
Posts: 1204
Have you testrun your INO file today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes to everything. The analog pins work as digital, if you address them as 14, 15 ..., ie digitalWrite(14) will output on analog 0. (Remember to set pinMode() first, of course)

pin 0 and 1 work fine as digital pins ... as long as you do not use the USB or Serial stuff. Usually they are not used as plain digital pins.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 158
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome, thanks a lot!
Logged

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

Quote
as long as you do not use the USB or Serial stuff.
As that includes uploading a sketch it is quite difficult not to use them. You can always switch out those pins when doing the uploading like I did on this project:-
http://www.thebox.myzen.co.uk/Hardware/MIDI_Shield.html
Logged

Pages: [1]   Go Up
Jump to: