Lighting up an LED after entering a "password"


.

putting password in array of chars start.  start array index variable set zero.
 then, character received can compared character @ current position in array , if correct corresponding led turned on , index array incremented.  once index equals 4 (see below) turn on fifth led.  if wrong character received @ time turn off leds , set index 0 , start again.

the value of index 4 element array 0 3, hence test index reaching 4 indicating success.  not try retrieve or test element 4 of array not exist.


Arduino Forum > Using Arduino > Programming Questions > Lighting up an LED after entering a "password"


arduino

Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???