I can't make a serial communication with synapse. Below I demonstrate what worked.
Always send $ AA.
No wonder; you're filling the whole buffer with
$AA, what did you expect it to send?
for i:=0 to SizeBufferSend-1 do
begin
Buffer_Out[i] := $AA; {<-- The bufer ends up choked full of $AA's }
end;
Or have I misunderstood you and that was as intended?
In the second function, have you tried converting the hex-string without adding the '$'? And shouldn't you traverse the
comando string rather than always copying the first "byte"? As in:
{Instead of:
Buffer_Out[i] := HextoInt('$'+copy(comando,1,2));
Try with: }
Buffer_Out[i] := HextoInt(copy(comando, i*2, 2));
BTW, where does
HextoInt come from? I couldn't find it in the help files