which function convert an integer to an unicode character in python
Answers
Answered by
0
Just use chr(somenumber) to get a 1 byte value of an int as long as it is less than 256. pySerial will then send it fine.
If you are looking at sending things over pySerial it is a very good idea to look at the struct module in the standard library it handles endian issues an packing issues as well as encoding for just about every data type that you are likely to need that is 1 byte or over.
If you are looking at sending things over pySerial it is a very good idea to look at the struct module in the standard library it handles endian issues an packing issues as well as encoding for just about every data type that you are likely to need that is 1 byte or over.
Answered by
0
unichrx function will convert an integer to a Unicode character.
Similar questions
English,
8 months ago
Math,
8 months ago
Math,
8 months ago
Science,
1 year ago
India Languages,
1 year ago
India Languages,
1 year ago
India Languages,
1 year ago