decimal number entering with keypad 4x4

Could any one help me to make a code to save a decimal number using a keypad 4x4

Look at the keypad library and the examples associated with it.

I could not find any code related to save decimal values

I just googled "Arduino keypad example decimal number" and got tons of hits to threads on this site where it was being explained to someone. In all of those there was nothing for you? I find that hard to believe.

Can you use the keypad library to input a single digit number? Can you write a line of code to multiply that number by ten? Can you get another single digit and then add giving you a 2 digit decimal number? Then multiply get a new digit and add me you've got three digits. Is that what you need?

I already tried many of the tons that googled before asking and the follow was the final one:
The problem is that the LCD did not show any number

char key = kpd.getKey();
if(key != NO_KEY)
{

index = 0;
numbers[index] = '\0';
}
else if(key == '*')
{
numbers[index++] = '.';
numbers[index] = '\0';
}
else if(key >= '0' && key <= '9')
{
numbers[index++] = key;
numbers[index] = '\0';
}

float myvariable = atof(numbers); // Do whatever you need to with len

index = 0;
numbers[index] = '\0';

}
}

Well that snippet is incomplete so there's no telling why it doesn't work. You really should take a minute to read the "How to use this forum" post. It will tell you about how to get the most out of this forum without wasting people's time.

no one ask you to reply
simply do not reply
waste my time
thanks

Ok don't fix it then. At least I was nice enough to tell you why you won't get an answer. Just let it sit there then. I don't care if you get it fixed or not. But nobod can fix what they can't see. I think anyone who isn't smart enough to understand that doesn't stand a chance at programming.

The problem is that the LCD did not show any number

So you're compounding your problems here - how do you know that your LCD works?

Keep things simple, and just use the serial monitor, and use code tags when you post code.

delta_g have free time to waste here
I think you just need to increase your posts
waiting your next post smart man :slight_smile:

Yeah stuck in an airport with my flight delayed killing time. Was trying to help you. I guess you're more interested in a pissing contest with me than fixing your code. Sorry, I'll move on to someone who wants their code to work. You stay here and keep bitching about how I tried to help you out.

delta_g have free time to waste here
I think you just need to increase your posts
waiting your next post smart man

Wow! What a way to alienate yourself. Really neat.

Considering you have to wait 300 seconds between posts, you must have a lot of free time on your hands.

At least I tried. He's getting killed for this BS on SO

https://stackoverflow.com/questions/48915508/how-to-enter-and-save-decimal-variable-with-keypad-and-arduino

If you're going to post the same question all over the place please at least be considerate enough to link them so someone doesn't waste time here giving you answers you already have. Please remember, we are people too and we don't live to serve you. Our time is valuable as well.

Here is some code which purports to enter a decimal number on a keypad.

You're welcome.