Keypad project !

Hello everybody

I am new to this forum and i dont know the arduino language ! I use the examples or copy the code from sombody else. I have the starter jut from sparkfun, the protoshield and this keypad

I want to combine the arduino and the the keypad. Basically this is my idea.

A small red led is always on when i power the arduino, but when i press the correct code on the keypad i want the green led to light up. After the green led i want to have a servo or anthing else (led,motor,laser etc). And when i press # on the keypad to lock again.

Can this happen ???

How much volts must the battery pack for the arduino be ??? 9v ???

Can this happen ???

Yes, it can. Get coding...

How much volts must the battery pack for the arduino be ???

Which Arduino? The 5 volt models typically require a minimum of 7 volts into the jack, due to the voltage drop through the voltage regulator and some polarity protection diodes.

Because i dont know the code and i dont have much time to learn it

You've got the rest of your life? Is that limited in some way you didn't disclose? Or is this homework? If so, you should have said that up front.

Yes i am a student

What grade level? What field of study?

Does this project have anything to do with school?


Here's a project I did that is similar to what you describe. I built a door lock that is locked/unlocked by entering the correct code on a keypad. It's not the same keypad you have, but maybe the code and project description will give you some guidance. As PaulS hinted, you'll have to work hard to learn how to accomplish your goal. Good luck and have fun.

This isn't the homework helpline. We don't do homework for you. We're willing to point you in the right direction and offer resources, guidance, and encouragement.

So, all the questions are to elicit details that you could have provided initially.

Since it is not homework, I'm more willing to actually provide some code. There is a library linked to on sparkfun's page for the keypad. Download and install that library. Run the provided example. When that works (the key pressed is what is printed), then writing a function that waits for a valid set of buttons to be pressed in a specific order is fairly easy.

Once you have the hardware, and the example works, PM me, and I'll help you out.

After the green led i want to have a servo or anthing else (led,motor,laser etc).

If this is for a safety interlock for your laser project that is capable of burning (and so blinding), you’d better state this now.
I’d rather you trusted your eyesight (and others) to a failsafe mechanical lock than to your coding skills.