Blame | Last modification | View Log | Download
unit Blikac;interfaceuses PortInc,Windows, Messages, SysUtils, Classes,Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls;typeTForm1 = class(TForm)ScrollBar1: TScrollBar; Edit1: TEdit;Timer1: TTimer;procedure ScrollBar1Change(Sender: TObject);procedure FormCreate(Sender: TObject);procedure Timer1Timer(Sender: TObject);end;varForm1: TForm1;implementation{$R *.DFM}var Vystup: Integer;procedure TForm1.ScrollBar1Change(Sender: TObject);beginEdit1.Text := floattostr(Scrollbar1.Position)+ ' ms';Timer1.Interval := Scrollbar1.Positionend;procedure TForm1.FormCreate(Sender: TObject);beginOpenCom (Pchar('COM1:9600,N,8,1'));Timer1.Enabled := true;Vystup := 0;end;procedure TForm1.Timer1Timer(Sender: TObject);beginVystup := (Vystup + 1) AND 1;DTR (Vystup);RTS (Vystup);end;end.