How would I split part1
into 2-3 digits and put them into num1
, num2
, and num3
?
int FMSTATION = 10250;
int update_display() {
int fm_station = FMSTATION ;
int part1;
int part2;
part1 = (FMSTATION / 100);
part2 = (FMSTATION % 100);
part2 = (part2/10);
int num1 = ;
int num2 = ;
int num3 = ;
int num4 = part2;
matrix.writeDigitNum(0, num1, false); //1st number on lcd
matrix.writeDigitNum(1, num2, false); //2nd number on lcd
matrix.writeDigitNum(3, num3, true); //3rd number on lcd and adds "."
matrix.writeDigitNum(4, num4, false); //4th number on lcd
matrix.writeDisplay();
}
I have searched the web from top to bottom, but could not find the answer. In the end what I should get displayed on my LCD is 102.5
.