Pages: [1]   Go Down
Author Topic: arduino micro digital pins  (Read 520 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I am a total noob so bare with me please. i just purchased an arduino micro and would like to use 15 digital pins as sensor I/O. The product page says that is has 20 digital I/O's but when i look at the pinouts it only lists pins 0-13 (assuming that i can use the TX and RX as digital pins 0 and 1). so what pins are the other digital pins? and can i define them like i would normally, like as in pin 14? or can i even define 15 digital I/O's on the Micro? any information helps. thanks!
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The "analog" pins work for digital I/O as well.

Logged

No, I don't answer questions sent in private messages...

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23748
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, A0 to A5 can be called out as D14-D19.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

oh, ok. so in the sketch do i define it as D14 or just 14

EXAMPLE:
    #define LED D14
or
    #define LED 14

Thanks

Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

oh, ok. so in the sketch do i define it as D14 or just 14

EXAMPLE:
    #define LED D14
or
    #define LED 14

Thanks

Neither. Use "A0", "A1"...etc
Logged

No, I don't answer questions sent in private messages...

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23748
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@fingus,
Why would you use

#define LED A0
vs
#define LED 14
?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@fingus,
Why would you use

#define LED A0
vs
#define LED 14
?

Because that's what's printed on the PCB.

Would you know where pin "14" was just by looking at an Arduino Uno?
Logged

No, I don't answer questions sent in private messages...

Pages: [1]   Go Up
Jump to: