Arduino variable syntax error -
what's wrong follow syntax?
void draw() { int dword; dword = serial.read(); u8g.setfont(u8g_font_gdr25); u8g.drawstr( 5, 60, dword); }
i error:
call of overloaded 'drawstr(int, int, int&)' ambiguous
if @ source code:
u8g_uint_t drawstr(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_drawstr(&u8g, x, y, s); }
it receives parameter variable of type const char *, must convert integer type of variable, example can use itoa function:
int dword = 321; char str_dword[5]; # replace 5 number of digits think number has. itoa(dword, str_dword, 10); u8g.drawstr( 5, 60, str_dword);
wiki
Comments
Post a Comment