Have following problem
I am reading the time
minuty = myRTC.minutes;
which if I send it to serial output
Serial.println(minuty);
returns
"34"
I can use charAt to get "3" and "4" which I want to sent to following function
void Display1to9 (int Digit){
if (Digit == 0) DisplayDigit(1, 1, 1, 0, 1, 1, 1);
if (Digit == 1) DisplayDigit(0, 0, 1, 0, 0, 1, 0);
if (Digit == 2) DisplayDigit(1, 0, 1, 1, 1, 0, 1);
if (Digit == 3) DisplayDigit(1, 0, 1, 1, 0, 1, 1);
if (Digit == 4) DisplayDigit(0, 1, 1, 1, 0, 1, 0);
if (Digit == 5) DisplayDigit(1, 1, 0, 1, 0, 1, 1);
if (Digit == 6) DisplayDigit(1, 1, 0, 1, 1, 1, 1);
if (Digit == 7) DisplayDigit(1, 0, 1, 0, 0, 1, 0);
if (Digit == 8) DisplayDigit(1, 1, 1, 1, 1, 1, 1);
if (Digit == 9) DisplayDigit(1, 1, 1, 1, 0, 1, 1);
}
If I run this function like this
Display1to9(1);
It nicely displays 1 on my 7-digid display
But when I run
Display1to9(minuty.chaAt(0);
Where minuty = "34" and minuty.chaAt(0) returns "3"
The function does not lit 3. I cannot find clear function to convert either string nor char to Int.
And I am pretty much stuck
Please help