Timeline for Is there a way to have more than 14 Output pins on arduino?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 2, 2015 at 3:54 | review | Suggested edits | |||
| Sep 2, 2015 at 15:03 | |||||
| Mar 20, 2014 at 1:02 | comment | added | Madivad |
Actually, whilst both will get the job done on UNO and compatible boards, digitalWrite(A0) is more correct than digitalWrite(14) since the former will always map to the correct physical (analog) pin. On a different board, pin 14 may in fact not be A0, eg pin 14 on the MEGA is Serial3 TX and will not influence the analog pin that you're after. ie, if using digitalWrite on an analog pin, use the A0-A5 reference.
|
|
| Feb 17, 2014 at 20:27 | comment | added | Anonymous Penguin | @PeterR.Bloomfield Both are correct, however I recommend A0-A5 for simplicity and easy of reading. Not a big deal with a LED blinking but when you have large projects little habits add up. | |
| Feb 14, 2014 at 13:44 | comment | added | Peter Bloomfield |
According to the Arduino reference, you can actually use the A0-A5 identifiers directly instead of using numbers 14-19. For example, digitalWrite(A0, HIGH).
|
|
| Feb 12, 2014 at 16:42 | history | answered | JVarhol | CC BY-SA 3.0 |