Arduino Ethernet, how many digital pins can be used?

Hi all,

I'd like to use an Arduino Ethernet as a datalogger for some sensors I have in my home (temperature, humidity, ...). The coding part (server side and client/Arduino side) is tested and works. :slight_smile: But now I'm wondering how many sensors the little Arduino Ethernet can use.

On the website I learned there are 14 Digital I/O Pins: 10 to 13 used for SPI, 4 used for SD card and 2 W5100 interrupt. So is it correct to assume I can use 8 digital pins (14 - 6 = 8 )? If so, where are those pins? I see pins with nr 2, 3, 5, 6, 7, 8 and 9 on the board. Which one am I missing? :slight_smile:

The reason I'm asking is that I'd love to add an LCD to my project, but typically the LCD will use like 6 pins so that leaves only two pins for my sensors. Is there a way to limit the number of pins used by an LCD? Or is there a way to increase to number of digital pins on the Arduino?

Thanks for all your thoughts!!

Jan

You could use an LCD with a I²C chip, only needs 2 pins. Thet are bit more expensive though.

The analog pins can be used as digital pins, too.

Which one am I missing? :slight_smile:

Maybe 0 and 1? You counted pin 2, but you said that's used by the ethernet shield.

Thanks for the reply. If you check the official photo of the Arduino Ethernet (see http://arduino.cc/en/Main/ArduinoBoardEthernet) pins 0 and 1 are labeled with TX and RX (if I can read it correctly). Do they have a special meaning, or can I just use them like pin 3 or 7 or ...

Thanks,
J

Do they have a special meaning, or can I just use them like pin 3 or 7 or ...

Yes, and yes, if you don't need the special meaning.

Of course, uploading sketches makes use of the special meaning of pins 0 and 1...

Thanks for the quick reply!

I'm sorry for asking a bit more explanation (newbie here :slight_smile: ) ... You are saying I can use pins 0 and 1, but they are also used when uploading sketches (I'll be using the USB 2 Serial Adapter). So when uploading sketches I need to disconnect whatever may be connected to pins 0 and 1?

Thanks again!

So when uploading sketches I need to disconnect whatever may be connected to pins 0 and 1?

Yes, and then in the sketch, you can't use Serial.xxx().