Using analog pins with digitalRead

Hello,

Can anyone tell me how I can use the analog pins for inputs using the digitalRead and digitalWrite functions. I would like to reassign my buttons to them so I can use an SD card shield that use pins 11, 12, 13. I also want to use the LCD so I have to move 2 of those pins as well

StanK

Hello,

Can anyone tell me how I can use the analog pins for inputs using the digitalRead and digitalWrite functions. I would like to reassign my buttons to them so I can use an SD card shield that use pins 11, 12, 13. I also want to use the LCD so I have to move 2 of those pins as well

StanK

Read the note in the following reference, you can use the pin names A0 to A5 with pinmode, digitalwrite and digitalread commands.

http://arduino.cc/en/Reference/PinMode

digitalRead(A0); digitalRead(14);

Either one works.

Hey StanK, don’t ask the same question in mulitple places please.

Thanks,

I thought it might be that simple. I am new to this environment. I like it. Lot's of helpful people here.

StanK

Topics merged. Don't cross-post - it wastes time.

Sorry about double posting. This is my first post and I didn't think I got it in the correct place the first time. I'll be more careful. I am still finding my way around this web site.

Stan K