So, I've been for hours searching for this conversion without success.
I need to convert some string with Python to HEX to send to a LED Controller.
So my purpose is to convert "Hello" into HEX String and then into a Byte String to send this directly to the controller via socket.
>>> "hello".encode("hex")
'68656c6c6f'
And then convert that string into something like:
string = b'\x68\x65\x6c\x6c\x6f'
Any advise on how to do this conversion? If I just:
'68656c6c6f'.decode("hex")
Then throws out the same "hello" instead of the bytestring.
bytearray('68656c6c6f'.decode("hex"))