How to convert char to unsigned char?


i have lcd display using st7920 controller , using dfrobot serial library available here --> http://www.dfrobot.com/image/data/fit0021/lcd12864rspi.rar

i'm trying write number on lcd screen having little trouble function write text screen requires unsigned char.

i can use following convert number string.
   char millis_char[16];
   unsigned long millis_ulong = millis();
   sprintf(millis_char,"%d",millis_ulong);


but don't know how convert string unsigned char.

this use in lcda.displaystring function

any ideas?

char , unsigned char convert 1 other, no trouble there.

to access single digit in array, index it. example pass digit 3 (the numbering starts 0) magic_display_function is:
code: [select]
magic_display_function (millis_char[3]);


korman


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > How to convert char to unsigned char?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums