How do i read 8 push buttons through digital read?

Hi,
I want to read 8 push button values through digital read pins, and hoq do i do that?
I want the arduino to wait untill i press all the buttons (which is in encoded form, i.e some characters need 4 buttons to be pressed and some 5, and even 1 too) and then it has to take the buttons which i have pressed and according to the buttons pressed i need to continue the code using that.
so if anyone could help ASAP it would be great!
I am new to arduino, i just bought my kit 2 days back :neutral_face:
thank you!
reply ASAP plz!!

We can help you through this.
Show us what you have so far.
.

manjunath007:
reply ASAP plz!!

Why?

Why would your situation be so urgent?

LarryD:
We can help you through this.
Show us what you have so far.
.

I'm actually trying to do a braille writer, in which 6 push buttons can be used to enter the code to the arduino. using the states of the buttons i'll need to encode in the program.
for eg. if the user wants to enter 'a' to the system, he'll nedd to press 100000 (ie., push button 1=pressed and others not pressed). similarly for 'b' 110000 etc.
the problem is, when i want to enter 'b' (the code is 110000), as soon as i press PB1 it takes the value as "100000". how do i make it wait till i press all the buttons required!!
thank you!

and one more thing! can i use analog pins a0-a5 to read digital values using digitalRead??

OK, so you are referring to a "chording keyboard".

The problem in your question is the "crystal ball" conundrum. We can't read your mind, or see what is on your computer. (We are not the CIA. :grinning: ) So you are talking about some code you have made, or found, as if we knew what it was - as if everyone would know what that code was. :astonished:

Get the idea? You have to start by showing your current code, following the instructions for posting. Only then can we work on it.

In the meantime, what you have to do is this: You record each keypress - by reading the buttons which are connected to ground using INPUT_PULLUP to pull un-pressed button inputs HIGH - in a byte as an OR operation so that the bits are set for each button pressed but not cleared when the button is released. Only when all buttons are released, do you then take the byte and use it as your input code.

This typewriter works somewhat differently to the usual where each character is generated as you press the keys.

There is also a matter of de-bouncing the buttons with which we can help you as you work through it.

manjunath007:
and one more thing! can i use analog pins a0-a5 to read digital values using digitalRead??

Yes.
e.g. sample = digitalRead(A2);