An0 - 5 and Dig0 - 5 in the same program?


i don't have arduino, i'm contemplating using project use chip's i/o.

i've looked on reference material , tutorials, , have looked around
playground.  none of sample code i've seen has used low-numbered digital
lines @ same time analog lines.

how declare these in program?

thanks.

tj

you use numbers both: 0 5.  the function call operates on either analog or digital pins, knows do.  e.g. if  you call digitalread(2), reads digital pin 2.  if  you call analogread(2) reads analog pin 2.  you don't need call pinmode() analog inputs; operates on digital pins (e.g. pinmode(2, output)) sets digital pin 2 output.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > An0 - 5 and Dig0 - 5 in the same program?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums