
Inaddition,somepinshavespecializedfunctions:
Serial:0(RX)and1(TX).Usedtoreceive(RX)andtransmit(TX)TTLserialdata.These
pinsareconnectedtothecorrespondingpinsoftheATmega8U2USB‐to‐TTLSerialchip.
ExternalInterrupts:2and3.Thesepinscanbeconfiguredtotriggeraninterruptonalow
value,arisingorfallingedge,orachangeinvalue.SeetheattachInterrupt()functionfor
details.
PWM:3,5,6,9,10,and11.Provide8‐bitPWMoutputwiththeanalogWrite()function.
SPI:10(SS),11(MOSI),12(MISO),13(SCK).ThesepinssupportSPIcommunicationusing
theSPIlibrary.
LED:13.Thereisabuilt‐inLEDdrivenbydigitalpin13.WhenthepinisHIGHvalue,the
LEDison,whenthepinisLOW,it'soff.
TWI:A4orSDApinandA5orSCLpin.SupportTWIcommunicationusingtheWirelibrary.
TheUnohas6analoginputs,labeledA0throughA5,eachofwhichprovide10bits
ofresolution(i.e.1024differentvalues).Bydefaulttheymeasurefromgroundto5
volts,thoughisitpossibletochangetheupperendoftheirrangeusingtheAREF
pinandtheanalogReference()function.Thereareacoupleofotherpinsonthe
board:
AREF.Referencevoltagefortheanaloginputs.UsedwithanalogReference().
Reset.BringthislineLOWtoresetthemicrocontroller.Typicallyusedtoaddareset
buttontoshieldswhichblocktheoneontheboard.
Communication
Arduino/GenuinoUnohasanumberoffacilitiesforcommunicatingwitha
computer,anotherArduino/Genuinoboard,orothermicrocontrollers.The
ATmega328providesUARTTTL(5V)serialcommunication,whichisavailableon
digitalpins0(RX)and1(TX).AnATmega16U2ontheboardchannelsthisserial
communicationoverUSBandappearsasavirtualcomporttosoftwareonthe
computer.The16U2firmwareusesthestandardUSBCOMdrivers,andnoexternal
driverisneeded.However,onWindows,a.inffileisrequired.TheArduino
Software(IDE)includesaserialmonitorwhichallowssimpletextualdatatobe
senttoandfromtheboard.TheRXandTXLEDsontheboardwillflashwhendata
isbeingtransmittedviatheUSB‐to‐serialchipandUSBconnectiontothecomputer
(butnotforserialcommunicationonpins0and1).