How can I send multiple hex codes in delphi? for example, the hex codes I need to send to the serial port is 1B and 40. How can I send it to the serial port? I can send hex codes to the serial port already but just one hex code like 1B only, I am having difficulty sending multiple hex codes. Thanks in advance.
my code:
unit uSample;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo, Winsoft.Android.ComPort,
FMX.Edit, FMX.StdCtrls;
type
TForm1 = class(TForm)
AComPort1: TAComPort;
Memo1: TMemo;
Timer1: TTimer;
Button1: TButton;
Edit1: TEdit;
Open: TButton;
procedure Timer1Timer(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure OpenClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject);
begin
AComPort1.Active := False;
AComPort1.DeviceName := Edit1.Text;
AComPort1.Active := True;
AComPort1.WriteUtf8(Memo1.Text);
AComPort1.WriteByte(Byte($0A));
end;
procedure TForm1.OpenClick(Sender: TObject);
begin
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var Text: string;
begin
end;
end.