Hello, i'm working on my project, but i have a little problem, i want to generate random arrays, which include 4 numbers randomly from 0 to 9
i have this code:
int heslo1 = 0;
int heslo2 = 0;
int heslo3 = 0;
int heslo4 = 0;
char Main[4] = {heslo1, heslo2, heslo3, heslo4}; //activation password
void loop(){
heslo1 = random(0,9); // first digit of generated password
heslo2 = random(0,9); //
heslo3 = random(0,9); //
heslo4 = random(0,9); //
}
but when i enter new code, that is displayed on display it's wrong, i have idea, the problem is in "char Main[4] = {heslo1, heslo2, heslo3, heslo4}; //activation password
" because everything works if i change this line like this: Main[4] = {'1', '2', '3', '4'}; but i don't have idea what problem it is
Thanks for advices