Switches and LED's


hi,

i'm working on project uses switches , led.

i wondering if can use 10 switches (5 switches[set a] compared 5 switches[set b]) compare values , light led.

i'm working on 15 output values want use 5 switches, made combination values in switches, example, switch 1-2-3 value of 1. , want compare 2 values, 1 set switches , 1 value set b switches, possible create program project?

another example is, if pressed switches (given have set values switches) , arrived in value of 15 set , 12 set b, led light indicate set has higher value. or if values of same value, led indicate 2 set have same value.


(this project game  "game of generals" needs arbiter preside game. replace arbiter decides has higher ranked piece/soldier)

the soldier piece may not revealed other players arbiter needed. arbiter decides piece has higher rank other piece. in project want create electronic arbiter compares values decide piece has higher value(rank) , led light side wins battle between 2 unknown piece.

although electronic arbiter exist, want create own personal game arbiter using arduino uno.

please me program.

i'm still new programming , appreciated.

do each of switches have same value @ times when on ?
if use loop iterate through set of switches, read value array switches on , add total set.  each set , compare totals.  need 1 loop read both sets if correctly.


Arduino Forum > Using Arduino > LEDs and Multiplexing > Switches and LED's


arduino

Comments