lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 09/03/2014 03:21 PM, Ahmed, Hammad wrote:

Hi all,


As a newbie, I am using luars233 library for serial communication using lua. I need to send data bytes without converting them in ASCII form, but the write function of luars232 is converting the data into ASCII before transmission even if I pass it to the function as a number. Please provide possible assistance. Thank you.


Best Regards,

Hammad


Lua doesn't have a `char' type like C. (e.g. 0x41 is not equvilent to 'A')
Use string.char and string.byte to do the conversion.