I would like to send such array for example via pyserial:
[49, 56, 48] or [82]
I tried such solution before sending:
print(list(str(180).encode()))
and it gives me array as I want. But when I tried to send it via pyserial it said that I need to have buffer instead of list. In general I’m trying to get some analogue from kotlin:
byteArrayOf('O'.code.toByte())
"70".toByteArray()
which gives me such arrays for sending then to arduino. I tried sending maps, dicts and so on, but did not succeed. Whether it’s possible to have something similar in python?