How to make push buttons commands.

Hello i was wondering how i can write a message in serial monitor using push buttons? so if i put the first button it shows a if i push it twice it shows a b then advance moves on to the next character? I'm using 9 buttons a,b,c,d,1 and a second button to submit it and go back to clear a character 11 buttons total?

maybe a counter and if then..??

Hello i was wondering how i can write a message in serial monitor using push buttons?

Yes, you have our permission.

so if i put the first button it shows a if i push it twice it shows a b then advance moves on to the next character?

You know those keys on the keyboard, to the right of the m key? Learn to use them.

How will you distinguish between pressing one SWITCH twice to generate, for instance, 'a' two times versus generating a 'b' once?

I understand the scheme of what you're attempting but the user needs some kind of feedback.

For instance, if you were to attempt to send a text message using your phone, when you press the 1 key the first time you'll get feedback that it has registered as an "A" then pressing it again you'll see it change to a "B". This feedback is pretty vital for the user to succesfully negotiate the input procedure.

So presuming that, in your proposal, the final message is sent through the serial port. What are you going to use to give user feedback DURING this composition stage?

hello sorry my wife is sick i was taking care of her and meds. i have a nrf24l01 chat project i been working on using the nokia 5110 everything seems to be working great i can display the text on the LCD after i write them from the serial monitor. but i would like to get away from the serial monitor and use push buttons write the text message. right now i have 9 buttons in a multiplexing mode using 6 pins i only have the analog pins left open because almost all digital pins are being used by the Nokia 5110 and the nrf24l01 module. currently i have it on the arduino pro mini my sketch is below attached. I'm not sure how to use a push button as a character button to write the message or how to send it to the nrf24l01 chat. the pattern is button 1 will be a,b,c,1 button 2 will be d.e.f.2 button 3 will be g,h,i,4 button 4 will be j,k,l4 button 5 will be m,n,o,5 button 6 will be p,q,r,6 button 7 will be s,t,u,7 button 8 will be q,y,y,8 button 9 will be z,0 and i h ave 1 more button to send the message and one button to go back and clear that last letter or number if need to put a new one. so if put button 1 once then A button shows up and moves to the next character if button 1 pushed twice then letter b comes up.. after the message is made then hit the send button and it sends the message like in the serial monitor.

_2waytextmessenger_nokia5100lcd.ino (8.57 KB)

This is what I'm trying to do and need help.

OK
To get around your pin shortage you can have a resistance ladder attached to an analogue pin. This is very reliable for 5 buttons on one pin. With 3 pins you could have 15 buttons at your disposal.

This is a schematic for the arrangment I'm talking about.

Writing a sketch to do what you want would be childs play. You could even have a separate button that would cycle through input modes of say, lowercase text-uppercase text-numbers-symbols

I'll see what I can come up with.

it might be childs play to some but for me it's not I'm good at building things making them work but if programing them is a little over my head i know some basic stuff or moving around some code here and there but always get stuck a lot. but writing code from scratch is a lot for me.i did all ready wired it up on a breadboard using a 3x3x3 multiplexing with 6 pins that part works i tested it using a led. but when i try to code it to see what i can do that is where the mind block comes into play.

OK but since it's still at the breadboard stage, you can tear that up and build a matrix of 15 buttons with just 3 pins..

only way to do with is with a shift register something like that and i do not know much about shift registers and you need 2 of them to make it work with push buttons.

You don't need shift registers. You just need a handfull of resistors.

You connect them together like a daisy chain (as I have shown above) One end of this daisy chain is connected to the 5v pin. Then working from this end of the chain, you connect the first junction to a button. Also on this junction (and this one alone) you add a separate piece of wire. This will go to an analog pin on the arduino.

Now working down the daisy chain of resistors, you connect a button at every junction. you also add a button to the loose end.

Finally, all of those buttons have their loose ends connected to the gnd pin.

There you have it. 5 buttons on one pin. You can then do the same thing for another 5 buttons using another pin.
And again for another 5 buttons on another pin.

There's no complicated ICs, and it's dirt cheap.

i will look into that but mean while not sure how to program it to put the text on the display in the nokia 5110 ?

If you build it, I'll write the editor for you.