Running out of pins for conponiments.

Hello everyone. I am new to Arduino and I have this problem. I have just couculated that my Arduino UNO R3 does not have enough pins for my project. I will be connecting 2 h-bridged dc motors (L293D chip), 16*2 LCD, ultrasonic distance sensor (HC-SR04) and 4 9g servos. It would be very nice to leave some pins for a camera and bluetooth as well for the future.
My question is what kind of upgrade or shield or something else could help me to to get more pins?

And another thing, I have been googling and I found these sensor shields - V4 and V5. They look like they could handle my components fine but I am not sure about the dc motors I have not seen them being used on one of them. If these expansions are the way to go which of them should I use - V4 that has digital female pins on the side like the Arduino (maybe they could be used for the dc motors) or V5 that has an external power input which as far as I know is needed for that amount of components?

V4

V5

Many people use an I2C back-pack on a 16x2 LCD so it only uses two data pins.

Daumas:
Hello everyone. I am new to Arduino and I have this problem. I have just couculated that my Arduino UNO R3 does not have enough pins for my project. I will be connecting 2 h-bridged dc motors (L293D chip), 16*2 LCD, ultrasonic distance sensor (HC-SR04) and 4 9g servos. It would be very nice to leave some pins for a camera and bluetooth as well for the future.

Well keep in mind that you can use and the analog pins as digital outputs.. so you have 19 pins in total.
I think you can have a motor shield, a distance sensor, 4 servos and a Bluetooth module all conected..
as for the rest i'm not sure what you can do.. 8) 8)

johnwasser:
Many people use an I2C back-pack on a 16x2 LCD so it only uses two data pins.

That's a really big difference, an LCD uses if i remember correct 6-7 pins, so if you can use only two instead it's really great...

so you have 19 pins in total.

20 pins in total. D0 to D19.
I offer a 1284P based board with 32 IO, 16K SRAM (twice that of a Mega2560), and 2 hardware serial ports.
More details at:
http://www.crossroadsfencing.com/BobuinoRev17/
Can also plug the breakout boards you show above onto it to have the added 5V/Gnd connections they provide.

I2C back-pack sounds good, does it require different coding for the lcd? I found this one:

I checked out the 1284P board as well, it goes instead of Arduino board right? The pin number is way higher but the problem is I already bought the Arduino UNO R3... I suppose I could keep it for a simpler bot.

And lastly, how do I use analog pins as digital outputs? Is it done by code or by wiring or both?

Every pin counts :smiley:

CrossRoads:

so you have 19 pins in total.

20 pins in total. D0 to D19.

yes, it's 20 indeed :smiley:

Daumas:
And lastly, how do I use analog pins as digital outputs? Is it done by code or by wiring or both?

Every pin counts :smiley:

It's done by code, here is everything you need : http://arduino.cc/en/Tutorial/AnalogInputPins