is it possible to call a function from a string???
im using a 7 segment display and i made a list with the name of the functions, my question is, can i call them from the list???
char numbers[10][20]={"zero", "one", "two","tree", "four", "five", "six", "seven", "eight", "nine"};
int x =500;
int b=0;
void setup() {
DDRD =B11111100;
DDRB =B111111;
}
void loop() {
/* for (b=0;b<=9;b++){
numbers[b](); <=== i know this is wrong but i wanna know how to make it right
delay(x);
}*/
zero();
delay(x);
one();
delay(x);
two();
delay(x);
tree();
delay(x);
four();
delay(x);
five();
delay(x);
six();
delay(x);
seven();
delay(x);
eight();
delay(x);
nine();
delay(x);
}
void zero(){
PORTD=B11011100;
PORTB=B000001;
}
void one(){
PORTD=B01000100;
PORTB=B000000;
}
void two(){
PORTD=B10101100;
PORTB=B000001;
}
void tree(){
PORTD=B11101100;
PORTB=B000000;
}
void four(){
PORTD=B01110100;
PORTB=B000000;
}
void five(){
PORTD=B11111000;
PORTB=B000000;
}
void six(){
PORTD=B11111000;
PORTB=B000001;
}
void seven(){
PORTD=B01001100;
PORTB=B000000;
}
void eight(){
PORTD=B11111100;
PORTB=B000001;
}
void nine(){
PORTD=B11111100;
PORTB=B000000;
}