Serial Communication problem

So I'm working on a project where I'd like to set up a gearmotor to move an object a certain difference. I've got this part of the project down using encoders and am able to enter in a distance I would like it to travel by using the serial monitor on my computer. To clear things up, everything works how I need it to when connected to my computer.

I would like to connect my arduino to an external power source, serial monitor, and keypad so when I enter in a number (not connected to my computer), the object will move to that distance. What's the easiest way to enter in information with a keypad so that the arduino can process and react accordingly?

Thanks!!

kyanos:
What's the easiest way to enter in information with a keypad so that the arduino can process and react accordingly?

I can't reconcile that question with your title. Keypads usually connect directly to the Arduino. Please post a link to the datasheet for your keypad.

If you want to use the PC keyboard to enter data and send it to the Arduino then you need a program on the PC to do that.

Obviously the Arduino Serial Monitor can do it. But so could other terminal programs such as puTTY.

Or you could write your own PC program to do it. This Python Arduino demo could be a starting point.

...R

Is it possible to use a keypad connected straight to the arduino, in the same way you would use one that's connected to your computer? I need the user to be able to enter in an input distance while the arduino is not connected to a computer. Is that possible?

Sure, if you have a board with 16U2 or 32U4 that you've programmed with HID code to accept keyboard input.
Which Arduino are you using?

You could also connect a simple 3x4 or 4x4 keypad and use the keypad.h library to read button presses.

I'm using an Uno so it does have 16U2 but I'm not familiar with HID code. Using a 3x4 keypad is something I've considered, just haven't had the materials to test yet. Would that be an easy method to enter in information?

Yes, no 16U2 reprogramming needed, just 7 IO pins and the keypad.h library from the Playground.

This might be a dumb question, but would I get the arduino to remember a previous number pushed? For example, I push 14.2, how could I get the it to process it as this number, rather than "1", "4", ".", and "2"?

kyanos:
would I get the arduino to remember a previous number pushed?

You use variables in a program to remember values. You could easily remember 50 keypresses.

...R