Hello, I know this is probably a stupid question but I can currently working on a project where I have an LCD, Keypad, DC motor w. encoder and some other things that need to be connected to the Arduino. This is my first time using an Arduino so I'm not really familar with how the shields work. I Have a motor shield, can I use that to connect the keypad or it that just for the motors. If that would not do then what would you guys suggest that I get to allow me to utilize more pins.
First of all you need to provide more details about each of the components you are trying to connect.
What type of connection does the LCD use (parallel, I2C, serial, etc)?
What about the keypad? Does it use one pin/key or does it used a voltage divider, or a encoder, etc?
Since we are very lousy on doing guesswork, having more info on what you are actually trying to connect might help us help you.
If the shield is stackable, with female header on the top, you can plug additional stuff into the top of the shield (of course, you need to be mindful of which pins are needed to interact with the shield).
might also be a good idea to specify which Arduino board you are using. The mega has more pins / ports but most of the shields out there are for the "standard" pinout.
Sorry for not being specific.
I am using the UNO R3. For the Keypad and LCD i am not really sure which connections they are(I just followed what I found online.) But the Keypad i have a 10K pot and use 5V port from the Arduino to power it.
The Keypad I am using ports 0-6 and connected them directly to the Arduino. I was not aware there was more than one way to wire these. If there is an alternative way that could save some pins I am open for suggestion.
I often use those via an I2C 8 pin port extender. You'll be able to access that matrix keypad via an MCP23008 using just A4 & A5 for the I2C communications. In one project we're using a pair of those MCP23008 for 8 switches as well as that matrix keypad, and also on the I2C bus we have a real-time clock and a 20x4 character LCD display. Using that method only consumes those two analog pins so the rest of the pins on your Arduino are available for other tasks.
Is he actually out of pins? I don't think he is. 7-8 for the keypad, 2-3 for the display, 1 for the pot.. that's 13 pins tops, leaving him at least 7 for the motor shield - and usually they use 4 pins iirc. The potential pitfall is just if the shield forces him to use inconvenient pins for the motor control...