Need to connect 4 switches to only 1 port


hello there !
i'm having small issue :
i made program, wich must able know state of 4 switches ( if on 0010 state, or 1110 state, etc...)
the problem is, have 2 ports free, others being occupied other things in project.
is there way have arduino knowing wich state switches ?

i thinking of using current divider, don't know how use them, or how make in specific case.

thank in advance reading , answering :)

( apologies bad english, fellow frenchman's speaking :d )

do have analog pins available? can use analog input different resistors on each switch identify switches different voltages.

of course analog input can used digital input.

code: [select]
pinmode(a0, input_pullup);
digitalread(a0);


Arduino Forum > Using Arduino > General Electronics > Need to connect 4 switches to only 1 port


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts