EDIT: I am using this for programming a pic, so the C will be quite limited. The compiler is XC8.
Following function expects me to pass a string:
void OLED_string(char* str, short x, short y) {
short pos = 0;
char character = str[pos++];
short startx = x;
short starty = y;
while(character != '\0') {
OLED_char(character, startx, starty);
if(startx >= 123) starty++; //wrap around
startx += 5;
character = str[pos++];
}
}
I would like to display a value I have in a unsigned Integer. This value should be converted to Float and then divided by ten. Since float is very slow I would prefer to convert the integer to a string, and then simply add a point before the last character. I tried to pass directly the integer to this function but it does not work. Thanks!