Hi,
i'm trying to control a system by serial raws, using the "comport" Pd object.
The problem is that my codification of parameters is in converted decimals from 2's complement binary.
for example:
if I had to send the control 132 with two parameters 500 and -500: something like 132(500, -500). It should be done like this:
First parameter 500:
- in hexadecimal = 1F4;
- divide in two 8-bit components, like 1 and F4
- send them in a raw in decimal representation 1 = 1; F4 = 244
Second parameter -500:
- represent as 2's complement = FB00
- divide FB and 00
send as a raw in decimal 251 and 0
so the message should be like "132 1 244 251 0" for 132(500, -500).
There is any object for Pd to help me with this hexadecimal handling?
It would help me very much, thanks!